Help with Language Support Plugin

Jakob Petsovits jpetso at gmx.at
Sat Nov 11 17:18:50 GMT 2006


On Thursday, 9. November 2006 00:16, Michael Uman wrote:
> Hello,
>
> I am trying to implement a new language into KDevelop. My company
> develops DSP chips which use a proprietary assembly language. I would
> like to support the generation of the microcode using the KDevelop IDE.
> We are currently using some other IDEs for their syntax color
> hilighting. I would like to support this in KDevelop and also support a
> project database of symbols for use in a project browser.

Do you want to target version 3 or rather the upcoming version 4 of KDevelop?
(Given the wizard generation hint, I suppose you'll have it for KDevelop 3,
I just want to make sure.)

For KDevelop 3, the best (rather: only) documentation of how to do it is at 
http://kdevelop.org/HEAD/doc/api/html/howToAddProgrammingLanguages.html
which you might want to visit if you didn't find it already.
For KDevelop 4, a few things will be changing in the API, but at least the 
overall structure of a language support plugin will be remotely similar :)

As for syntax highlighting, you need to write a syntax highlighting file for 
KatePart, the text editor component that KDevelop is using.
You can find the currently available highlighting files at 
http://kate-editor.org/downloads/syntax_highlighting?kateversion=2.5
and the documentation on how to do that (for KDE 3's KatePart, I don't know if 
they changed it for KDE 4) is at 
http://kate-editor.org/article/writing_a_kate_highlighting_xml_file

As for a symbol database, this is done by storing the symbols in a CodeModel 
(short description is also on the howToAddProgrammingLanguages page).
If you've got a CodeModel together, you get the project browser for free.
Anyways, you probably won't get around looking at the source of one of the 
supported languages supporting a code model.

Hope that helps a bit.
If not, maybe someone else on the list has some good advice too :)

Regards,
  Jakob

by the way, with questions of developing rather than using KDevelop, you're 
better off mailing the kdevelop-devel list instead of the plain kdevelop one. 
There are way more knowledgable people around there.




More information about the KDevelop mailing list