Deleting Transitions manually [message #189905] |
Thu, 29 May 2008 03:30  |
Eclipse User |
|
|
|
Originally posted by: carlos.munoz.justinmind.com
I everyone!
I've a problem. My application is using GMF. The problem is that when i've
a diagram created, i must delete a group of Transitions, when something
happends. But i don't know how to delete they.
I have created my command called DeleteTransitionsCommand extends
AbstractTransactionalCommand. The GMF generation create Commands to 'Add'
elements but no commands for 'Delete', so how can I do a 'Delete'???
I've the Diagram and get all the Content eAllContent() but now I've I to
delete some transitions and I don't know how to do it. In case of delete
Node's I tried to set the Container to NULL , and this, delete the Node
from the diagram correctly, but with transitions this don't have effect.
Thanks!
|
|
|
|
|
|
|
|
|
Re: Deleting Transitions manually [message #191378 is a reply to message #191346] |
Fri, 06 June 2008 04:41  |
Eclipse User |
|
|
|
Originally posted by: youchy.gmail.com
I will xplain you the real problem.
I need to do an UNDO of create elements. I know GMF provides UNDO's.
The problem is that GMF use undo by editor.
And I'm using GMF only on an unic editor, and here is where all the
Diagram are loaded, so when I load a Diagram on the editor, the UNDO STACK
of the other is lost.
what I'm doing is my commands, to can make create Node UNDO, cerate
Transition UNDO, delete Node UNDO and delete Transition UNDO.
The problem is...when you load an scenario, the model is regenerated, so
the Instances of the objects are not the same...and what i'm doing is
looking where is the instance with the same ID that the instance that is
in my Command. When I have it...now i need to delete it.
In the case of Node's, what I do is to put the 'ActivityScenario' (the
parent of nodes and transitions) to null, and that's all.
But in case of Transitions, I don't know how to do a delete. I've the
xxxxxxxTransitionImpl in the command.
I did the create Transition UNDO, but i need the View Object (EdgeImpl) of
this xxxxxxxTransitionImpl.
Please can you help me???
Thanks!
if something is wrong, or you can't understand, please answer me, my
ensglish is so bad, sorry!
|
|
|
Powered by
FUDForum. Page generated in 0.04512 seconds