Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsaccessing domainmodel objects during command execution
https://www.eclipse.org/forums/index.php/mv/msg/66993/210331/#msg_210331
During "doDefaultElementCreation()" I would like to create an extra
modelobject witch is referenced by my editelement but contained in another
object (the modelroot). Is it possible to access my emf model root during
createommand?
Any help is appreciated.
Best wishes,
Robert]]>hagane2008-11-04T15:56:34-00:00Re: accessing domainmodel objects during command execution
https://www.eclipse.org/forums/index.php/mv/msg/66993/210349/#msg_210349
Newly created EMF object will be assigned to it's container by the create
command, so new element container should be available there. Using thie reference
you can traverse existing EMF model up to the model root, so it should be
possible.
-----------------
Alex Shatalin]]>Alexander Shatalin2008-11-04T16:28:10-00:00Re: accessing domainmodel objects during command execution
https://www.eclipse.org/forums/index.php/mv/msg/66993/210357/#msg_210357
> Hello hagane,
> Newly created EMF object will be assigned to it's container by the create
> command, so new element container should be available there. Using thie
reference
> you can traverse existing EMF model up to the model root, so it should be
> possible.
> -----------------
> Alex Shatalin
Hi,
thank you for replying to my post.
could you give me an exmaple on how to traverse?
For example I have an "EObject element" below the root in my domain
model...
I would expect something like element.getParent() but could't find a
method like this.
Best wishes,
Robert]]>hagane2008-11-04T17:05:07-00:00Re: accessing domainmodel objects during command execution
https://www.eclipse.org/forums/index.php/mv/msg/66993/210365/#msg_210365
try element.eContainer()
-----------------
Alex Shatalin]]>Alexander Shatalin2008-11-04T17:21:10-00:00