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 18:02 Go to next message
Erik Englund is currently offline Erik Englund
Messages: 49
Registered: July 2009
Member
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.

Ideas?
Re: Move and Create Request [message #643715 is a reply to message #643710] Tue, 07 December 2010 19:10 Go to previous message
Michael Golubev is currently offline Michael Golubev
Messages: 373
Registered: July 2009
Senior Member
Hello,

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.

Regards,
Michael

[Updated on: Tue, 07 December 2010 19:11]

Report message to a moderator

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


Current Time: Tue Jul 29 08:45:16 EDT 2014

Powered by FUDForum. Page generated in 0.02016 seconds