Page 1 of 1

Where are docs for writing plugins

Posted: Fri Mar 19, 2010 5:26 am
by evstevemd
CodeLite should be the best IDE there :D
So, where is the docs for writting plugins? I always dream to make helpfile plugin and I think it will be high time for me to do it!

Re: Where are docs for writing plugins

Posted: Fri Mar 19, 2010 9:33 am
by eranif
Actually there are no docs.

To write a plugin is pretty simple and I will describe it here:

1) Download codelite sources, open the workspace 'LiteEditor.workspace' and compile it.
2) Next (still in codelite workspace) select from the menu: Plugins -> Gizmos -> Create New C++ Plugin
3) Follow the wizard question (3 questions in total), when you are asked to provide the path to codelite sources, simply point it to the base path of codelite sources
4) Click OK, and you will have a new project with the provided name.

Now, you got your first plugin created right click it and compile it.

The template files created for you contains many comments which explains what to do in each method.
The main plugin class inherits from IPlugin and implements various API methods.

Each plugin can connect itself to the any codelite event as described in the file 'plugin.h'

But the best way to learn how to write a plugin is by looking at other plugins code (after you created your template ofc)

Eran

Re: Where are docs for writing plugins

Posted: Sat Mar 20, 2010 2:39 am
by evstevemd
Cool,
I will give it a go!

Re: Where are docs for writing plugins

Posted: Mon Mar 22, 2010 7:22 pm
by evstevemd
I went ahead and tried!
First The Linker path was wrong (I use SVN version, three or four days ago version). Also there is wxlibgrid... I don't remember well which is no where to be found in SDK libs and wxLibs. I removed it in linker and compiled fine. I droped DLL in Codelite/plugins DIR and restarted Codelite. Went to manage plugins and it is not there. I Just want to get feeling of how it looks like.

Enough of explanation. How do I create A MessageBox and Add menu/Toolbar/whatever shortcut and once clicked will show it? How does plugin communicate with CL?

Thanks

Re: Where are docs for writing plugins

Posted: Mon Mar 22, 2010 8:17 pm
by eranif
evstevemd wrote:Also there is wxlibgrid... I don't remember well which is no where to be found in SDK libs and wxLibs. I removed it in linker and compiled fine.
Thanks, I will remove it from the templates, since it was removed from codelite source tree a while ago
evstevemd wrote:How do I create A MessageBox and Add menu/Toolbar/whatever shortcut and once clicked will show it?
Follow the code in Subversion plugin.
Especially look at the source 'subversion2.cpp'

- The constructor
- The method: CreatePluginMenu

Eran

Re: Where are docs for writing plugins

Posted: Mon Mar 22, 2010 8:47 pm
by evstevemd
Thanks I will check.
But when I compiled the project without changing anything, it won't listed in plugin manager. May I know why?

Re: Where are docs for writing plugins

Posted: Mon Mar 22, 2010 9:00 pm
by jfouche
Look at the trace tab : it probably shows you that it's not the good plugin version. Be sure to run your plugin in the same version of the CL youo build.

Re: Where are docs for writing plugins

Posted: Mon May 10, 2010 9:34 pm
by coder99
Any progress on this evstevemd?

The idea/problem of help file creation is something that has been going through my head recently as well.