Incomplete EPackage from ecore file [message #1861705] |
Mon, 30 October 2023 08:50 |
Máté Földiák Messages: 3 Registered: October 2023 |
Junior Member |
|
|
Hi,
I'm working on checking in runtime if a VQL file is syntactically correct given a metamodel.
The problem is that when I parse an ECore metamodel from file, the references and containments are missing.
val ResourceSet resourceSet = new ResourceSetImpl();
EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE)
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(
"ecore", new EcoreResourceFactoryImpl());
val resource = resourceSet.getResource(
URI.createFileURI("res/meta.ecore"), true);
val pkg = resource.contents.get(0) as EPackage
If I run the code above, classifiers and super types are loaded in, but none of the structural features. (eAllReferences, eAllStructuralFeatures and eAllContainments are null.)
Do you have any idea on what is the problem and how to fix it?
Thanks,
Máté
|
|
|