Command / Undo of Property Change [message #96032] |
Mon, 29 September 2003 20:18 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02588 seconds