Skip to main content



      Home
Home » Modeling » Epsilon » EGL template from multiple xmi
EGL template from multiple xmi [message #1582360] Sat, 24 January 2015 10:28 Go to next message
Eclipse UserFriend
I'm using EGL for java code generation. I've my models (xmi) source conforming to an ecore metamodel. Everything work smoothly as long as I use a single xmi source. Unfortunately I need to manipulate more than one source, so a set of xmi-ecore couples. I do register EPackages for both and then add them in my run configuration, but depending on the order only one of them is recognised in my egl files.
Re: EGL template from multiple xmi [message #1582409 is a reply to message #1582360] Sat, 24 January 2015 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi Federico,

Could you please share a minimal example [1] I can use to reproduce this?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: EGL template from multiple xmi [message #1582502 is a reply to message #1582409] Sat, 24 January 2015 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Here is a minimal example. I've two ecore and two xmi. If i look for car in the template it works. If I look for dog it works too. When I look for both I've an error. Only the first inserted model is recognised.
Thanks Dimitris
Re: EGL template from multiple xmi [message #1582533 is a reply to message #1582502] Sat, 24 January 2015 12:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Federico,

Since you have multiple input models, you need to qualify type names using the respective model name (the local name of your model in the Models tab of the run configuration). Assuming that you've named your two models Ma and Mb, your code should look like this:

[% 
  var mycar : Ma!Car := Ma!Car.all.at(0);
  var mydog : Mb!Dog := Mb!Dog.all.at(0);
%]


I've attached a tweaked version of your minimal example.

Cheers,
Dimitris
Re: EGL template from multiple xmi [message #1582612 is a reply to message #1582533] Sat, 24 January 2015 13:51 Go to previous message
Eclipse UserFriend
Perfect! Thank you so much! Smile
Previous Topic:[Flock] Limited error information
Next Topic:[Flock] Model includes references
Goto Forum:
  


Current Time: Tue Oct 28 18:02:58 EDT 2025

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

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

Back to the top