Hi everybody!
I am trying to connect 2 nodes (of the same type) by name.
My EObject looks as follows:
Thing : EObject {
String name;
String type;
EList<String> attachment;
EList<EObject> getAttachmentObjects()
}
attachment is a EList<String> containing the names of other Things.
getAttachmentObjects returns a EList<EObject> of corresponding Things (the targets for the edge).
To visualize it I created a representation with a Node for Thing and a Relation Based Edge with "Source Mapping" and "Target Mapping" = "thingNode".
This works as it should. If i enter a "Target Finder Expression" returning all Things it shows the connections accordingly.
My problem is using the "Target Finder Expression" to call the EOperation getAttachmentObjects of Thing.
It shows up in auto completion when i write the expression like this:
aql:self.getAttachmentObjects()
When debugging it never hits breakpoints in the method though.
If I try the same expression in the Sirius Interpreter it works (I use a Thing as self there). The breakpoints are hit and the output is correct.
So I guess the problem is my understanding of "self" in this context.
I hope someone can point out my mistake
Best Regards