Predicate expression in Conditional Edge Style Description [message #1239465] |
Tue, 04 February 2014 04:07  |
Eclipse User |
|
|
|
Hello,
I tried to color an edge depending on data of the model element.
With the Model Request Interpreter I can use the term: [self.target.toString().contains('xxx')/],
but when I try to use this term as a predicate expression, then I get the message
!ENTRY org.eclipse.acceleo.parser 4 0 2014-02-04 09:58:41.441
!MESSAGE Compilation error for expression [self.target.toString().contains('xxx')/] : Unrecognized variable: (target)
So how is it possible to access the model content for this purpose?
Thanks, Martin
|
|
|
Re: Predicate expression in Conditional Edge Style Description [message #1239578 is a reply to message #1239465] |
Tue, 04 February 2014 09:18   |
Eclipse User |
|
|
|
Hello,
Is the active editor, when you wrote the expression [self.target.toString().contains('xxx')/] on the Model Request Interpreter, a diagramme with a selected edge? In that case, the selected element is not your semantic element but the graphical element (DEdge). In that case, your expression works because "target" is the reference to the semantic element (See DSemanticDecorator.target in the metamodel). Therefore, if you want to use your expression on a semantic element, or in your Viewpoint Specification Model (odesign), you should remove the "target" reference.
Regards,
Steve
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05653 seconds