Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Move and Create Request(MoveRequest CreateRequest)
Move and Create Request [message #643710] Tue, 07 December 2010 23:02 Go to next message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
I have a model that contains two Nodes.

NodeA and NodeB.

NodeB has a compartment that NodeA can be placed in.

I want to be able to click the tool for NodeB draw around a NodeA and have that Node added to the new NodeB during the create.

I have tried overriding the configure command and in the SematicEdit policy of the diagram overriding the CreateViewAndElementCommand such that it adds the diagram elements that are within the dragged area as parameters to the request.

This all works fine. I then return a MoveCommand within the getConfigure command. This also seems to move the elements correctly however, the View for the NodeA element appears on both the diagram and within the NodeB compartment.

Re: Move and Create Request [message #643715 is a reply to message #643710] Wed, 08 December 2010 00:10 Go to previous message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 375
Registered: July 2009
Senior Member

All of the edit helper commands work only on the semantic level, so moving the element itself does not automatically removes the view from the old location.

But if you already passing the diagram elements as request parameters, you may simply chain the MoveCommand with the DeleteCommand for the old view and remove it explicitly.


[Updated on: Wed, 08 December 2010 00:11]

Report message to a moderator

Previous Topic:persistance of palette elements
Next Topic:Link direction as semantic attribute
Goto Forum:

Current Time: Fri Apr 20 15:03:16 GMT 2018

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

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