Undo and Redo Options in Graphiti [message #1711419] |
Thu, 15 October 2015 16:20  |
Eclipse User |
|
|
|
Hi,
We are trying to restrict undo and Redo to couple of features. I over-rided canundo() and canRedo() with false. But I still I am able to do that.
And when i press ctrl+Y or ctrl+Z which class it invokes. We try to debug through graphiti code, when we press ctrl+Y or Ctrl+Z, seens its not coming to graphiti code.
Greatly appreaciated ofr your suggesions.
|
|
|
|
|
Re: Undo and Redo Options in Graphiti [message #1713064 is a reply to message #1711521] |
Fri, 30 October 2015 10:23  |
Eclipse User |
|
|
|
Anil,
this sounds as if you execute more than one feature. Undo/redo will work on feature level, so only the previous feature will be undone or the next redone. (Previous and next refer to the current pointer in the stack of editor operations.) In case you trigger more than one feature for an operation and you want the complete operation to be undone/redone, you need to wrap the complete stuff inside just one feature and maybe call several other features from within that. Feature execution will check in an EMF transaction is open, in case not it will open open, in case yes it will reuse it. Undo/redo will in th end simply trigger a undo/redo on that transaction.
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03050 seconds