Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Remove link programmatically
Remove link programmatically [message #487797] Thu, 24 September 2009 13:08 Go to next message
Jose Salazar is currently offline Jose SalazarFriend
Messages: 34
Registered: July 2009
Member
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 08:23 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 31
Registered: September 2009
Member
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 11:19 Go to previous message
Jose Salazar is currently offline Jose SalazarFriend
Messages: 34
Registered: July 2009
Member
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 Apr 19 15:42:18 GMT 2024

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

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

Back to the top