Where are docs for writing plugins

Discussion about CodeLite development process and patches
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Where are docs for writing plugins

Post 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!

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Where are docs for writing plugins

Post 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
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Where are docs for writing plugins

Post by evstevemd »

Cool,
I will give it a go!

CodeLite 15.x
CodeLite is awesome, I just Love it!

evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Where are docs for writing plugins

Post 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

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Where are docs for writing plugins

Post 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
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Where are docs for writing plugins

Post 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?

CodeLite 15.x
CodeLite is awesome, I just Love it!

jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Where are docs for writing plugins

Post 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.
Jérémie
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: Where are docs for writing plugins

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

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

Post Reply