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: automatic.javalobby.org

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: automatic.javalobby.org

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

java.lang.Exception
at org.eclipse.jface.action.ExternalActionManager$CommandCallba ck.isActive(ExternalActionManager.java:300)
at org.eclipse.jface.action.ActionContributionItem.isCommandAct ive(ActionContributionItem.java:579)
at org.eclipse.jface.action.ActionContributionItem.isVisible(Ac tionContributionItem.java:631)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java :571)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuM anager.java:373)
Previous Topic:Finding out all editors available given a file type/extension?
Next Topic:Text getting lost on the way to Console
Goto Forum:
  


Current Time: Thu Apr 25 10:29:43 GMT 2024

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

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

Back to the top