Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Accessing elements in the ecore model(Cannot access elements in ecore model from EGL template)
Accessing elements in the ecore model [message #697610] Sun, 17 July 2011 08:04 Go to next message
vrm  is currently offline vrm
Messages: 31
Registered: June 2011
Member
I'm very new with EGL and have started to use it.I'm writing a sample script to iterate over my metamodel and print the classes in my ecore metamodel.I tried using the code below as shown from the epsilon doc but i get an error "Type 'Class' not found ".

[% for(file in Class.allInstances){ %]
value is : [%=file%]
[%}%]

Any suggestions/pointers would be highly appreciated.

Re: Accessing elements in the ecore model [message #697617 is a reply to message #697610] Sun, 17 July 2011 09:01 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 838
Registered: July 2009
Senior Member
Hi,

In Ecore, the name for a class is EClass so you should try EClass.all instead.

Cheers,
Dimitris
Re: Accessing elements in the ecore model [message #697620 is a reply to message #697617] Sun, 17 July 2011 09:10 Go to previous messageGo to next message
vrm  is currently offline vrm
Messages: 31
Registered: June 2011
Member
No luck , I get the error "Type 'EClass' not found (C:\Users\Dom\workspace\testEMFforEGL\test.egl@1:12)"

Do you have any sample code that I could run against my model to print the elements ?
That would be really helpful.My EMF test model comprises of just a few EClasses and some EReferences between them
Re: Accessing elements in the ecore model [message #697621 is a reply to message #697620] Sun, 17 July 2011 09:16 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 838
Registered: July 2009
Senior Member
Hi,

Have you added your Ecore metamodel to the Models tab in the launch configuration? If you've already done this, could you please put together a minimal example (http://eclipse.org/gmt/epsilon/doc/articles/minimal-examples/) and send it to us at epsilon.devs gmail com for further investigation?

Cheers,
Dimitris
Re: Accessing elements in the ecore model [message #697629 is a reply to message #697621] Sun, 17 July 2011 10:04 Go to previous message
vrm  is currently offline vrm
Messages: 31
Registered: June 2011
Member
Thanks,got it working now.I missed to add the model.
Previous Topic:Eugenia won't install (easily) in Indigo because Indigo does not include GMF SDK
Next Topic:Phantom nodes that are not targeted by a link mapping representing containment reference present in
Goto Forum:
  


Current Time: Thu Aug 28 03:13:58 EDT 2014

Powered by FUDForum. Page generated in 0.02208 seconds