Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Undo/Redo with 3.4 Commands
Undo/Redo with 3.4 Commands [message #480056] Thu, 13 August 2009 11:32 Go to previous message
Rob is currently offline Rob
Messages: 27
Registered: July 2009
Junior Member
Hi all,

I used to have an old 3.2 RCP app. I had created my own type of editor,
which used the workbench operation history like so:

operationHistory =
editor.getEditorSite().getWorkbenchWindow().getWorkbench().g etOperationSupport().getOperationHistory();

In the apps ApplicationActionBarAdvisor, I used the undo and redo actions
like so:
undoAction = ActionFactory.UNDO.create(window);
register(undoAction);


Now, when we upgraded to 3.4 and the new menu/command/handler mechanism,
i'm adding the commands to the menu bar as follows (note I dont have
handlers for them)
CommandContributionItemParameter param = new
CommandContributionItemParameter(window, "undo",
"org.eclipse.ui.edit.undo", SWT.NONE);
CommandContributionItem undo = new CommandContributionItem(param);

Unfortunatley, the undo/redo commands don't work anymore. They aren't
updated when my editor operation history changes. Is there anything more I
need to do, to link the commands to the workbench operation history? Do
they not have default handlers to track the operation history?

I've googled my ass off over this, but i'm still not getting anywhere. Any
help would be greatly appreciated!

Thanks.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:ComboViewer with checkboxes, is it possible?
Next Topic:i have two issue need you address
Goto Forum:
  


Current Time: Mon May 20 17:26:53 EDT 2013

Powered by FUDForum. Page generated in 0.01868 seconds