Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Remove link programmatically
Remove link programmatically [message #487797] Thu, 24 September 2009 09:08 Go to next message
Eclipse UserFriend
Hello,

I'm very confused, to create a node exists DeferredCreateConnectionViewAndElementCommand where everything works. However, to eliminate there is no class to take care of everything, I have to remove the graphic with DeleteCommand, and then delete the part of RemoveCommand model, but this does not work everywhere, I mean, in a AbstractTransactionalCommand works, but in a non AbstractHandler.

What is the correct way to remove a link for example?

Jose.
Re: Remove link programmatically [message #487982 is a reply to message #487797] Fri, 25 September 2009 04:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jose,

one way to go would be a RecordingCommand which records the changes made by a subclass's direct manipulation of objects via the metamodel's API.

You're simply required to implement the RecordingCommand.doExecute() method to make the desired changes to the model. (Note that, because changes are recorded for automatic undo/redo, the concrete command must not make any changes that cannot be recorded by EMF unless it does not matter that they will not be undone).

Therefore you don't bother about updates in the view because they will be handled for you.


Best regards,

sas
Re: Remove link programmatically SOLVED [message #488024 is a reply to message #487982] Fri, 25 September 2009 07:19 Go to previous message
Eclipse UserFriend
Sascha thank you very much, your solution provided works.


Best regards.

Jose.
Previous Topic:automatic node generation
Next Topic:graph in a view
Goto Forum:
  


Current Time: Fri Mar 21 13:46:12 EDT 2025

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

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

Back to the top