Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: daniloz on August 17, 2011, 01:20:27 pm

Title: Version Control Plugin
Post by: daniloz on August 17, 2011, 01:20:27 pm
Hi All,

This is an old project and now I got some free time, so I'm back to it. My idea is the implement a Visual SourceSafe Plugin for C::B.

I'm still in the conceptual stage and I have a question for the C::B developers:

- What's the best way to deal with the File States within a plugin?

I've seen that the enum FileVisualState defines states for version control (vc) and that it can be set using the SetFileState() method from the ProjectFile class, but I still have two questions:

- What's the cleanest way to get a pointer to the project manager or the actual project?
- Even if I set the File State in my plugin, it gets overwritten by the cbEditor::SetModified() method (cbeditor.cpp, line 850) when a file read-only property is changed (I've tried it and it really does).

Any help is very much appreciated,
daniloz
Title: Re: Version Control Plugin
Post by: zabzonk on August 17, 2011, 03:50:47 pm
> implement a Visual SourceSafe Plugin for C::B

I though SourceSafe was dead? Haven't MS killed it off? and anyway, I can't imagine any CB users would want to use it.
Title: Re: Version Control Plugin
Post by: daniloz on August 17, 2011, 04:17:13 pm
> implement a Visual SourceSafe Plugin for C::B

I though SourceSafe was dead? Haven't MS killed it off? and anyway, I can't imagine any CB users would want to use it.

Not quite dead on our company... still using it...
Well, I want to use it. I do DSP programming and the Analog Devices IDE is just useless, so I use C::B, but our vcs is SourceSafe, so the idea... ;-)
Title: Re: Version Control Plugin
Post by: MortenMacFly on August 17, 2011, 04:41:11 pm
I though SourceSafe was dead? Haven't MS killed it off? and anyway, I can't imagine any CB users would want to use it.
IMHO a sourcesafe plugin exists already... :shock:
Title: Re: Version Control Plugin
Post by: daniloz on August 17, 2011, 04:45:09 pm
IMHO a sourcesafe plugin exists already... :shock:

Hmmm... I completely missed that... where?  :shock: please!  :P
Title: Re: Version Control Plugin
Post by: MortenMacFly on August 17, 2011, 05:31:47 pm
Hmmm... I completely missed that... where?  :shock: please!  :P
Ok - I checked back and shame on me! :oops:
It's a ClearCase plugin, not SourceSafe. So please ignore what I've said. :oops: :oops: :oops:
Title: Re: Version Control Plugin
Post by: daniloz on August 19, 2011, 01:27:46 pm
Back to my original question:
- What's the best way to deal with the File States within a plugin?

I've seen that the enum FileVisualState defines states for version control (vc) and that it can be set using the SetFileState() method from the ProjectFile class, but I still have two questions:

- What's the cleanest way to get a pointer to the project manager or the actual project?
- Even if I set the File State in my plugin, it gets overwritten by the cbEditor::SetModified() method (cbeditor.cpp, line 850) when a file read-only property is changed (I've tried it and it really does).

Anyone? I don't know the structure of codeblock so well and the only way I found to do it was as described above, but the File Status get overwritten...

Or maybe I'm posting on the wrong place here? :-o