Community
Participate
Working Groups
Here are the step by step process to reproduce this problem: 1 - Create a new plugin project with a sample view. 2 - Add "public Action undoAction;" as an attribute in SampleView class. 3 - Add the following lines in createPartControl of the SampleView class : IActionBars bars = getViewSite().getActionBars(); undoAction = new Action() { public void run() { System.out.println("UNDO"); } }; bars.setGlobalActionHandler(IWorkbenchActionConstants.UNDO, undoAction); 4 - Run the plugin once with the runtime workbench, open and select the sample view. 5 - Close the runtime workbench. 6 - Run the plugin again with the runtime workbench and open the "edit" menu ==> The label of the undo action has desapeared. 7 - Select another view 8 - Reselect the sample view ==> The label is back ;-) The problem also occurs with the Redo action but not with the other global actions.
If i use the following code the problem does not apear : undoAction = new Action("Undo") { public void run() { System.out.println("UNDO"); } };
The retarget action should handle the case where the action handler passed in does not contain a valid label. Actually, if the retarget action does not allow label change, why does it even care if the handler has a label or not? Mark to be investigated.
Tried recreating this problem in the current dev stream using the readme example (used the ReadmeSectionsViewer). My undo action does not disappear.
Able to recreate this problem in the current dev stream.
Fixed in > 20021106 build.