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

Bug 340814

Summary: M6 generates inappropriate reference to XXXXPackageImpl.eINSTANCE
Product: [Modeling] Acceleo Reporter: Ed Willink <ed>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: stephane.begaudeau
Version: 3.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

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.