Skip to main content



      Home
Home » Modeling » EMF » Root Class of Ecore model package instance
Root Class of Ecore model package instance [message #638381] Thu, 11 November 2010 01:02 Go to next message
Eclipse UserFriend
Hi,

How to get the root class of the Model package instance ? Is there any API for that ?

Best Regards,
Vaibhav
Re: Root Class of Ecore model package instance [message #638395 is a reply to message #638381] Thu, 11 November 2010 02:49 Go to previous messageGo to next message
Eclipse UserFriend
On 11.11.10 07.02, vaibhav wrote:
>
> How to get the root class of the Model package instance ? Is there any
> API for that ?

What do you mean by "root" class. A class at the root of an inheritance
tree (i.e. the super-most class) or a containment tree (i.e. a class not
contained in anything but itself)? In any case, I think you'll have to
do a topological sort yourself.

Hallvard
Re: Root Class of Ecore model package instance [message #638461 is a reply to message #638381] Thu, 11 November 2010 06:47 Go to previous message
Eclipse UserFriend
Hello Vaibhav,

Assuming that you are looking to get the Root container of the EPackage doing a
EcoreUtil.getRootContainer(eClass) 
and getting the first child should work (again assuming that you have a single root). If you already have a handle to the EPackage then only the second part is enough.

Regards,
Nirmal
Previous Topic:Sorted ELists
Next Topic:Referencing image files
Goto Forum:
  


Current Time: Tue Jul 01 07:38:11 EDT 2025

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

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

Back to the top