Bug 22529 - [GlobalActions] Undo and Redo labels desapear on the fisrt
Summary: [GlobalActions] Undo and Redo labels desapear on the fisrt
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Lynne Kues CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-08-19 11:10 EDT by Nicolas Gillet CLA
Modified: 2002-11-06 10:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Gillet CLA 2002-08-19 11:10:32 EDT
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.
Comment 1 Nicolas Gillet CLA 2002-08-19 11:30:09 EDT
If i use the following code the problem does not apear :

undoAction = new Action("Undo") {
    public void run() {
    	System.out.println("UNDO");
    }
};
Comment 2 Simon Arsenault CLA 2002-08-23 10:25:46 EDT
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.
Comment 3 Lynne Kues CLA 2002-11-04 17:45:41 EST
Tried recreating this problem in the current dev stream using the readme 
example (used the ReadmeSectionsViewer).  My undo action does not disappear.
Comment 4 Lynne Kues CLA 2002-11-04 18:01:07 EST
Able to recreate this problem in the current dev stream.
Comment 5 Lynne Kues CLA 2002-11-06 10:47:08 EST
Fixed in > 20021106 build.