Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340814 - M6 generates inappropriate reference to XXXXPackageImpl.eINSTANCE
Summary: M6 generates inappropriate reference to XXXXPackageImpl.eINSTANCE
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows Vista
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 17:32 EDT by Ed Willink CLA
Modified: 2011-03-24 09:29 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-03-23 17:32:52 EDT
The generated registerPackages contains

if (!isInWorkspace(org.eclipse.emf.ecore.impl.EcorePackageImpl.class)) {
            resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.impl.EcorePackageImpl.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.impl.EcorePackageImpl.eINSTANCE);
}

In the case of EcorePackage, this is poor style since eINSTANCE is an EcorePackage field.

More generally this is a bug since the impl package may be internal.
Comment 1 Stephane Begaudeau CLA 2011-03-24 09:29:31 EDT
The generated Java class will now use the interface instead of the "Impl" if we find one.