Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Procedure for creating a node programmaticlally
Procedure for creating a node programmaticlally [message #719788] Mon, 29 August 2011 02:42 Go to next message
pavithra Missing name is currently offline pavithra Missing nameFriend
Messages: 12
Registered: May 2011
Junior Member
Hi,

I have the following requirement.

When the user press a toolbar button, i need to insert a new node (represented by a rectangle) to the canvas.

I'm planning to develop a customization plugin to achieve this task.

What is the procedure to programmatically create a new node?

Thanks in advance!!
Re: Procedure for creating a node programmaticlally [message #719815 is a reply to message #719788] Mon, 29 August 2011 06:40 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

is this what you want to do? http://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial/Part_3#Creating_a_Customization_Plug-in

Ralph
Re: Procedure for creating a node programmaticlally [message #720293 is a reply to message #719815] Tue, 30 August 2011 10:29 Go to previous message
Lucian Apetre is currently offline Lucian ApetreFriend
Messages: 8
Registered: May 2011
Junior Member
Hi,
In the plugin, if you create elements in the palette, the user of the plugin can drag and drop those elements.
If I understood well, you want the user to press a button and create an element on the canvas(not drag/drop the element)?!
To do this more simple, you can create a button with the action of editing the XML that represents the canvas. You can verify what happens with the canvas when an element is added(drag/drop) and create a simple action in that button that will edit the canvas(XML).
Hope that helped.
Previous Topic:(no subject)
Next Topic:How to populate a member class with a specific type?
Goto Forum:
  


Current Time: Thu Apr 25 22:43:21 GMT 2024

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

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

Back to the top