Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Redo menu item not displayed in AbstractTextEditor
Redo menu item not displayed in AbstractTextEditor [message #305114] Thu, 22 June 2006 23:19 Go to next message
Eclipse UserFriend
Originally posted by:

I am trying to use the 3.1 undo framework from within a text editor which is page 1 of a multi-page FormEditor in an RCP program.

The editor is derived from the AbstractTextEditor. I have operations derived from IUndoableOperation and use the editor createUndoRedoActions function to create undo and redo actions derived from TextEditorAction. My right-click menu displays the undo item properly and automatically via the framework. I can undo successfully and see the undone operations moved to the redo list within the DefaultOperationHistory object. My Redo menu item does not show up.

I added a debug function to verify that the canRedo function returns true, that I can get the operation from the history, redo the operation, and see it placed back in the undo list. I simply cannot get it displayed in the menu.

Any ideas?
Re: Redo menu item not displayed in AbstractTextEditor [message #305117 is a reply to message #305114] Thu, 22 June 2006 23:58 Go to previous message
Eclipse UserFriend
Originally posted by:

I added the log view "org.eclipse.pde.runtime.LogView" and found a message message and stack trace that led me to the AbstractTextEditor#editorContextMenuAboutToShowfunction.

I extended the function and with addAction(menu, ITextEditorActionConstants.GROUP_UNDO, ITextEditorActionConstants.REDO);

The item now shows up in the menu and both undo and redo work properly. However, I still have the undo command not found message below.

The command ("redo") is undefined

at org.eclipse.jface.action.ExternalActionManager$CommandCallba ck.isActive(
at org.eclipse.jface.action.ActionContributionItem.isCommandAct ive(
at org.eclipse.jface.action.ActionContributionItem.isVisible(Ac
at org.eclipse.jface.action.MenuManager.update( :571)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuM
Previous Topic:rcstemplates with Eclipse cvs checkins
Next Topic:MVC pattern Plugin approach
Goto Forum:

Current Time: Thu May 24 08:22:21 GMT 2018

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

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

Back to the top