Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366185 - The interpreter does not always register all the necessary metamodel uris
Summary: The interpreter does not always register all the necessary metamodel uris
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 major
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 365558
  Show dependency tree
 
Reported: 2011-12-09 09:19 EST by Stephane Begaudeau CLA
Modified: 2015-05-27 08:56 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Begaudeau CLA 2011-12-09 09:19:44 EST
If I have a metamodel with a variable with a type coming from another metamodel, the interpreter will not use the package of the other metamodel.

The problem is coming from AcceleoSourceViewer#rebuildFullExpression(...):
if (!context.getTargetEObjects().isEmpty()) {
root = EcoreUtil.getRootContainer(context.getTargetEObjects().get(0));
}

It should be:
root = EcoreUtil.getRootContainer(context.getTargetEObjects().get(0).eClass());

Other occurrences of the problem may exists in the AcceleoSourceViewer.

Can be reproduced in 3.2.x and 3.3.0
Comment 1 Stephane Begaudeau CLA 2012-02-22 05:44:00 EST
The problem seems fixed if you use the qualified name of the type each type when this is needed. The proposed fix was stupid by the way, the "correct" approach would be a "resolveAll" on the metamodel.
Comment 2 Laurent Goubet CLA 2015-05-27 08:56:06 EDT
Closing resolved bugs