Creating Language Plugin not used for new language

Roland Plüss roland at
Mon Aug 13 17:49:40 BST 2018

I went now ahead with the DeclarationBuilder stuff. It seems to help
with classes showing up. There are still problems I don't know where I
need to come from to solve them.

1) Class context collapsing not working
In the open file the identifiers of classes are now colored and a
roll-over does show. I though do not get the collapsing support of the
class body although I set up the context with a range spawning the
entire body. Am I missing something? I have now ParseJob,
ContextBuilder, DeclarationBuilder, HilighterInstance.

2) Base class is not colored
I see in the roll-over that the class knows the base class and can jump
to the declaration in the same file. The identifier of the base class is
though not colored. Do I need to use something else to get this colored?
It is recognized but not colored

3) Namespace context reusing
My language allows to define a namespace in multiple files. This means
the namespace context has to be reused in different source files but
with multiple RangeInRevision (one for each file). I fail to see how I
can do this. I've seen openContext(DUContext*) and
injectContext(DUContext*) but using them causes KDevelop to segfault so
I assume I'm doing something wrong. In general though I don't get how
this is supposed to work. It's clear to me a context is attached to a
AstNode (setInternalContext) but I don't see how I can add a new
RangeInRevision to a previous ClassDeclaration I've found (especially
without segfaulting).

Some pointers would be nice. I seem to get somewhere but it's fighting
left and right.

On 08/11/2018 03:23 PM, Sven Brauch wrote:
> On Saturday, 11 August 2018 15:18:04 CEST Roland Plüss wrote:
>> No, this one is not implemented so far. That would explain the
>> highlighting but why does the DUChain not show up for example in the
>> class outline panel?
> I don't know, do you create class types which are attached to class 
> declarations ...?
> Greetings,
> Sven

Mit freundlichen Grüssen
Plüss Roland

Leader und Head Programmer
- Game: Epsylon ( )
- Game Engine: Drag[en]gine (
, )
- Sowie verschiedene Blender Export-Skripts und Game-Tools

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the KDevelop-devel mailing list