Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Get all EClasses of a model
Get all EClasses of a model [message #1152813] Thu, 24 October 2013 07:28 Go to next message
Thomas Wilhelm is currently offline Thomas WilhelmFriend
Messages: 28
Registered: September 2013
Junior Member
Hey all,

i have a propably easy question: How can i get all EClasses which are available in my model? I googeled and tried a lot, but acutally cant find a proper solution. Via my EPackage i can get all EClassifiers, but how to get from this classifiers to my EClasses? Or is there a complete other way?
Thanks for all hints and answers in advance,

have a good day,

Thomas

[Updated on: Thu, 24 October 2013 07:29]

Report message to a moderator

Re: Get all EClasses of a model [message #1152869 is a reply to message #1152813] Thu, 24 October 2013 08:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Thomas,

You test each EClassifier in ePackage.getEClassifiers() to see if it's
an instance of EClass.


On 24/10/2013 9:28 AM, Thomas Wilhelm wrote:
> Hey all,
>
> i have a propably easy question: How can i get all EClasses which are
> available in my model? I googeled and tried a lot, but acutally cant
> find a proper solution. Via my EPackage i can get all EClassifiers,
> but how to get my generated classes from this classifiers? Or is there
> a complete other way? Thanks for all hints and answers in advance,
>
> have a good day,
>
> Thomas


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Get all EClasses of a model [message #1152902 is a reply to message #1152869] Thu, 24 October 2013 08:43 Go to previous message
Thomas Wilhelm is currently offline Thomas WilhelmFriend
Messages: 28
Registered: September 2013
Junior Member
Hey Ed,

thanks for your reply. I did what you mentioned and it worked. Thanks for that. I thought there is maybe a more simple way to get this information, e.g. ECoreUtil.getAllClasses() or EPackage#getAllClasses(), respectively EPackage#getAllEnums.

Thanks a lot for your help,

Thomas
Previous Topic:IllegalArgumentException: feature not found in EClass
Next Topic:[TEXO] OrderBy for OneToMany
Goto Forum:
  


Current Time: Thu Mar 28 15:10:33 GMT 2024

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

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

Back to the top