Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

ClearCase Plug-In

(1/6) > >>

killerbot:
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

mandrav:

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

--- End quote ---

Check the documentation for wxExecute...

killerbot:
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

mandrav:

--- 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 ??
--- End quote ---
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.
--- End quote ---
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
--- End quote ---
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.

killerbot:
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

Navigation

[0] Message Index

[#] Next page

Go to full version