Skip to main content



      Home
Home » Modeling » EMF » List of all EClasses
List of all EClasses [message #1444037] Mon, 13 October 2014 11:01 Go to next message
Eclipse UserFriend
i'm trying to find out how i can create a list of all EClasses in a model (generated model not the ecore!)

i need this to resolve all possible directions for the classes.

one possibility, which came to my mind is running through the Literals interface, but this seems bruteforce to me.

The Factory should be my starting point, OR one EClass
any hints how i can achieve this are wellcome (in the meantime i try to implement the Bruteforce way.
Re: List of all EClasses [message #1444124 is a reply to message #1444037] Mon, 13 October 2014 13:15 Go to previous messageGo to next message
Eclipse UserFriend
On 13/10/2014 17:01, Ludwig Moser wrote:
> i'm trying to find out how i can create a list of all EClasses in a
> model (generated model not the ecore!)

Where's the difference?

> The Factory should be my starting point, OR one EClass
> any hints how i can achieve this are wellcome (in the meantime i try to
> implement the Bruteforce way.

Did you try MyPackage.eINSTANCE.getEClassifiers(). Attention, these are
EClassifiers, you would need to additionally filter, since you're
interested in EClasses only.
Re: List of all EClasses [message #1444543 is a reply to message #1444124] Tue, 14 October 2014 04:01 Go to previous message
Eclipse UserFriend
i tried
MyFactory.eINSTANCE	.getMyPackage().getEClassifiers();

which resulted in a NPE.

MyPackage.eINSTANCE.getEClassifiers()

this works, and now i can process the EClasses...

Thanks!
Previous Topic:Problems with namespaces when saving EMF model as xml file
Next Topic:Solved: [EMF] [XCore] Generating HTML JavaDoc from generator output
Goto Forum:
  


Current Time: Thu Jun 12 22:14:45 EDT 2025

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

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

Back to the top