Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Getting errors when invoking sortedBy (Does sortedBy work with expressions that are invokation to a custom query that retrieves a tagged value from a stereotype?)
[Acceleo] Getting errors when invoking sortedBy [message #898902] Sat, 28 July 2012 23:26 Go to previous message
Tomas Balderas is currently offline Tomas Balderas
Messages: 46
Registered: July 2010
Member
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
 
Read Message
Read Message
Read Message
Previous Topic:[Acceleo] how to create a compiler with xtext and Acceleo ?
Next Topic:XPand2 / MWE: Load file for XPand generator from outside the Java classpath?
Goto Forum:
  


Current Time: Fri May 24 13:05:58 EDT 2013

Powered by FUDForum. Page generated in 0.02466 seconds