|
Re: Rationale for ForwardUndoCompoundCommand [message #192411 is a reply to message #192349] |
Thu, 18 August 2005 17:42 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Go to the construtor and search for references. You will see that it is used
for undoing the applying of nested property changes by the property sheet.
"Ed Willink" <ed@willink.me.uk> wrote in message
news:de17aq$5id$1@news.eclipse.org...
> Hi
>
> ForwardUndoCompoundCommand changes the default CompoundCommand behaviour
> of
> forward do/redo, reverse undo to provide forward undo.
>
> Surely forward undo can only be correct when all commands are stateless
> and
> just toggle behaviour? In practice many commands assign values and are
> stateful
> - caching a state for undo.
>
> What is/was the rationale for this class, which is used for the EDiagram
> properties?
>
> Regards
>
> Ed Willink
>
|
|
|
|
Re: Rationale for ForwardUndoCompoundCommand [message #192500 is a reply to message #192448] |
Thu, 18 August 2005 22:27 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
That's not what the property sheet does. For example, it first sets a
point's X property on the point, then it sets the point on the property
source. When undoing, you need to undo the X change first, then undo the
"location" change second. It has to do with property sources returning
immutable or by-value objects, or, the value with sub-properties is not
observable so it would impossible to see the X value changing.
>
> Regards
>
> Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.03298 seconds