Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » accessing domainmodel objects during command execution
accessing domainmodel objects during command execution [message #210331] Tue, 04 November 2008 10:56 Go to next message
Eclipse UserFriend
Hi,

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
Re: accessing domainmodel objects during command execution [message #210349 is a reply to message #210331] Tue, 04 November 2008 11:28 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: accessing domainmodel objects during command execution [message #210357 is a reply to message #210349] Tue, 04 November 2008 12:05 Go to previous messageGo to next message
Eclipse UserFriend
Alex Shatalin wrote:

> 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
Re: accessing domainmodel objects during command execution [message #210365 is a reply to message #210357] Tue, 04 November 2008 12:21 Go to previous message
Eclipse UserFriend
Hello hagane,

try element.eContainer()

-----------------
Alex Shatalin
Previous Topic:Connection Creation problems via ModelingAssistantProvider
Next Topic:Image height change gives white space..
Goto Forum:
  


Current Time: Sat Jul 12 10:37:45 EDT 2025

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

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

Back to the top