Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366185

Summary: The interpreter does not always register all the necessary metamodel uris
Product: [Modeling] Acceleo Reporter: Stephane Begaudeau <stephane.begaudeau>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 365558    

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