Bug 576446 - EOperation not found without a metamodel dependency
Summary: EOperation not found without a metamodel dependency
Status: NEW
Alias: None
Product: Acceleo
Classification: Modeling
Component: Query Language (show other bugs)
Version: 3.6.0   Edit
Hardware: PC Windows 10
: P3 normal
Target Milestone: ---   Edit
Assignee: Yvan Lussaud CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 479726
Blocks:
  Show dependency tree
 
Reported: 2021-10-05 11:03 EDT by Steve Monnier CLA
Modified: 2021-10-06 09:44 EDT (History)
0 users

See Also:


Attachments
metamodel_sample (246.66 KB, application/x-zip-compressed)
2021-10-06 09:25 EDT, Steve Monnier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Monnier CLA 2021-10-05 11:03:23 EDT
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.
Comment 1 Steve Monnier CLA 2021-10-06 09:25:24 EDT
Created attachment 287265 [details]
metamodel_sample
Comment 2 Steve Monnier CLA 2021-10-06 09:43:33 EDT
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.
Comment 3 Steve Monnier CLA 2021-10-06 09:43:53 EDT
This issue seems similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=479726