Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » HowTo get undoing of property changes working?
HowTo get undoing of property changes working? [message #14491] Mon, 22 July 2002 12:24 Go to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.intershop.de

Hi!

I recognized that GEF is creating a special IPropertySheetPage with an
UndoablePropertySheetEntry as root. Which steps are necessary to enable true
undoing for all properties in the property view provided by my model?

Currently the Stack Viewer recognizes changes and enables the undo action.
But if I activate an undo action, the Stack Viewer shows a sucessfully undo
but nothing happends to my model properties. They remain modified.

Cu, Gunnar
Re: HowTo get undoing of property changes working? [message #14581 is a reply to message #14491] Mon, 22 July 2002 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.ibm.com

Step through CommandStack.undo().
The command created by the undoable PS entry will call some API on
IPropertySource to set/reset the value. This should cause your model to
fire a change.

"Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
news:ahgrda$b8v$1@rogue.oti.com...
> Hi!
>
> I recognized that GEF is creating a special IPropertySheetPage with an
> UndoablePropertySheetEntry as root. Which steps are necessary to enable
true
> undoing for all properties in the property view provided by my model?
>
> Currently the Stack Viewer recognizes changes and enables the undo action.
> But if I activate an undo action, the Stack Viewer shows a sucessfully
undo
> but nothing happends to my model properties. They remain modified.
>
> Cu, Gunnar
>
>
Re: HowTo get undoing of property changes working? [message #14700 is a reply to message #14581] Mon, 22 July 2002 14:02 Go to previous message
Eclipse UserFriend
Originally posted by: g.wagenknecht.intershop.de

Randy,

"Randy Hudson" <none@ibm.com> schrieb im Newsbeitrag
news:ahgvkq$e2p$1@rogue.oti.com...
> Step through CommandStack.undo().
> The command created by the undoable PS entry will call some API on
> IPropertySource to set/reset the value. This should cause your model to
> fire a change.

I found that there is a SetPropertyValueCommand and this command does the
undo but not correctly IMHO.

If IPropertySource.isPropertySet returns true, the SetPropertyValueCommand
stores the old value and restores it on undo. But if
IPropertySource.isPropertySet returns false, the SetPropertyValueCommand
simply resets the property value instead of restoring the old one.

A proper implementation of IPropertySource.isPropertySet "returns false if
the notion of a default value is not meaningful for the specified property".
This is the case in my model. With the currently implementation of
SetPropertyValueCommand it is not possible to undo a property value change
if your model doesn't use default values.

Will you change the implementation? I filled a bug report for you.
http://dev.eclipse.org/bugs/show_bug.cgi?id=21756

Cu, Gunnar
Previous Topic:Menu popup on EditPart
Next Topic:Algorithms for connection routing
Goto Forum:
  


Current Time: Thu Dec 26 17:19:59 GMT 2024

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

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

Back to the top