Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Global undo/redo in an RCP app
Global undo/redo in an RCP app [message #444259] Mon, 13 February 2006 05:06
rick cameron is currently offline rick cameronFriend
Messages: 9
Registered: July 2009
Junior Member
I've just been looking at the new (as of 3.1) undo/redo support. It seems
very flexible and powerful.

In my RCP app, I just want to have a single command stack; I don't need the
flexibility of separate sets of commands for each view or editor. To achieve
this, it looks to me like I should add the retargetable undo & redo actions
to the Edit menu, then in every view & editor, register action handlers for
undo & redo, using the same IUndoContext.

I think this will work - but it would be simpler if I could just put undo &
redo actions on the Edit menu that always referred directly to the default
IOperationHistory. I don't think the existing UndoActionHandler and
RedoActionHandler can be used for this, as they require an
IWorkbenchPartSite in the constructor.

Is there a way to achieve this using existing classes? If not, I guess I'd
have to merge code from ActionFactory.UNDO and UndoActionHandler to produce
an appropriate action.

As a JFace/RCP neophyte I can't judge whether it would be appropriate to add
classes like this to the libraries - but, if so, please consider doing so. I
bet there are a lot of apps like mine with a simple model of undo/redo that
would benefit from it!

Thanks

- rick
Previous Topic:IntroContent.xml
Next Topic:[DataBinding] Binding nested props. in comboboxes
Goto Forum:
  


Current Time: Sat Nov 09 04:50:11 GMT 2024

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

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

Back to the top