ClearCase plugin for Qt Creator
-
Hello,
I want to create a plugin for ClearCase integration with Qt Creator.
Is there any howto/getting started/internal documentation, or should I just copy another vcs plugin and modify it?
Thanks.
-
The bazaar plugin (new in master) is still pretty minimal and could probably serve as a good guide for your own plugin.
Feel free to ask for help on the Qt Creator mailing list (qtcreator@qt.nokia.com) if you get stuck.
-
Thanks for the fast reply!
ClearCase is quite different from the FOSS engines I worked with (cvs, svn, git). All the files are locally read-only, and when you need to edit a file, you need to check it out. When you're done you check-in. If you ever worked with VSS - this flow is quite similar.
Besides checked-out and read-only files, a manually overridden file ("Make writable") is considered "Hijacked", and you may check it out and keep the changes, or revert it to read-only (Undo hijack).
Is there any way to indicate which files were modified and which are untouched in the source tree? (something like TortoiseSVN...)
-
No, I never worked with VSS, but had some really limited exposure to ClearCase.
This will become tricky. So far Qt Creator has no support to do VCS-specific magic before opening a file. Is there a way to do that without interfering with the file opening code? We do not like plugins to meddle with internals;-).
TortoiseSVN (and Creator, too) gets the information on which files were modified from the VCS. So if ClearCase has a way to list the modified files then you can ask it to provide that information.
-
There is a way to get the information. Question is if it is possible to display it visually on the source tree (like TortoiseSVN superimposes icons on Windows Explorer)
-
We do not superimpose anything in our file-based views yet. That would surely be possible though. I have not seen that feature requested much though. The icons off files in creator are rather small to add a meaningful overlay, too.
Of course that will only effect the views of the files inside Qt Creator, not the Windows Explorer:-)
-
How about setting the text color for the filenames (e.g. green for checked-in, orange for checked-out, red for hijacked)? Is that possible?
-
Not without some modifications.
Ideally Creator would just handle all that clearcase magic transparently...
-
Well, in ClearCase explorer it displays an icon to the right of the original icon (V for checked-out, crossed V for hijacked, none for checked-in). This is an option too...
-
to the left, pardon me
-
ClearCase is not on my ToDo list and I maintain the VCS stuff right now.
Feel free to implement a plugin though! Qt Creator is a open source project and you guys obviously are developers or you would not be requesting a plugin;-)
-
That was my intention from the first place. That wasn't a feature request, but rather a request for information :)
I'll try to do this and see how it goes...
-
Hey,
Thanks for all your help.
I'm almost done with the plugin :)I still have a problem - when I do check-in (aka commit), I hold a FileChangeBlocker for the file (it is changed from read-write to read-only), but I still get the "file changed outside Qt Creator" message.
How do I avoid it?
-
Oh, good question! I think Creator triggers on all changes to the file, even if it is only meta-data... No idea how to get around that.
-
The problem is with runVCS running synchronously, so notifies aren't blocked. Maybe you should add a real blocker for synchronous operations (e.g. expectFileChanges() should set some variable that will be tested on checkForReload())
-
About icon overlaying - I found that function in FileIconProvider (works by mime type or extension). Problem is it cannot be replaced with a customized one...
What I'd like to do is use my own FileIconProvider, and use the overlay function to overlay a small status icon (or widen the icon to add a status icon next to it)
-
Better ask the guys on freenode :)
I hardly use CC nowadays, so my motivation is low ;-)