[Acceleo] Getting errors when invoking sortedBy [message #898902] |
Sun, 29 July 2012 03:26 |
|
In the following code operandIndex() is a query that retrieves the value of a tagged attribute from the stereotype extending an instance of the metaclass InputPin:
[anOpaqueAction.input->asSequence()->sortedBy(operandIndex())/];
This code does not produce any error and generates some text with internal information about the objects for the input pins of the receiving object anOpaqueAction. However, when I use the sorted list as the receiver of a template (any template, including an empty one), I get errors. This is the code:
[anOpaqueAction.input->asSequence()->sortedBy(operandIndex())->generateExpression('&')/];[/for]
...
[template public generateExpression(aSequence: Sequence(InputPin), anOperator: String)]
[/template]
The errors are as follows:
Operation operandIndex() is undefined on type org.eclipse.uml2.uml.internal.impl.InputPinImpl.
Undefined argument anOpaqueAction.input->asSequence()->sortedBy(temp1 : InputPin | temp1.operandIndex()) of invocation at line 0 in Module generateArchitectureStatementPart for block generateExpression(anOpaqueAction.input->asSequence()->sortedBy(temp1 : InputPin | temp1.operandIndex()),'&'). Last recorded value of self was org.eclipse.uml2.uml.internal.impl.OpaqueActionImpl@6e833131 (name: merge, visibility: <unset>) (isLeaf: false) (body: null, language: null). Problem found while generating the file ...
What am I doing wrong?
Thanks
/TB
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03276 seconds