Community
Participate
Working Groups
After installing M6, the rebuild gives me errors The old code was (in CVS at org.eclipse.mdt/org.eclipse.ocl/examples/org.eclipse.ocl.examples.build/src/org/eclipse/ocl/examples/build/acceleo/GenerateOCLstdlib.java) @Override public void registerPackages(ResourceSet resourceSet) { super.registerPackages(resourceSet); resourceSet.getPackageRegistry().put(org.eclipse.ocl.examples.pivot.PivotPackage.eINSTANCE.getNsURI(), org.eclipse.ocl.examples.pivot.PivotPackage.eINSTANCE); resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE); // TODO If you need additional package registrations, do them here. The following line is an example for UML. // resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); The erroneous new code is @Override public void registerPackages(ResourceSet resourceSet) { super.registerPackages(resourceSet); if (!isInWorkspace(org.eclipse.emf.ecore.impl.EPackageImpl.class)) { resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.impl.EPackageImpl.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.impl.EPackageImpl.eINSTANCE); } 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); } // TODO If you need additional package registrations, do them here. The following line is an example for UML. // resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); } There is no org.eclipse.emf.ecore.impl.EPackageImpl.eINSTANCE.
I think the problem is that EPackage is refying a dynamic package, so testing for the proxy support fails and is no substitute for installing the dynamic package.
This seems to be a regression with the change of our generators (for the launcher class) from JET to Acceleo. Stéphane, could you take a look at this?
>> I think the problem is that EPackage is refying a dynamic package It is indeed a bug that appears with dynamic packages. After a quick glance at the code, I have checked and this bug was already here, it is not relative to the switch from JET to Acceleo for the generation of the Java launcher. Previously with dynamic model, we didn't register anything, now we try to register "org.eclipse.emf.ecore.impl.EPackageImpl.eINSTANCE" which does not exists. I have restored the previous behavior.
*** Bug 340753 has been marked as a duplicate of this bug. ***
Acceleo 3.1.0M6a, including this fix, is now available from the milestones update site.