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

Bug 221748

Summary: genmodel should remove colliding imports
Product: [Modeling] EMF Reporter: Ed Willink <ed>
Component: ToolsAssignee: Dave Steinberg <davidms>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: Ed.Merks
Version: 2.4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
DEmonstration project none

Description Ed Willink CLA 2008-03-06 16:12:04 EST
Created attachment 91800 [details]
DEmonstration project

Unfortunately MDT OCL provides an org.eclipse.ocl.ecore.EcorePackage, so that when a genmodel is performed that involves both the above and org.eclipse.emf.ecore.EcorePackage a pair of conflicting imports can appear in the generated PackageImpl.

When generating from scratch, genmodel successfully imports only one (the 'right' one) and applies qualification for the other (the 'wrong' one).

When regenerating with the 'wrong' import already present, the 'wrong' import is preserved and the 'right' import added. This gives an import collision error.

The 'wrong' import should be removed.

Attached zipped project is error free, but has the above error post Generate Model.
Comment 1 Ed Merks CLA 2008-03-06 17:17:59 EST
This sounds familiar.

*** This bug has been marked as a duplicate of bug 182692 ***