Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Incomplete EPackage from ecore file
Incomplete EPackage from ecore file [message #1861705] Mon, 30 October 2023 08:50 Go to previous message
Máté Földiák is currently offline Máté FöldiákFriend
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é
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Models partially loaded with jUnit
Goto Forum:
  


Current Time: Sat Nov 11 09:26:34 GMT 2023

Powered by FUDForum. Page generated in 0.01903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top