Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Undo and Redo Options in Graphiti(Undo and Redo options with Graphiti Editor)
Undo and Redo Options in Graphiti [message #1711419] Thu, 15 October 2015 20:20 Go to next message
Anil tanneru is currently offline Anil tanneruFriend
Messages: 21
Registered: March 2014
Junior Member
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 #1711504 is a reply to message #1711419] Fri, 16 October 2015 13:39 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1883
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Anil,

can you provide some more information? Which kind of feature have you tried that with (custom, add, create, ...)? Have you checked if your canUndo() canRedo() methods are actually called?

Michael
Re: Undo and Redo Options in Graphiti [message #1711521 is a reply to message #1711504] Fri, 16 October 2015 16:25 Go to previous messageGo to next message
Anil tanneru is currently offline Anil tanneruFriend
Messages: 21
Registered: March 2014
Junior Member
Yes, this happens some tiles, not all the time.

I tried with addFeature.

When we do Ctrl+Y , we are loosing gradient and connector behaving erratically.

This is what we are doing:
When we add multiple ContainerShape thru AddFeature, and try to do Undo option with Ctrl+Z , we are loosing gradient for some shapes and Connector is in unpredictable state.

we connect the shapes with connectors and delete few shapes and then we are doing "undo"

And to Redo or Undo, how to access the history of operations we did , to restrict the undo and Redo for some operations.
Re: Undo and Redo Options in Graphiti [message #1713064 is a reply to message #1711521] Fri, 30 October 2015 14:23 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1883
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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
Previous Topic:connector thickness fades away
Next Topic:Undo and Redo options with AddFeature
Goto Forum:
  


Current Time: Fri Jan 19 06:02:58 GMT 2018

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

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