Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » List of all EClasses
List of all EClasses [message #1444037] Mon, 13 October 2014 15:01 Go to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
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 17:15 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
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 08:01 Go to previous message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
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: Fri Apr 26 04:51:03 GMT 2024

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

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

Back to the top