Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Create nodes programmatically
Create nodes programmatically [message #483372] Tue, 01 September 2009 11:42 Go to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Hello,

I have a diagram node which can contain several child nodes. The user can
create new child nodes manually by clicking the palette and adding the
node to the top node. This works fine.

What I would like is to be able to add a child node programmatically when
the user changes some properties of the top level node. I searched for
quite some time on the newsgroup and although there are some posts about
it, I couldn't find something really relevant for me.

It seems that I will need to create a CreateElementRequest and so far I've
been able to do that but after that I'm stuck. I have no idea how to go on
(and I'm even not sure this is a valid solution).

Thanks for any help.
Cédric
Re: Create nodes programmatically [message #483394 is a reply to message #483372] Tue, 01 September 2009 12:58 Go to previous message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
I finally found an example here:
http://wiki.eclipse.org/index.php/GMF_Tips#Creating_New_Elem ents_And_Corresponding_Views

It seems to work fine.
Previous Topic:Create elements without view in diagram
Next Topic:update nodes on link creation and deletion
Goto Forum:
  


Current Time: Mon Apr 15 22:33:12 GMT 2024

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

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

Back to the top