Plug-in development
Andreas Pakulat
apaku at gmx.de
Mon Aug 15 15:05:06 UTC 2011
On 13.08.11 08:53:57, Tim Climis wrote:
> I was trying to find out about writing kdevelop language plugins this morning,
> to find out just how involved it might be. All I found was a suggestion on the
> KDE Forums that someone ask here. Checking the archives, it looks like it was
> never followed up on.
>
> So, I'm wondering how complicated it is to write a language plug-in. Can I
> get an overview of what's involved? Is there documentation someplace? (I'm
> thinking about one for ColdFusion, which I use at work, and for which there is
> no good IDE at all)
The interesting classes are
http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/interfaces/html/classKDevelop_1_1ILanguage.html
and basically anything in the language library:
http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/language/html/index.html
There's a chapter about the design and usage of the so-called DUChain
which is how a language plugin reports the structure of a file to the
infrastructure. Based on that information the context browser, quickopen
and navigation work.
To get that information you'll need to write or find some kind of parser
for your language and create instances of the various DUChain classes.
There's some generic docs about plugins in
http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/interfaces/html/classKDevelop_1_1IPlugin.html
but its probably easiest to start from one of the smaller existing
plugins, like the konsole view.
I guess for an example language plugin the cmake one or the ruby one
might be easiest to understand since they only have a small amount of
duchain-related code afaik. The most extensive example is of course the
C++ one but it is not really easy to understand for beginners.
Andreas
More information about the KDevelop-devel
mailing list