| 
| New to Undo - Redo [message #164521] | Tue, 18 January 2005 19:33  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: genemb.pacbell.net 
 All,
 I've been working on an Editor that uses the GEF.  Howver, instead
 of propertysheets, the client preferred that I use form based property
 entry.  All basically works well, I can create components with the
 mouse, resize and move them with the mouse and use the property forms to
 update the model and then have the EditParts listening to changes in
 to model which they then do a refreshVisuals().  A new requirement came
 in to support undo and redo.  This was easy for GEF graphical editor and
 works fine.  However, I can't find any docs on how to tie changes which
 take place in the model through the forms into the CommandStack.  In my
 most naive moment, it seems like I should be able to put something on
 the CommandStack when the model is changed or when the refreshVisuals on
 the EditPart is called.  However, I'm stumped as to how to 1) Get to the
 CommandStack and 2) What is it that I add to it?  All the command
 definitions reside within the policies.  Any pointers here would be
 greatly appreciated.
 
 -Gene
 |  |  |  | 
| 
| Re: New to Undo - Redo [message #164613 is a reply to message #164521] | Wed, 19 January 2005 11:39  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: none.us.ibm.com 
 The WTP has a form based property sheet I believe which supports undo/redo.
 
 "Gene Moore" <genemb@pacbell.net> wrote in message
 news:csk9si$942$1@www.eclipse.org...
 > All,
 >    I've been working on an Editor that uses the GEF.  Howver, instead of
 > propertysheets, the client preferred that I use form based property entry.
 > All basically works well, I can create components with the mouse, resize
 > and move them with the mouse and use the property forms to update the
 > model and then have the EditParts listening to changes in to model which
 > they then do a refreshVisuals().  A new requirement came in to support
 > undo and redo.  This was easy for GEF graphical editor and works fine.
 > However, I can't find any docs on how to tie changes which take place in
 > the model through the forms into the CommandStack.  In my most naive
 > moment, it seems like I should be able to put something on the
 > CommandStack when the model is changed or when the refreshVisuals on the
 > EditPart is called.  However, I'm stumped as to how to 1) Get to the
 > CommandStack and 2) What is it that I add to it?  All the command
 > definitions reside within the policies.  Any pointers here would be
 > greatly appreciated.
 >
 > -Gene
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.06172 seconds