eclipse / epsilon

Epsilon is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML (including Cameo/MagicDraw), Simulink, XML and other types of models.
https://eclipse.org/epsilon
Eclipse Public License 2.0
66 stars 10 forks source link

Issue with EMF supertypes in Picto #69

Closed arcanefoam closed 8 months ago

arcanefoam commented 9 months ago

I have two metamodels MMA and MMB. MMB extends all EClasses in MMA (MMB is a wrapper for MMA). I have a generic Picto egl->graphviz template that uses dynamic EMF to draw a containment hierarchy tree of models. When loading models that conform to MMA or MMB the tree is not being built.

The issue is that eObject.eClass.eAllReferences is retruning emtpy for the root element of each model. However, in MMA this should be 4 and in MMB 5 EReferences. I added the statement self.eClass.eSuperTypes.size().println("sts: ") to the template and it produces unexpected results (Epsilon console):

My gut feeling is that it is a caching issue and/or the way the java property getter resolves the methods.

I have added a MWE with three projects. Two with the metamodels (ca.mcmaster.workbench.deep.dsl and ca.mcmaster.workbench.fgm.deep) and one with the models and picto files. To reproduce load the metamodels in a ws and the models in a nested ws.

I also added a junit test that checks the eclass supertypes and eAllReferences sizes that shows that Epsilon is acting up.

arcanefoam commented 8 months ago

Not actually a bug, just an issue with my implemetation