Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Command / Undo of Property Change
Command / Undo of Property Change [message #96032] Mon, 29 September 2003 20:18 Go to next message
Eclipse UserFriend
Originally posted by: rr.cm1.cox.net

When certain model properties are modified, say via the Properties View,
this sometimes triggers associated changes in the associated model element
(or others) that we implement by subclassing Command or CompoundCommand.
It seems that the property change and the subsequent Command must always
be Undone/Redone separately, however.

Is there a way to combine such property changes with model-related
Commands so that everything is Undone/Redone together?

thanks,

Ron
Re: Command / Undo of Property Change [message #96044 is a reply to message #96032] Mon, 29 September 2003 21:07 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

So, you are saying that changing one property requires something else to
also be changed? If it is impossible to implement this correlated change in
the setPropertyValue(...) method, then I don't think there is anything you
can do to make the additional change have an atomic undo/redo.

We anticipated the need for this, which is why we made CommandStack a class
an not an interface. Perhaps we could add API called something like:
CommandStack.appendToExecutingCommand(Command c)...

This method would group together the command currently being executed with
the command which you need to adjust something else. This is assuming that
you can call this method *during* the original command's execute().

"Ron" <rr.cm1@cox.net> wrote in message news:bla42p$l3g$1@eclipse.org...
> When certain model properties are modified, say via the Properties View,
> this sometimes triggers associated changes in the associated model element
> (or others) that we implement by subclassing Command or CompoundCommand.
> It seems that the property change and the subsequent Command must always
> be Undone/Redone separately, however.
>
> Is there a way to combine such property changes with model-related
> Commands so that everything is Undone/Redone together?
>
> thanks,
>
> Ron
>
Previous Topic:differences between 2.1.1 and 2.1.2 demos and draw2d
Next Topic:Problem in Pallete
Goto Forum:
  


Current Time: Wed Jan 15 08:05:56 GMT 2025

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

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

Back to the top