Hello.
I'm getting "unresolved proxy" errors when trying to execute "ECoreUtils.resolvedAll" on an emf metamodel.
The metamodel is stored in two files:
/path/to/metamodel/file/master.ecore
/path/to/metamodel/file/referenced.ecore
The "master" file references items in the "referenced" file using proxies that look like this:
<eStructuralFeatures xsi:type="ecore:EReference" name="rm" ordered="false" upperBound="-1"
eType="ecore:EClass referenced.ecore#//ReferencedModel" containment="true"/>
The calls that are being used to load and resolve the "master" file are as follows:
(This code is from "
https://github.com/atlanmod/mondo-atlzoo-benchmark/blob/master/fr.inria.atlanmod.instantiator/src/fr/inria/atlanmod/instantiator/Launcher.java")
--------------------------------
String metamodel = commandLine.getOptionValue(METAMODEL);
Resource metamodelResource = new XMIResourceImpl(URI.createFileURI(metamodel));
metamodelResource.load(Collections.emptyMap());
EcoreUtil.resolveAll(metamodelResource);
--------------------------------
For each proxy in the master.ecore file, the "EcoreUtil.resolveAll()" call
results in the following 4 error messages. There are 13 such proxies, so 52 error message in total:
--------------------------------
Aug 12, 2020 12:22:21 PM fr.inria.atlanmod.instantiator.Launcher main
SEVERE: The feature 'eType' of
'org.eclipse.emf.ecore.impl.EReferenceImpl@6293abcc{file:/path/to/metamodel/file/master.ecore#//MasterModel/rm}' contains an unresolved proxy 'org.eclipse.emf.ecore.impl.EClassImpl@794cb805{file:/path/to/metamodel/file/referenced.ecore#//ReferencedModel}'
Aug 12, 2020 12:22:21 PM fr.inria.atlanmod.instantiator.Launcher main
SEVERE: The feature 'eReferenceType' of
'org.eclipse.emf.ecore.impl.EReferenceImpl@6293abcc{file:/path/to/metamodel/file/master.ecore#//MasterModel/rm}' contains an unresolved proxy 'org.eclipse.emf.ecore.impl.EClassImpl@794cb805{file:/path/to/metamodel/file/referenced.ecore#//ReferencedModel}'
Aug 12, 2020 12:22:21 PM fr.inria.atlanmod.instantiator.Launcher main
SEVERE: The feature 'eRawType' of
'org.eclipse.emf.ecore.impl.EGenericTypeImpl@4b5a5ed1{file:/path/to/metamodel/file/master.ecore#//MasterModel/rm/@eGenericType}' contains an unresolved proxy 'org.eclipse.emf.ecore.impl.EClassImpl@794cb805{file:/path/to/metamodel/file/referenced.ecore#//ReferencedModel}'
Aug 12, 2020 12:22:21 PM fr.inria.atlanmod.instantiator.Launcher main
SEVERE: The feature 'eClassifier' of
'org.eclipse.emf.ecore.impl.EGenericTypeImpl@4b5a5ed1{file:/path/to/metamodel/file/master.ecore#//MasterModel/rm/@eGenericType}' contains an unresolved proxy 'org.eclipse.emf.ecore.impl.EClassImpl@794cb805{file:/path/to/metamodel/file/referenced.ecore#//ReferencedModel}'
--------------------------------
Note that the URL to the "referenced.ecore" file i.e. "file:/path/to/metamodel/file/referenced.ecore" in the error messages is correct.What function/method calls are needed to get these proxies to resolve in the call to "EcoreUtil.resolveAll()"?
Thanks
-- Harmon