Author Topic: ClearCase Plug-In  (Read 30433 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
ClearCase Plug-In
« on: October 26, 2005, 12:38:14 pm »
Dear all,

I am going to implement a plug-in for CodeBlocks adding support for several ClearCase commands.
As it is now, I still need to learn a few things.

To start out with I am providing an executable that allows also to do some ClearCase commands. You can find it at :
http://users.pandora.be/lieven.de.cock/CodeBlocks/ClearCase4Devcpp.zip

As the name suggests it was something I initially created for Dev-cpp, but it also works with CB.
How to install it : extract the exe somewhere on your PC (oh yes : windows only :-(   ) and then in CB go to "tools" menu and select "Configure Tools".
Next press the add Button, and fill in the fields as follows :

Name : ClearCase for CodeBlocks
Executable : browse for the exe you just put somewhere on your machine
Parameters : $(ACTIVE_EDITOR_FILENAME) $(PROJECT_DIR)
   --> not the space inbetween the 2 parameters.
Working Directory : select the directory where the exe is in

The exe might need to some MS runtimes since it was build with .NET 2003. Yeah, using M$ to use other IDE's. ;-)
Please look for them and ensure they are in your path.

When you are working on a project (cbp !!) whose sources are in ClearCase you can run the clearcase commands for the active editor by going to the Tools menu and selecting our newly added tool. The rest is pretty obvious on what to do.


Roadmap :
1) create a simple plug-in that calls the cleartool on the command line for everything, clearcase menu in the menubar, and the context menu. Does not allow yet to add comments (needs a gui for that, one of the things that I need to study ...)
2) the same as 1 but with a GUI that allows to add comments for the action you excute
3) Maybe ? : replace cleartool calls by using the api dll (windows only)
4) more to come ... ???


I already have a FIRST QUESTION : what's the counterpart for CreateProcess (from the windows API) on wxWindows ?
Since I don't want to just call system(...), sometimes we need to wait untill the action is finished before the code can continue.


kind regards,
Lieven


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: ClearCase Plug-In
« Reply #1 on: October 26, 2005, 01:06:42 pm »
Quote
I already have a FIRST QUESTION : what's the counterpart for CreateProcess (from the windows API) on wxWindows ?
Since I don't want to just call system(...), sometimes we need to wait untill the action is finished before the code can continue.

Check the documentation for wxExecute...
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #2 on: October 26, 2005, 02:08:49 pm »
Thanks for the information.
The documentation said it can only be called from the main thread, I suspect a plug-in call is not in the context of the main thread ?? I hope it is  8)

Another request : since other people are also working on plug-in for version control system (cvs, svn), maybe it might be a good idea that there's always a tab in the Messages pane, purely for version control systems.

Maybe each plug-in can create a new tab ? Does the sdk provide that ? But things might get clumbsy then.

What do you think ?

Cheers,
Lieven

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: ClearCase Plug-In
« Reply #3 on: October 26, 2005, 02:36:40 pm »
Quote
The documentation said it can only be called from the main thread, I suspect a plug-in call is not in the context of the main thread ??
Yes, plugins run in the main thread (unless they use threading, like the code-completion plugin).

Quote
Another request : since other people are also working on plug-in for version control system (cvs, svn), maybe it might be a good idea that there's always a tab in the Messages pane, purely for version control systems.
AFAIK, one plugin is in development and it creates its own tab.

Quote
Maybe each plug-in can create a new tab ? Does the sdk provide that ? But things might get clumbsy then
Yes, it is provided. Check sdk/messagemanager.h for info.
The way it's done now is subject to change but the functionality will remain.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #4 on: October 27, 2005, 12:43:18 pm »
Problem when using my very first dialog.

In my plug-in project I created a dialog by using the wxSmith.
So the project gets expanded with a header and a source file, an I choose to use an xrc file.
In my code at a given moment I try to do this (in the handler of a menu entry that was selected) :

   CcDialog Dialog(Manager::Get()->GetAppWindow());
   if(Dialog.ShowModal() == wxID_OK)
   {
      Manager::Get()->GetMessageManager()->Log("Ok pressed");
   }
   else
   {
      Manager::Get()->GetMessageManager()->Log("Cancel pressed");
   }

Everything compiles fine.
I place my plug-in dll in the share\CodeBlocks\plug-in subdur, and I even zipped my xrc file and putted it in share\CodeBlocks dir (dunno why yet, but looking at other plug-ins it might be needed).
I start CB, but I get an error like this :
The procedure entry point _ZN!wxDialog17MSWProcessMessageEPT6tagMSG could not be located in the dynamic link library wxmsw26_gcc_cb.dll.

Anyone any idea on what I did wrong ?

Many thanks,
Lieven


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: ClearCase Plug-In
« Reply #5 on: October 27, 2005, 02:12:57 pm »
Quote
The procedure entry point _ZN!wxDialog17MSWProcessMessageEPT6tagMSG could not be located in the dynamic link library wxmsw26_gcc_cb.dll.

Are you sure you 're linking to the same DLL C::B uses?
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #6 on: October 27, 2005, 02:18:01 pm »
Well, I saw that CB is using wx 2.6.1, but when downloading the sources at wxwidgets.org  I could either choose between 2.4.2 and 2.6.2. So I choose the 2.6.2.
This is part of my project file :
         <Environment>
            <Variable name="WX_VER" value="26"/>
            <Variable name="WX_DIR" value="E:\wxWidgets-2.6.2"/>
            <Variable name="WX_CFG" value="NonUnicode"/>
            <Variable name="CB_SDK" value="E:\Program Files\CodeBlocks"/>
         </Environment>

      <Linker>
         <Add library="wxmsw$(WX_VER)"/>
         <Add library="codeblocks"/>
         <Add directory="$(WX_DIR)\lib\gcc_dll\msw"/>
         <Add directory="$(WX_DIR)\lib\gcc_dll$(WX_CFG)"/>
         <Add directory="$(CB_SDK)\sdk\lib"/>
         <Add directory="$(CB_SDK)\devel"/>
         <Add directory="$(CB_SDK)\sdk\tinyxml"/>
         <Add directory="$(CB_SDK)\sdk\wxscintilla\include"/>
      </Linker>


So I guess I link with the dll of CB ? And in my sources of wx (where I builded as instructed in the wiki) I retrieve the header files and that setup.h ???

kind regards,
Lieven

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #7 on: October 27, 2005, 02:25:00 pm »
Experiment : I replace in CB directory the wx dll, with the one resulting from my wx 2.6.2 build -> I seem toget a bit further (I can already see my menu entry) but then CB crashes :

-------------------

Error occured on Thursday, October 27, 2005 at 14:22:08.

E:\Program Files\CodeBlocks\codeblocks.exe caused an Access Violation at location 10060e63 in module E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll Reading from location 002dfff8.

Registers:
eax=0023f1e0 ebx=01357ba8 ecx=104cfb9c edx=002e0004 esi=0023f1e0 edi=002d044e
eip=10060e63 esp=0023f150 ebp=0023f168 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246

Call stack:
10060E63  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:10060E63  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
1012B986  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:1012B986  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
1010A7D0  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:1010A7D0  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
77D48734  C:\WINDOWS\system32\USER32.dll:77D48734  GetDC
77D48816  C:\WINDOWS\system32\USER32.dll:77D48816  GetDC
77D4B89B  C:\WINDOWS\system32\USER32.dll:77D4B89B  GetParent
77D5F3E3  C:\WINDOWS\system32\USER32.dll:77D5F3E3  SendMessageA
101299ED  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:101299ED  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
10193586  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:10193586  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
6A7C6676  E:\Program Files\CodeBlocks\share\codeblocks\plugins\todo.dll:6A7C6676  GetSDKVersionMinor
6A7C6942  E:\Program Files\CodeBlocks\share\codeblocks\plugins\todo.dll:6A7C6942  GetSDKVersionMinor
6A7C6F9B  E:\Program Files\CodeBlocks\share\codeblocks\plugins\todo.dll:6A7C6F9B  GetSDKVersionMinor
6A7C4191  E:\Program Files\CodeBlocks\share\codeblocks\plugins\todo.dll:6A7C4191  GetSDKVersionMinor
100A86D8  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A86D8  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
100A8A9C  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A8A9C  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
100A9A79  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A9A79  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
100A9A19  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A9A19  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
100A9A19  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A9A19  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
60549C38  E:\Program Files\CodeBlocks\codeblocks.dll:60549C38  _ZN13PluginManager13NotifyPluginsER15CodeBlocksEvent
6055B23F  E:\Program Files\CodeBlocks\codeblocks.dll:6055B23F  _ZN14ProjectManager10SetProjectEP9cbProjectb
6055D66F  E:\Program Files\CodeBlocks\codeblocks.dll:6055D66F  _ZN14ProjectManager11LoadProjectERK8wxString
6057E3B9  E:\Program Files\CodeBlocks\codeblocks.dll:6057E3B9  _ZN15WorkspaceLoader4OpenERK8wxString
604DA46D  E:\Program Files\CodeBlocks\codeblocks.dll:604DA46D  _ZN11cbWorkspace4LoadEv
604DA049  E:\Program Files\CodeBlocks\codeblocks.dll:604DA049  _ZN11cbWorkspaceC1ERK8wxString
6055E5F4  E:\Program Files\CodeBlocks\codeblocks.dll:6055E5F4  _ZN14ProjectManager13LoadWorkspaceERK8wxString
004029EC  E:\Program Files\CodeBlocks\codeblocks.exe:004029EC
0040386D  E:\Program Files\CodeBlocks\codeblocks.exe:0040386D
0044D608  E:\Program Files\CodeBlocks\codeblocks.exe:0044D608
10043179  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:10043179  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
100B187C  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100B187C  _onexit  d:/src/mingw/build/runtime/../../runtime/dllcrt1.c:183
0040148A  E:\Program Files\CodeBlocks\codeblocks.exe:0040148A
00447ADA  E:\Program Files\CodeBlocks\codeblocks.exe:00447ADA
004011E7  E:\Program Files\CodeBlocks\codeblocks.exe:004011E7
00401238  E:\Program Files\CodeBlocks\codeblocks.exe:00401238
7C816D4F  C:\WINDOWS\system32\kernel32.dll:7C816D4F  RegisterWaitForInputIdle


Seems like I am definitely doing something wrong :-( , but what ?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #8 on: October 27, 2005, 03:04:07 pm »
I found the sources for wx 2.6.1, and build them, and accordingly changed my plug-in project.
Also here I get the crash now :

Error occured on Thursday, October 27, 2005 at 15:02:48.

E:\Program Files\CodeBlocks\codeblocks.exe caused an Access Violation at location 1014fa2f in module E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll Reading from location 0000006c.

Registers:
eax=00c18080 ebx=00000008 ecx=1053a548 edx=0023f4c0 esi=01337cb8 edi=0132cd88
eip=1014fa2f esp=0023f3b0 ebp=0023f3d8 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202

Call stack:
1014FA2F  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:1014FA2F  _ZN9wxMenuBar6AppendEP6wxMenuRK8wxString
014A1AA2  E:\Program Files\CodeBlocks\share\codeblocks\plugins\ClearCase.dll:014A1AA2  GetSDKVersionMinor
00418124  E:\Program Files\CodeBlocks\codeblocks.exe:00418124
0042132B  E:\Program Files\CodeBlocks\codeblocks.exe:0042132B
100A77E8  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A77E8  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
100A7BAC  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A7BAC  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
100A8B89  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A8B89  _ZN12wxEvtHandler12ProcessEventER7wxEvent
100A89C6  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100A89C6  _ZN12wxEvtHandler20ProcessPendingEventsEv
10001C44  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:10001C44  _ZN12wxAppConsole20ProcessPendingEventsEv
100C8D01  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100C8D01  _ZN5wxApp5YieldEb
6052F54E  E:\Program Files\CodeBlocks\codeblocks.dll:6052F54E  _ZN14MessageManager9AppendLogEPKcz
60548DD9  E:\Program Files\CodeBlocks\codeblocks.dll:60548DD9  _ZN13PluginManager14LoadAllPluginsEv
0041630F  E:\Program Files\CodeBlocks\codeblocks.exe:0041630F
0041278C  E:\Program Files\CodeBlocks\codeblocks.exe:0041278C
00402832  E:\Program Files\CodeBlocks\codeblocks.exe:00402832
0040386D  E:\Program Files\CodeBlocks\codeblocks.exe:0040386D
0044D608  E:\Program Files\CodeBlocks\codeblocks.exe:0044D608
10043161  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:10043161  _Z14wxUninitializev
100B07BC  E:\Program Files\CodeBlocks\wxmsw26_gcc_cb.dll:100B07BC  _Z7wxEntryP11HINSTANCE__S0_Pci
0040148A  E:\Program Files\CodeBlocks\codeblocks.exe:0040148A
00447ADA  E:\Program Files\CodeBlocks\codeblocks.exe:00447ADA
004011E7  E:\Program Files\CodeBlocks\codeblocks.exe:004011E7
00401238  E:\Program Files\CodeBlocks\codeblocks.exe:00401238
7C816D4F  C:\WINDOWS\system32\kernel32.dll:7C816D4F  RegisterWaitForInputIdle


Any help ?
Lieven

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: ClearCase Plug-In
« Reply #9 on: October 27, 2005, 03:53:49 pm »
You need the exact same wxWidgets C::B was built with.
If you build C::B yourself that's easy because you 'll be using the same wx.
If not, download the C::B SDK. It contains, among other things, the import library for wxmsw26_gcc_cb.dll (libwxmsw26.a). Link with it and everything will be fine.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #10 on: October 27, 2005, 04:35:25 pm »
I linke with the lib from cb itself, still get the crash. searching searching ....

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #11 on: October 30, 2005, 04:43:10 pm »

Hi folks,

The crash problem is gone, the reason and solution can be found at :
http://forums.codeblocks.org/index.php/topic,1224.0.html

So I could continue my programming on the clearcase plug-in. I am close to an alpha release.

One minor problem I have is that I created 2 access points for the functionality : a menu in the menubar( that one is ok), and a submenu in the context menu of the editor, and in there I have a problem. When you start up, the context menu is OK, but once a selection has been made out of my submenu, the next time you right click -> my submenu has disappeared.

Thus I am tackling this problem for the moment, any ideas are more then welcome ;-)

cheers,
Lieven

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: ClearCase Plug-In
« Reply #12 on: October 30, 2005, 05:19:20 pm »
The correct way is to add a menu item (or a submenu) from the BuildModuleMenu function. You re-create whatever you need every time the menu is popped up this way.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #13 on: October 30, 2005, 05:36:40 pm »
Well that's what I am doing, but it seems not enough.

Okay, while I was pasting the code in here (already removed it again), I saw the problem. I allocated my menu in this function but only when it was not allocated, and doing so I only added the entries .... in the case that ... it was not allocated yet... tssss

stupid stupid stupid ...... me

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #14 on: October 30, 2005, 05:54:38 pm »
You fix 1 thing you break another it seems.

I allocate my wxMenu (for the submenu) now at constructor time, and add it to the context menu during the BuildModuleMenu, but for some reason it is interfering now with the entries in the folding submenu.
And at the second activation it crashes the entire cb.

1) I allocate submenu at constructor, and at BuildModuleMenu I add it to context menu and add also all the entries in my submenu -------> second time context menu is shown both folding and my menu have the entries of both submenus, and crash
2) I allocate submenu at constructor and already add all it's entries, at BuildModuleMenu I add the submenu itself to the context menu ---> second time context menu is shown both folding and my menu have the entries of the folding menu, and crash


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: ClearCase Plug-In
« Reply #15 on: October 30, 2005, 06:44:40 pm »
I allocate my wxMenu (for the submenu) now at constructor time
Not good. When the popup menu is closed, your wxMenu is freed. Allocate inside BuildModuleMenu.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #16 on: October 30, 2005, 06:51:12 pm »
So that means that if you allocate a submenu, you don't need to free/delete it in case of the "context menu", this is done automatically ??

Does this also apply for submenus generated in an exisisting menu (for example a submenu one has created and addedt to let's say the "Edit" menu ??

Trying out your hint right now.

Thanks,
lieven
« Last Edit: October 30, 2005, 06:54:03 pm by killerbot »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #17 on: October 30, 2005, 07:08:26 pm »
Thanks Thomas,

It works. Good to know this, since it is a bit surprising that you loose ownership.

It is strange that I did not get a crash when I close cb, since in my destructor I checked my 'sub'menu pointer, and if it is still != NULL I delete it. So taking into account your words, I would have been a second delete.

This whole stuff might be dangerous, since I allocate (in my dll), it get's freed in another dll/exe I guess, the application in charge of the menu ?? What if both are build differently, release build <---> debug build. I know for example in M$ Dev Studio, one had to make sure alloc/free had to originate from the same flavour(debug,release, single/multi-thread).

As I see it here, this danger is lurking at us.

I think it would have been better that the Append/Insert/Prepend of a submenu would have been done by a pointer pointer, in that way you could check on the 'pointer' to be NULL or not, so if it got allocated by someone else they could have set the value of the pointer to NULL, and one could check through *pointerpointer. Pff, always suspicous for memory leaks. :?

Or event better, if you want to append a (sub)menu, wx could create it on the inside, then ownership did not have to be transfered, and alloc/free could happen in the same environment. And you could get a handle back for adding the entries.

But these are wx issued not cb's.


kind regards,
Lieven

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: ClearCase Plug-In
« Reply #18 on: October 30, 2005, 07:53:10 pm »
So that means that if you allocate a submenu, you don't need to free/delete it in case of the "context menu", this is done automatically ??
Never delete anything that you pass to a wxWidgets GUI container (and your menu is passed to wxWidgets in the end, obviously).
This is not only unnecessary, it is detrimental, because the same object may be freed twice, which is an undefined operation.

Edit:
In almost every case, you can pass an object to wxWidgets, and it will make silently a copy for its own. There are very few exceptions (and unluckily, I don't remember them). That way, you have your object on the stack and don't need to care about allocation anyway, when it goes out of scope, it's gone.
« Last Edit: October 30, 2005, 07:56:05 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: ClearCase Plug-In
« Reply #19 on: October 31, 2005, 01:07:54 am »
This is not only unnecessary, it is detrimental, because the same object may be freed twice, which is an undefined operation.

Yeah. We've had MANY crashing problems with Codeblocks because of objects deleted twice. Have to be VERY VERY careful there.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #20 on: November 04, 2005, 03:26:06 pm »
Dear all,

The first beta of my ClearCase plug-in is available (see attachment).
If you don't know what ClearCase is, you probably don't need it (well you might but then you need to buy ClearCase first which is expensive).


OS/Evironment :
Windows (peferrably XP), sorry linux guys
Code::Blocks RC2
ClearCase (only been tested with snapshot views)

Install :
---------
1) copy the ClearCase.zip from the ClearCaseProject.zip to <CodeBlocks-instal-dir>\share\CodeBlocks
2) copy the clearcase.dll from the ClearCaseProject.zip to <CodeBlocks-instal-dir>\share\CodeBlocks\plugins
3) make sure the bin directory of clearcase is in your path (this is normally the case when you installed ClearCase)

Usage:
---------
- ClearCase functionality is available from the ClearCase menu (top menu bar, next to the Help menu) and when right clicking in the editor (submenu ClearCase)

- you can checkout/checkin/undo checkout a file (the current editor file), watch the version tree of that file, compare it with it's previous version, update it

- view the config spec of your view, update the view

- browse labels and branches in the current vob (determined for the moment on the current open file) (NOTE : in the next beta if no file is open it will be determined based upon the path of the project)

- Find your checkouts

- Start the ClearCase exporer and the Apply Label wizard

During checkout/check-in a dialog box will pop up allowing you to specify comments for your operation, and for an undo checkout out you can specify to have a keep version.
Several commands will provide feedback on the operation (sometimes together with some debug info) in the newly created ClearCase tab in the Messages panel.


The attached zip file also contains the source code, though it needs a clean up, some debug info is still visible. But tomorrow I am leaving for Las Vegas for the c++ devconnections and I wanted to have the first beta out. Second beta will be cleaned up, a tutorial for plug-in writing will be derived from it and some more functionality will be added.



I hope you enjoy it.

kind regards,
Lieven

[attachment deleted by admin]

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: ClearCase Plug-In
« Reply #21 on: November 04, 2005, 03:51:09 pm »
Although I have no use for it, thanks a lot for the contribution Lieven :)
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #22 on: July 07, 2008, 01:21:39 pm »
Dear All,

I have finally updated the plug-in :

* CB 8.02 or later compatible
* extra commands (also on project tree level)
* branching (to killerbot's project structure ;-) )
* advanced labeling (to killerbot's project structure ;-) )
* things I am forgetting

NOTE : drop the .zip extension first (added to be able to attach to this post)

Enjoy

[attachment deleted by admin]

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: ClearCase Plug-In
« Reply #23 on: July 08, 2008, 10:46:12 pm »
Hi killerbot

Is it possible to get src? I would like try to build it with with latest CB ver...

Thanks a lot :-)

Offline coder

  • Single posting newcomer
  • *
  • Posts: 4
Re: ClearCase Plug-In
« Reply #24 on: July 10, 2008, 08:25:34 pm »
too late  :), i have added basic clearcase calls (check in, check out, version tree, compare .....) to the "Tools" menu.
In attach my default.conf (located in the "C:\Documents and Settings\username\Application Data\codeblocks\")
in the <tools> tag you will see all CC stuff.


[attachment deleted by admin]

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: ClearCase Plug-In
« Reply #25 on: July 14, 2008, 12:34:13 pm »
Yes, I know this way.
But it will be nice
1. To see status of files under ClearCase from project manager
2. To have customised set of commands in menu according to a file status (checked in/out / private)
3. There is no way to have a complex structure in the tools menu...

So it's still actual target to develop the CC plugin :-)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #26 on: July 14, 2008, 12:42:52 pm »
1. To see status of files under ClearCase from project manager
Do you mean by different icons ?? That's (currently ) not so easy :-(


2. To have customised set of commands in menu according to a file status (checked in/out / private)

I have implemented this once, but it gave serious issues, hanging CB. I will try it again coming weeks, maybe I can fix it now.

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: ClearCase Plug-In
« Reply #27 on: July 14, 2008, 01:00:14 pm »
to killerbot
You are right
And with the CC plugin it is still possible, but with the Tools menu - not :-)

A space to enchancement is another reason to see the sources! ;-)

vince

  • Guest
Re: ClearCase Plug-In
« Reply #28 on: November 24, 2010, 02:38:30 pm »
Hi killerbot,
Your plugin looks excellent!
Can you tell me where can I find the file ClearCaseProject.zip?
It's not attached to the post.
Thanks,
Vince

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: ClearCase Plug-In
« Reply #29 on: November 24, 2010, 03:04:27 pm »
Hi killerbot,
Your plugin looks excellent!
Can you tell me where can I find the file ClearCaseProject.zip?
It's not attached to the post.
Thanks,
Vince
send me your email address, I will look up the zip file this weekend on my computers and will email it to you.
Might be the plug-in needs to be recompiled, due to all the changes in CB. IF needed I will do that to, but then it might take a little bit longer ...