Community
Participate
Working Groups
There seems to be a limitation with EOperations that does not exist with EAttribute when evaluating an AQL expression with the interpreter view. In a Sirius context, you can select a model element from a model editor (the generated one) or from the "Model Explorer" view, and then in the interpreter view evaluate an AQL expression in the context of the selected element. However, when the expression calls an EOperation, it is properly evaluated from the model editor but not from the Model Explorer. In that case when org.eclipse.acceleo.query.runtime.lookup.basic.CacheLookupEngine.lookup(String, IType[]) is looking for the EOperation (seen as a service) it does not find it. Note that if instead of an EOperation, an EAttribute is called, then it works fine. To workaround the EOperation issue, I need to create an odesign where I loaded the metamodel and then activate the viewpoint in the sample modeling project.
Created attachment 287265 [details] metamodel_sample
To reproduce in a Sirius environment: - import the project in attachment to your workspace. - in a runtime, create a sample and select the root element in the Model Explorer view. - in the Interpreter view, set the interpreter to "Sirius", and evaluated "aql:self.forTest()". -> This should not show a warning with a tooltip "Result of type null". - open the model in an editor and select the root element. This time the interpreter displays a proper result.
This issue seems similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=479726