Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EditingDomain.getRoot(Object)(getRoot method not clearly explained)
EditingDomain.getRoot(Object) [message #508629] Tue, 19 January 2010 16:36 Go to next message
Pierre Francis Roy is currently offline Pierre Francis RoyFriend
Messages: 12
Registered: July 2009
Junior Member
Hi,

I'm trying how to figure out the usage of the EditingDomain.getRoot(Object) method.

The documentation is saying this:

/**
* This returns the root of the object, i.e., .
*/
Object getRoot(Object object);

What this method is doing and how can I use it? I would really love being able to get a shortcut to obtain my model root objects. Is this method can provide me any help?

Thanks
Pierre
Re: EditingDomain.getRoot(Object) [message #508634 is a reply to message #508629] Tue, 19 January 2010 16:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30631
Registered: July 2009
Senior Member
Pierre,

It's similar to EcoreUtil.getRootContainer but uses
ITreeItemContentProvider.getParent rather than EObject.eContainer.


Pierre Francis Roy wrote:
> Hi,
>
> I'm trying how to figure out the usage of the
> EditingDomain.getRoot(Object) method.
> The documentation is saying this:
>
> /**
> * This returns the root of the object, i.e., .
> */
> Object getRoot(Object object);
>
> What this method is doing and how can I use it? I would really love
> being able to get a shortcut to obtain my model root objects. Is this
> method can provide me any help?
>
> Thanks
> Pierre
>
Re: EditingDomain.getRoot(Object) [message #508645 is a reply to message #508634] Tue, 19 January 2010 17:25 Go to previous message
Pierre Francis Roy is currently offline Pierre Francis RoyFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks Ed,

I did some testing by adding a command to inspect EMF selection from an editor and finally understood how it work. Really useful!

Thanks
Pierre
Previous Topic:Utility to obtain model root
Next Topic:Problem with performance when loading big models
Goto Forum:
  


Current Time: Thu Nov 14 22:22:55 GMT 2019

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

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

Back to the top