News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Version Control Plugin

Started by daniloz, August 17, 2011, 01:20:27 PM

Previous topic - Next topic

daniloz

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

zabzonk

> 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.

daniloz

Quote from: Neil Butterworth 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.

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... ;-)

MortenMacFly

Quote from: daniloz on August 17, 2011, 04:17:13 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:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

daniloz

Quote from: MortenMacFly on August 17, 2011, 04:41:11 PM
IMHO a sourcesafe plugin exists already... :shock:

Hmmm... I completely missed that... where?  :shock: please!  :P

MortenMacFly

Quote from: daniloz on August 17, 2011, 04:45:09 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:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

daniloz

Back to my original question:
Quote from: daniloz on August 17, 2011, 01:20:27 PM
- 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