Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EGL: How to access the Models list
EGL: How to access the Models list [message #1728126] Thu, 31 March 2016 09:33 Go to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 126
Registered: December 2015
Senior Member
Hi,

I want to get the EMF models which are listed in the Models tab (with the same metamodel and more than one) of an EGL file configuration window. Is there any command in EOL to get the mentioned list?

Thanks a lot,
Alireza

[Updated on: Thu, 31 March 2016 09:36]

Report message to a moderator

Re: EGL: How to access the Models list [message #1728131 is a reply to message #1728126] Thu, 31 March 2016 09:45 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1484
Registered: July 2009
Location: York, UK
Senior Member

Hi Alireza,

System.context.modelRepository.models should do the trick.

Cheers,
Dimitris
Re: EGL: How to access the Models list [message #1728132 is a reply to message #1728131] Thu, 31 March 2016 09:48 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 126
Registered: December 2015
Senior Member
Hi Dimitris,

Great. Thank you very much.

Best regards,
Alireza
Re: EGL: How to access the Models list [message #1728133 is a reply to message #1728126] Thu, 31 March 2016 09:48 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 470
Registered: January 2010
Senior Member
You can do something like this by using aliases. If all your models have the same alias (not the same name), you could use YourAlias.models to loop through them:

for (model in YourAlias.models) {
  var resource = model.resource;
  // ...
}


Edit: oops, Dimitris beat me to it. Well, here's another way to do it Smile.

[Updated on: Thu, 31 March 2016 09:49]

Report message to a moderator

Re: EGL: How to access the Models list [message #1728135 is a reply to message #1728133] Thu, 31 March 2016 09:50 Go to previous message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 126
Registered: December 2015
Senior Member
Hi Antonio,

Thank you very much.

Best regards,
Alireza
Previous Topic:[EuGENia]Labels for link
Next Topic:About Extending Metamodels
Goto Forum:
  


Current Time: Mon Nov 20 21:23:58 GMT 2017

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

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