Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » how to read contents from .genmodel(ecore) using EGL
how to read contents from .genmodel(ecore) using EGL [message #719363] Fri, 26 August 2011 16:08 Go to next message
vrm  is currently offline vrm
Messages: 31
Registered: June 2011
Member

I have .genmodel loaded into my egl template but not able to fetch in contents.
What should be syntax to read the attributes from the .genmodel.For instance,generating all the genPackages from the .genmodel.The below code seem to be wrong and gives be a java.lang.NullPointerException when executed.

[%
for(a in Class.allInstances)
out.println(a);
%]
Re: how to read contents from .genmodel(ecore) using EGL [message #722914 is a reply to message #719363] Wed, 07 September 2011 03:50 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Vrm,

Class isn't a valid type in the GenModel metamodel. Did you perhaps mean GenClass.allInstances?

By the way, Epsilon provides the EPackage Registry view, which allows browsing of all registered metamodels. It's very handy for seeing which types are defined by which metamodels. You can the EPackage Registry view by clicking Window > Show View > Other... and then typing EPackage Registry in the filter box. Click Ok, and then hit the refresh button (the two yellow arrows) in the resulting view.

Here's a screenshot of the EPackage Registry view showing all of the types in the GenModel metamodel.

index.php/fa/3891/0/

Cheers,
Louis.
Previous Topic:HUTN load multiple metamodels
Next Topic:loading templates from another package
Goto Forum:
  


Current Time: Thu Aug 21 12:07:50 EDT 2014

Powered by FUDForum. Page generated in 0.03985 seconds