diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/xtext/ecoreInference/EClassifierInfos.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/xtext/ecoreInference/EClassifierInfos.java index 274471fbc..257a73982 100755 --- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/xtext/ecoreInference/EClassifierInfos.java +++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/xtext/ecoreInference/EClassifierInfos.java @@ -15,9 +15,12 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.xtext.AbstractMetamodelDeclaration; import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.Grammar; @@ -188,7 +191,21 @@ public class EClassifierInfos { public List getSuperTypeInfos(EClassInfo subTypeInfo) throws UnexpectedClassInfoException { List result = new ArrayList(); - for (EClass superType : subTypeInfo.getEClass().getESuperTypes()) { + List superTypes = subTypeInfo.getEClass().getESuperTypes(); + for (int i = 0; i < superTypes.size(); i++) { + EClass superType = superTypes.get(i); + if (superType.eIsProxy()) { + URI proxyURI = EcoreUtil.getURI(superType); + if (proxyURI.isPlatformResource()) { + String platformString = proxyURI.toPlatformString(true); + URI platformPluginURI = URI.createPlatformPluginURI(platformString, true).appendFragment(proxyURI.fragment()); + EObject secondAttempt = subTypeInfo.getEClass().eResource().getResourceSet().getEObject(platformPluginURI, true); + if (secondAttempt instanceof EClass) { + superType = (EClass) secondAttempt; + superTypes.set(i, superType); + } + } + } EClassifierInfo info = getInfoOrNull(superType); if (info != null) { if (info instanceof EClassInfo) {