|Unresolved Proxies for EMF Model in EGL [message #1782491]
||Sat, 24 February 2018 15:10
| Eric Domeshek
Registered: October 2016
I'm new to Epsilon. I've been working based on the egldoc EMF example of EGL usage. My situation is that I have an EMF metamodel (originally defined using XCore) and a model1.xmi that contains objects of that metamodel. The model1.xmi refers to some objects in a second model file model2.xmi, also based on the same metamodel.
When I attempt to use EGL on model1, my code fails at points where a model1 object refers to an object defined in the model2 file. By putting in a println() I see there are proxy objects. When I try to access the field I need from those proxy objects, I'm getting back null, so I'm guessing the system is failing to resolve those proxies.
Some notes on things I've tried:
In order to get the code to see my EMF model at all, I've inserted the following before the call to loadModel() in my equivalent of the example's EglDocFacade.java:
In an attempt to make sure my referenced model2 is known to the system, I've tried to add another call to loadModel() in the Facade class for that 2nd model file, hoping it would then end up in the same ResourceSet as model1 and facilitate proxy resolution. That didn't seem to work.
Can you provide guidance as to how I'm supposed to get cross-model proxies to resolve in an EGL program?
For instance, is there a way I can explicitly put the two model files as Resources into a common ResourceSet, pass that ResourceSet into my EGL templates, and then explicitly call EcoreUtil.resolve() in my EGL code where it's needed? That seems like a long way around for something like proxy resolution that is supposed to happen auto-magically, but I'll take it if it gets me past this stuck point.
Thanks for any help you can provide,
Powered by FUDForum
. Page generated in 0.01533 seconds