Project: Eclipse_Platform_UI
Bug 163474 [Undo/Redo] Wrong Tooltips for Undo and Redo actions
Reported: 2006-11-05 08:19:32 | Status: verified fixed

I'm using the Undo and Redo actions created with ActionFactory.UNDO.create() and ActionFactory.REDO.create() in a toolbar. If I hover over them the tooltip says "&Undo action" and "&Redo action". Looks like they use the title messages instead of the tooltip messages for tooltips. I found this code in OperationHistoryActionHandler.update(): String text = getCommandString(); String tooltipText; if (enabled) { tooltipText = NLS.bind(WorkbenchMessages.Operations_undoRedoCommand, text, getOperation().getLabel()); So the tooltipText variable is filled with the string returned by getCommandString(). This one is defined in UndoActionHandler and RedoActionHandler and just returns the message resource "WorkbenchMessages.Workbench_undo" and "WorkbenchMessages.Workbench_redo". But for the tooltip "WorkbenchMessages.Workbench_undoToolTip" and "WorkbenchMessages.Workbench_redoToolTip" must be used instead.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/OperationHistoryActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/RedoActionHandler.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/operations/UndoActionHandler.java