Community
Participate
Working Groups
Build Identifier: M20110204-1030 Using the UML EMF model, there is code in GMF that tests that some UML Element's EClass has a super type of EObject. e.g. EClass type = <EObject EClass> EClass newType = <Some UML Element Eclass> The expression: type.isSuperTypeOf(newClass) Should return true, and did in IES 3.4 using org.eclipse.emf.ecore_2.4.2.v200902171115 However, somewhere along the line, something changed such that the above expression now returns false. e.g. IES 3.6.2 using org.eclipse.emf.ecore_2.6.1.v20100914-1218 This is because newClass.getEAllSuperTypes() now returns the list of super EClasses, stopping at EModelElement. The EObject EClass is no longer returned in the list of super types as it was in the previous version. This bug has become very obvious during import operations where the EObjectUtil.metamorphoses(...) API is used. Reproducible: Always Steps to Reproduce: Call getAllESuperTypes on an EClass object. E.g. in a debug session, open the Display View and inspect: org.eclipse.uml2.uml.UMLPackage.Literals.NAMED_ELEMENT.getEAllSuperTypes() The result is the following (note EObject is not included): [org.eclipse.emf.ecore.impl.EClassImpl@17081708 (name: EModelElement) (instanceClassName: null) (abstract: true, interface: false), org.eclipse.emf.ecore.impl.EClassImpl@7b547b54 (name: Element) (instanceClassName: null) (abstract: true, interface: false)]
The explicit inheritance of EModelElement from EObject was eliminated as part of 255469. You'll need to accommodate that change, i.e., just assume that all objects are instances of EObject.