Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Undo of commands
Undo of commands [message #233144] Tue, 09 June 2009 16:26 Go to next message
Javier is currently offline JavierFriend
Messages: 57
Registered: July 2009
Member
Hello guys.

I have implemented a SetCommand (EMF) which I don't want it to be
Undone, so the method doCanUndo() is returning false. Let's imagine I
make some modifications in my diagram and then I execute that command
through the editingDomain.getCommandStack().execute(). Then if I go to
Undo one of the previous changes, it doesn't appear, actually no change
appears as undoable. Is this behavior normal? This is happening using an
AbstractCommand (GMF) as well.

I need to make some modifications with a Command but I don't want it to
appear in the CommandStack undoable commands, and I don't know if
overriding the canUndo() method is the right way.

Any hint?

Thank u guys
Re: Undo of commands [message #234504 is a reply to message #233144] Tue, 23 June 2009 08:50 Go to previous message
Eclipse UserFriend
Originally posted by: c.sanchez.iactive.es

Hi, I have the same problem. Any idea?

Thanks

Javier escribió:
> Hello guys.
>
> I have implemented a SetCommand (EMF) which I don't want it to be
> Undone, so the method doCanUndo() is returning false. Let's imagine I
> make some modifications in my diagram and then I execute that command
> through the editingDomain.getCommandStack().execute(). Then if I go to
> Undo one of the previous changes, it doesn't appear, actually no change
> appears as undoable. Is this behavior normal? This is happening using an
> AbstractCommand (GMF) as well.
>
> I need to make some modifications with a Command but I don't want it to
> appear in the CommandStack undoable commands, and I don't know if
> overriding the canUndo() method is the right way.
>
> Any hint?
>
> Thank u guys
Previous Topic:Re: Open Diagram with Errors
Next Topic:thx problem solved
Goto Forum:
  


Current Time: Sat Apr 04 23:01:33 GMT 2020

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

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

Back to the top