Skip to main content


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 12:04 Go to next message
vrm  is currently offline vrm Friend
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 13:01 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
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 13:10 Go to previous messageGo to next message
vrm  is currently offline vrm Friend
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 13:16 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
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 14:04 Go to previous message
vrm  is currently offline vrm Friend
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: Fri Apr 19 08:36:22 GMT 2024

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

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

Back to the top