<div class="gmail_quote">On Mon, Aug 15, 2011 at 5:05 PM, Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 13.08.11 08:53:57, Tim Climis wrote:<br>
> I was trying to find out about writing kdevelop language plugins this morning,<br>
> to find out just how involved it might be. All I found was a suggestion on the<br>
> KDE Forums that someone ask here. Checking the archives, it looks like it was<br>
> never followed up on.<br>
><br>
> So, I'm wondering how complicated it is to write a language plug-in. Can I<br>
> get an overview of what's involved? Is there documentation someplace? (I'm<br>
> thinking about one for ColdFusion, which I use at work, and for which there is<br>
> no good IDE at all)<br>
<br>
</div>The interesting classes are<br>
<a href="http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/interfaces/html/classKDevelop_1_1ILanguage.html" target="_blank">http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/interfaces/html/classKDevelop_1_1ILanguage.html</a><br>
and basically anything in the language library:<br>
<a href="http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/language/html/index.html" target="_blank">http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/language/html/index.html</a><br>
<br>
There's a chapter about the design and usage of the so-called DUChain<br>
which is how a language plugin reports the structure of a file to the<br>
infrastructure. Based on that information the context browser, quickopen<br>
and navigation work.<br>
<br>
To get that information you'll need to write or find some kind of parser<br>
for your language and create instances of the various DUChain classes.<br>
<br>
There's some generic docs about plugins in<br>
<a href="http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/interfaces/html/classKDevelop_1_1IPlugin.html" target="_blank">http://api.kde.org/extragear-api/kdevelop-apidocs/kdevplatform/interfaces/html/classKDevelop_1_1IPlugin.html</a><br>
but its probably easiest to start from one of the smaller existing<br>
plugins, like the konsole view.<br>
<br>
I guess for an example language plugin the cmake one or the ruby one<br>
might be easiest to understand since they only have a small amount of<br>
duchain-related code afaik. The most extensive example is of course the<br>
C++ one but it is not really easy to understand for beginners.<br>
<font color="#888888"><br>
Andreas<br>
</font><div><div></div><div class="h5"><br>
<br>
--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br><div>An example of a standard (non-language) plugin can be found in kdeexamples: <a href="https://projects.kde.org/projects/kde/kdeexamples">https://projects.kde.org/projects/kde/kdeexamples</a></div>
<div><br></div><div>It's not a language plugin but can give an idea about how to get started.</div><div><br></div><div>Aleix</div>