Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 266839 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java (-1 / +2 lines)
Lines 19-24 Link Here
19
import org.eclipse.ui.ISaveablesLifecycleListener;
19
import org.eclipse.ui.ISaveablesLifecycleListener;
20
import org.eclipse.ui.ISaveablesSource;
20
import org.eclipse.ui.ISaveablesSource;
21
import org.eclipse.ui.ISharedImages;
21
import org.eclipse.ui.ISharedImages;
22
import org.eclipse.ui.IWorkbenchCommandConstants;
22
import org.eclipse.ui.IWorkbenchPage;
23
import org.eclipse.ui.IWorkbenchPage;
23
import org.eclipse.ui.IWorkbenchPart;
24
import org.eclipse.ui.IWorkbenchPart;
24
import org.eclipse.ui.IWorkbenchWindow;
25
import org.eclipse.ui.IWorkbenchWindow;
Lines 60-66 Link Here
60
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT));
61
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT));
61
        setDisabledImageDescriptor(WorkbenchImages
62
        setDisabledImageDescriptor(WorkbenchImages
62
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT_DISABLED));
63
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT_DISABLED));
63
        setActionDefinitionId("org.eclipse.ui.file.saveAll"); //$NON-NLS-1$
64
        setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVEALL);
64
    }
65
    }
65
66
66
    /* (non-Javadoc)
67
    /* (non-Javadoc)
(-)Eclipse UI/org/eclipse/ui/internal/SaveAction.java (-1 / +2 lines)
Lines 14-19 Link Here
14
import org.eclipse.ui.ISaveablePart;
14
import org.eclipse.ui.ISaveablePart;
15
import org.eclipse.ui.ISaveablesSource;
15
import org.eclipse.ui.ISaveablesSource;
16
import org.eclipse.ui.ISharedImages;
16
import org.eclipse.ui.ISharedImages;
17
import org.eclipse.ui.IWorkbenchCommandConstants;
17
import org.eclipse.ui.IWorkbenchPage;
18
import org.eclipse.ui.IWorkbenchPage;
18
import org.eclipse.ui.IWorkbenchWindow;
19
import org.eclipse.ui.IWorkbenchWindow;
19
20
Lines 38-44 Link Here
38
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
39
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
39
        setDisabledImageDescriptor(WorkbenchImages
40
        setDisabledImageDescriptor(WorkbenchImages
40
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED));
41
                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED));
41
        setActionDefinitionId("org.eclipse.ui.file.save"); //$NON-NLS-1$
42
        setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVE); 
42
        ((WorkbenchWindow)window).addBackgroundSaveListener(this);
43
        ((WorkbenchWindow)window).addBackgroundSaveListener(this);
43
    }
44
    }
44
    
45
    
(-)Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java (-1 / +2 lines)
Lines 13-18 Link Here
13
import org.eclipse.jface.dialogs.IDialogConstants;
13
import org.eclipse.jface.dialogs.IDialogConstants;
14
import org.eclipse.jface.dialogs.MessageDialog;
14
import org.eclipse.jface.dialogs.MessageDialog;
15
import org.eclipse.ui.IPerspectiveDescriptor;
15
import org.eclipse.ui.IPerspectiveDescriptor;
16
import org.eclipse.ui.IWorkbenchCommandConstants;
16
import org.eclipse.ui.IWorkbenchPage;
17
import org.eclipse.ui.IWorkbenchPage;
17
import org.eclipse.ui.IWorkbenchWindow;
18
import org.eclipse.ui.IWorkbenchWindow;
18
import org.eclipse.ui.internal.dialogs.SavePerspectiveDialog;
19
import org.eclipse.ui.internal.dialogs.SavePerspectiveDialog;
Lines 32-38 Link Here
32
    public SavePerspectiveAction(IWorkbenchWindow window) {
33
    public SavePerspectiveAction(IWorkbenchWindow window) {
33
        super(window);
34
        super(window);
34
        setText(WorkbenchMessages.SavePerspective_text);
35
        setText(WorkbenchMessages.SavePerspective_text);
35
        setActionDefinitionId("org.eclipse.ui.window.savePerspective"); //$NON-NLS-1$
36
        setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_SAVEPERSPECTIVEAS);
36
        // @issue missing action id
37
        // @issue missing action id
37
        setToolTipText(WorkbenchMessages.SavePerspective_toolTip); 
38
        setToolTipText(WorkbenchMessages.SavePerspective_toolTip); 
38
        window.getWorkbench().getHelpSystem().setHelp(this,
39
        window.getWorkbench().getHelpSystem().setHelp(this,
(-)Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java (-1 / +2 lines)
Lines 13-18 Link Here
13
import org.eclipse.ui.IEditorPart;
13
import org.eclipse.ui.IEditorPart;
14
import org.eclipse.ui.ISaveablePart;
14
import org.eclipse.ui.ISaveablePart;
15
import org.eclipse.ui.ISharedImages;
15
import org.eclipse.ui.ISharedImages;
16
import org.eclipse.ui.IWorkbenchCommandConstants;
16
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.IWorkbenchWindow;
17
18
18
/**
19
/**
Lines 27-33 Link Here
27
     */
28
     */
28
    public SaveAsAction(IWorkbenchWindow window) {
29
    public SaveAsAction(IWorkbenchWindow window) {
29
        super(WorkbenchMessages.SaveAs_text, window); 
30
        super(WorkbenchMessages.SaveAs_text, window); 
30
        setActionDefinitionId("org.eclipse.ui.file.saveAs"); //$NON-NLS-1$
31
        setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVEAS);
31
        setText(WorkbenchMessages.SaveAs_text); 
32
        setText(WorkbenchMessages.SaveAs_text); 
32
        setToolTipText(WorkbenchMessages.SaveAs_toolTip); 
33
        setToolTipText(WorkbenchMessages.SaveAs_toolTip); 
33
        setId("saveAs"); //$NON-NLS-1$
34
        setId("saveAs"); //$NON-NLS-1$
(-)Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java (-1 / +2 lines)
Lines 14-19 Link Here
14
import org.eclipse.jface.dialogs.MessageDialog;
14
import org.eclipse.jface.dialogs.MessageDialog;
15
import org.eclipse.osgi.util.NLS;
15
import org.eclipse.osgi.util.NLS;
16
import org.eclipse.ui.IPerspectiveDescriptor;
16
import org.eclipse.ui.IPerspectiveDescriptor;
17
import org.eclipse.ui.IWorkbenchCommandConstants;
17
import org.eclipse.ui.IWorkbenchPage;
18
import org.eclipse.ui.IWorkbenchPage;
18
import org.eclipse.ui.IWorkbenchWindow;
19
import org.eclipse.ui.IWorkbenchWindow;
19
import org.eclipse.ui.PlatformUI;
20
import org.eclipse.ui.PlatformUI;
Lines 37-43 Link Here
37
    public ResetPerspectiveAction(IWorkbenchWindow window) {
38
    public ResetPerspectiveAction(IWorkbenchWindow window) {
38
        super(window);
39
        super(window);
39
        setText(WorkbenchMessages.ResetPerspective_text);
40
        setText(WorkbenchMessages.ResetPerspective_text);
40
        setActionDefinitionId("org.eclipse.ui.window.resetPerspective"); //$NON-NLS-1$
41
        setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_RESETPERSPECTIVE);
41
        // @issue missing action id
42
        // @issue missing action id
42
        setToolTipText(WorkbenchMessages.ResetPerspective_toolTip); 
43
        setToolTipText(WorkbenchMessages.ResetPerspective_toolTip); 
43
        window.getWorkbench().getHelpSystem().setHelp(this,
44
        window.getWorkbench().getHelpSystem().setHelp(this,
(-)Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java (+48 lines)
Lines 303-308 Link Here
303
    public static final String WINDOW_MINIMIZEACTIVEVIEWOREDITOR = "org.eclipse.ui.window.minimizePart"; //$NON-NLS-1$
303
    public static final String WINDOW_MINIMIZEACTIVEVIEWOREDITOR = "org.eclipse.ui.window.minimizePart"; //$NON-NLS-1$
304
304
305
    /**
305
    /**
306
     * Id for command "Next Editor" in category "Window"
307
     * (value is <code>"org.eclipse.ui.window.nextEditor"</code>).
308
     */
309
    public static final String WINDOW_NEXTEDITOR = "org.eclipse.ui.window.nextEditor"; //$NON-NLS-1$
310
311
    /**
312
     * Id for command "Previous Editor" in category "Window"
313
     * (value is <code>"org.eclipse.ui.window.previousEditor"</code>).
314
     */
315
    public static final String WINDOW_PREVIOUSEDITOR = "org.eclipse.ui.window.previousEditor"; //$NON-NLS-1$
316
317
    /**
318
     * Id for command "Next View" in category "Window"
319
     * (value is <code>"org.eclipse.ui.window.nextView"</code>).
320
     */
321
    public static final String WINDOW_NEXTVIEW = "org.eclipse.ui.window.nextView"; //$NON-NLS-1$
322
323
    /**
324
     * Id for command "Previous View" in category "Window"
325
     * (value is <code>"org.eclipse.ui.window.previousView"</code>).
326
     */
327
    public static final String WINDOW_PREVIOUSVIEW = "org.eclipse.ui.window.previousView"; //$NON-NLS-1$
328
329
    /**
330
     * Id for command "Next Perspective" in category "Window"
331
     * (value is <code>"org.eclipse.ui.window.nextPerspective"</code>).
332
     */
333
    public static final String WINDOW_NEXTPERSPECTIVE = "org.eclipse.ui.window.nextPerspective"; //$NON-NLS-1$
334
335
    /**
336
     * Id for command "Previous Perspective" in category "Window"
337
     * (value is <code>"org.eclipse.ui.window.previousPerspective"</code>).
338
     */
339
    public static final String WINDOW_PREVIOUSPERSPECTIVE = "org.eclipse.ui.window.previousPerspective"; //$NON-NLS-1$
340
341
    /**
306
     * Id for command "Close All Perspectives" in category "Window"
342
     * Id for command "Close All Perspectives" in category "Window"
307
     * (value is <code>"org.eclipse.ui.window.closeAllPerspectives"</code>).
343
     * (value is <code>"org.eclipse.ui.window.closeAllPerspectives"</code>).
308
     */
344
     */
Lines 339-344 Link Here
339
    public static final String WINDOW_PREFERENCES = "org.eclipse.ui.window.preferences"; //$NON-NLS-1$
375
    public static final String WINDOW_PREFERENCES = "org.eclipse.ui.window.preferences"; //$NON-NLS-1$
340
376
341
    /**
377
    /**
378
     * Id for command "Reset Perspective" in category "Window"
379
     * (value is <code>"org.eclipse.ui.window.resetPerspective"</code>).
380
     */
381
    public static final String WINDOW_RESETPERSPECTIVE = "org.eclipse.ui.window.resetPerspective"; //$NON-NLS-1$
382
383
    /**
384
     * Id for command "Save Perspective As" in category "Window"
385
     * (value is <code>"org.eclipse.ui.window.savePerspective"</code>).
386
     */
387
    public static final String WINDOW_SAVEPERSPECTIVEAS = "org.eclipse.ui.window.savePerspective"; //$NON-NLS-1$
388
389
    /**
342
     * Id for command "Show Key Assist" in category "Window"
390
     * Id for command "Show Key Assist" in category "Window"
343
     * (value is <code>"org.eclipse.ui.window.showKeyAssist"</code>).
391
     * (value is <code>"org.eclipse.ui.window.showKeyAssist"</code>).
344
     */
392
     */
(-)Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java (-1 / +2 lines)
Lines 12-17 Link Here
12
12
13
import org.eclipse.jface.action.Action;
13
import org.eclipse.jface.action.Action;
14
import org.eclipse.swt.custom.BusyIndicator;
14
import org.eclipse.swt.custom.BusyIndicator;
15
import org.eclipse.ui.IWorkbenchCommandConstants;
15
import org.eclipse.ui.IWorkbenchPreferenceConstants;
16
import org.eclipse.ui.IWorkbenchPreferenceConstants;
16
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.PlatformUI;
18
import org.eclipse.ui.PlatformUI;
Lines 51-57 Link Here
51
            throw new IllegalArgumentException();
52
            throw new IllegalArgumentException();
52
        }
53
        }
53
        this.workbenchWindow = window;
54
        this.workbenchWindow = window;
54
        setActionDefinitionId("org.eclipse.ui.help.helpSearch"); //$NON-NLS-1$
55
        setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELPSEARCH);
55
56
56
        // support for allowing a product to override the text for the action
57
        // support for allowing a product to override the text for the action
57
        String overrideText = PrefUtil.getAPIPreferenceStore().getString(
58
        String overrideText = PrefUtil.getAPIPreferenceStore().getString(
(-)Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java (-1 / +2 lines)
Lines 12-17 Link Here
12
12
13
import org.eclipse.jface.action.Action;
13
import org.eclipse.jface.action.Action;
14
import org.eclipse.swt.custom.BusyIndicator;
14
import org.eclipse.swt.custom.BusyIndicator;
15
import org.eclipse.ui.IWorkbenchCommandConstants;
15
import org.eclipse.ui.IWorkbenchPreferenceConstants;
16
import org.eclipse.ui.IWorkbenchPreferenceConstants;
16
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.PlatformUI;
18
import org.eclipse.ui.PlatformUI;
Lines 51-57 Link Here
51
            throw new IllegalArgumentException();
52
            throw new IllegalArgumentException();
52
        }
53
        }
53
        this.workbenchWindow = window;
54
        this.workbenchWindow = window;
54
        setActionDefinitionId("org.eclipse.ui.help.helpContents"); //$NON-NLS-1$
55
        setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELPCONTENTS);
55
56
56
        // support for allowing a product to override the text for the action
57
        // support for allowing a product to override the text for the action
57
        String overrideText = PrefUtil.getAPIPreferenceStore().getString(
58
        String overrideText = PrefUtil.getAPIPreferenceStore().getString(
(-)Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java (-1 / +2 lines)
Lines 12-17 Link Here
12
12
13
import org.eclipse.jface.action.Action;
13
import org.eclipse.jface.action.Action;
14
import org.eclipse.swt.custom.BusyIndicator;
14
import org.eclipse.swt.custom.BusyIndicator;
15
import org.eclipse.ui.IWorkbenchCommandConstants;
15
import org.eclipse.ui.IWorkbenchPreferenceConstants;
16
import org.eclipse.ui.IWorkbenchPreferenceConstants;
16
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.IWorkbenchWindow;
17
import org.eclipse.ui.PlatformUI;
18
import org.eclipse.ui.PlatformUI;
Lines 50-56 Link Here
50
			throw new IllegalArgumentException();
51
			throw new IllegalArgumentException();
51
		}
52
		}
52
		this.workbenchWindow = window;
53
		this.workbenchWindow = window;
53
		setActionDefinitionId("org.eclipse.ui.help.dynamicHelp"); //$NON-NLS-1$
54
		setActionDefinitionId(IWorkbenchCommandConstants.HELP_DYNAMICHELP);
54
55
55
		// support for allowing a product to override the text for the action
56
		// support for allowing a product to override the text for the action
56
		String overrideText = PrefUtil.getAPIPreferenceStore().getString(
57
		String overrideText = PrefUtil.getAPIPreferenceStore().getString(
(-)Eclipse UI/org/eclipse/ui/actions/ActionFactory.java (-56 / +76 lines)
Lines 775-781 Link Here
775
     * {@link RetargetAction} with id "next". This action maintains
775
     * {@link RetargetAction} with id "next". This action maintains
776
     * its enablement state.
776
     * its enablement state.
777
     */
777
     */
778
    public static final ActionFactory NEXT = new ActionFactory("next") {//$NON-NLS-1$
778
    public static final ActionFactory NEXT = new ActionFactory("next", //$NON-NLS-1$
779
    		IWorkbenchCommandConstants.NAVIGATE_NEXT) {
779
        
780
        
780
        /* (non-Javadoc)
781
        /* (non-Javadoc)
781
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
782
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 787-793 Link Here
787
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_next); 
788
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_next); 
788
            action.setToolTipText(WorkbenchMessages.Workbench_nextToolTip);
789
            action.setToolTipText(WorkbenchMessages.Workbench_nextToolTip);
789
            window.getPartService().addPartListener(action);
790
            window.getPartService().addPartListener(action);
790
            action.setActionDefinitionId("org.eclipse.ui.navigate.next"); //$NON-NLS-1$
791
            action.setActionDefinitionId(getCommandId());
791
            return action;
792
            return action;
792
        }
793
        }
793
    };
794
    };
Lines 803-809 Link Here
803
     * </p>
804
     * </p>
804
     */
805
     */
805
    public static final ActionFactory NEXT_EDITOR = new ActionFactory(
806
    public static final ActionFactory NEXT_EDITOR = new ActionFactory(
806
            "nextEditor") {//$NON-NLS-1$
807
            "nextEditor", IWorkbenchCommandConstants.WINDOW_NEXTEDITOR) {//$NON-NLS-1$
807
       
808
       
808
        /* (non-Javadoc)
809
        /* (non-Javadoc)
809
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
810
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 813-820 Link Here
813
				throw new IllegalArgumentException();
814
				throw new IllegalArgumentException();
814
			}
815
			}
815
			IWorkbenchAction action = new WorkbenchCommandAction(
816
			IWorkbenchAction action = new WorkbenchCommandAction(
816
					"org.eclipse.ui.window.nextEditor", //$NON-NLS-1$
817
					getCommandId(), window);
817
					window);
818
818
819
			action.setId(getId());
819
			action.setId(getId());
820
			action.setText(WorkbenchMessages.CycleEditorAction_next_text); 
820
			action.setText(WorkbenchMessages.CycleEditorAction_next_text); 
Lines 837-843 Link Here
837
	 * ActionFactory.linkCycleActionPair</code>} to connect the two.
837
	 * ActionFactory.linkCycleActionPair</code>} to connect the two.
838
	 * </p>
838
	 * </p>
839
	 */
839
	 */
840
    public static final ActionFactory NEXT_PART = new ActionFactory("nextPart") {//$NON-NLS-1$
840
    public static final ActionFactory NEXT_PART = new ActionFactory("nextPart", //$NON-NLS-1$
841
    		IWorkbenchCommandConstants.WINDOW_NEXTVIEW) {
841
        
842
        
842
        /* (non-Javadoc)
843
        /* (non-Javadoc)
843
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
844
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 846-852 Link Here
846
            if (window == null) {
847
            if (window == null) {
847
                throw new IllegalArgumentException();
848
                throw new IllegalArgumentException();
848
            }
849
            }
849
            WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.nextView",window); //$NON-NLS-1$
850
			WorkbenchCommandAction action = new WorkbenchCommandAction(
851
					getCommandId(), window);
850
            action.setId(getId());
852
            action.setId(getId());
851
            action.setText(WorkbenchMessages.CyclePartAction_next_text);
853
            action.setText(WorkbenchMessages.CyclePartAction_next_text);
852
			action.setToolTipText(WorkbenchMessages.CyclePartAction_next_toolTip);
854
			action.setToolTipText(WorkbenchMessages.CyclePartAction_next_toolTip);
Lines 868-874 Link Here
868
     * </p>
870
     * </p>
869
     */
871
     */
870
    public static final ActionFactory NEXT_PERSPECTIVE = new ActionFactory(
872
    public static final ActionFactory NEXT_PERSPECTIVE = new ActionFactory(
871
            "nextPerspective") {//$NON-NLS-1$
873
            "nextPerspective", IWorkbenchCommandConstants.WINDOW_NEXTPERSPECTIVE) {//$NON-NLS-1$
872
       
874
       
873
        /* (non-Javadoc)
875
        /* (non-Javadoc)
874
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
876
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 877-883 Link Here
877
            if (window == null) {
879
            if (window == null) {
878
                throw new IllegalArgumentException();
880
                throw new IllegalArgumentException();
879
            }
881
            }
880
            WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.nextPerspective",window); //$NON-NLS-1$
882
			WorkbenchCommandAction action = new WorkbenchCommandAction(
883
					getCommandId(), window);
881
            action.setId(getId());
884
            action.setId(getId());
882
            action.setText(WorkbenchMessages.CyclePerspectiveAction_next_text);
885
            action.setText(WorkbenchMessages.CyclePerspectiveAction_next_text);
883
            action.setToolTipText(WorkbenchMessages.CyclePerspectiveAction_next_toolTip);
886
            action.setToolTipText(WorkbenchMessages.CyclePerspectiveAction_next_toolTip);
Lines 893-899 Link Here
893
     * action maintains its enablement state.
896
     * action maintains its enablement state.
894
     */
897
     */
895
    public static final ActionFactory OPEN_NEW_WINDOW = new ActionFactory(
898
    public static final ActionFactory OPEN_NEW_WINDOW = new ActionFactory(
896
            "openNewWindow") {//$NON-NLS-1$
899
            "openNewWindow", IWorkbenchCommandConstants.WINDOW_NEWWINDOW) {//$NON-NLS-1$
897
        
900
        
898
    	
901
    	
899
        /* (non-Javadoc)
902
        /* (non-Javadoc)
Lines 903-909 Link Here
903
            if (window == null) {
906
            if (window == null) {
904
                throw new IllegalArgumentException();
907
                throw new IllegalArgumentException();
905
            }
908
            }
906
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.window.newWindow", window); //$NON-NLS-1$
909
			WorkbenchCommandAction action = new WorkbenchCommandAction(
910
					getCommandId(), window);
907
            action.setId(getId());
911
            action.setId(getId());
908
            action.setText(WorkbenchMessages.OpenInNewWindowAction_text);
912
            action.setText(WorkbenchMessages.OpenInNewWindowAction_text);
909
            action.setToolTipText(WorkbenchMessages.OpenInNewWindowAction_toolTip);
913
            action.setToolTipText(WorkbenchMessages.OpenInNewWindowAction_toolTip);
Lines 919-925 Link Here
919
     * {@link RetargetAction} with id "paste". This action maintains
923
     * {@link RetargetAction} with id "paste". This action maintains
920
     * its enablement state.
924
     * its enablement state.
921
     */
925
     */
922
    public static final ActionFactory PASTE = new ActionFactory("paste") {//$NON-NLS-1$
926
    public static final ActionFactory PASTE = new ActionFactory("paste", //$NON-NLS-1$
927
    		IWorkbenchCommandConstants.EDIT_PASTE) {
923
        
928
        
924
        /* (non-Javadoc)
929
        /* (non-Javadoc)
925
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
930
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 931-937 Link Here
931
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_paste);
936
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_paste);
932
            action.setToolTipText(WorkbenchMessages.Workbench_pasteToolTip); 
937
            action.setToolTipText(WorkbenchMessages.Workbench_pasteToolTip); 
933
            window.getPartService().addPartListener(action);
938
            window.getPartService().addPartListener(action);
934
            action.setActionDefinitionId("org.eclipse.ui.edit.paste"); //$NON-NLS-1$
939
            action.setActionDefinitionId(getCommandId());
935
            ISharedImages sharedImages = window.getWorkbench()
940
            ISharedImages sharedImages = window.getWorkbench()
936
                    .getSharedImages();
941
                    .getSharedImages();
937
            action.setImageDescriptor(sharedImages
942
            action.setImageDescriptor(sharedImages
Lines 947-953 Link Here
947
     * This action maintains its enablement state.
952
     * This action maintains its enablement state.
948
     */
953
     */
949
    public static final ActionFactory PREFERENCES = new ActionFactory(
954
    public static final ActionFactory PREFERENCES = new ActionFactory(
950
            "preferences") {//$NON-NLS-1$
955
            "preferences", IWorkbenchCommandConstants.WINDOW_PREFERENCES) {//$NON-NLS-1$
951
        
956
        
952
        /* (non-Javadoc)
957
        /* (non-Javadoc)
953
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
958
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 967-973 Link Here
967
     * {@link RetargetAction} with id "previous". This action
972
     * {@link RetargetAction} with id "previous". This action
968
     * maintains its enablement state.
973
     * maintains its enablement state.
969
     */
974
     */
970
    public static final ActionFactory PREVIOUS = new ActionFactory("previous") {//$NON-NLS-1$
975
    public static final ActionFactory PREVIOUS = new ActionFactory("previous", //$NON-NLS-1$
976
    		IWorkbenchCommandConstants.NAVIGATE_PREVIOUS) {
971
        
977
        
972
        /* (non-Javadoc)
978
        /* (non-Javadoc)
973
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
979
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 979-985 Link Here
979
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_previous);
985
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_previous);
980
            action.setToolTipText(WorkbenchMessages.Workbench_previousToolTip);
986
            action.setToolTipText(WorkbenchMessages.Workbench_previousToolTip);
981
            window.getPartService().addPartListener(action);
987
            window.getPartService().addPartListener(action);
982
            action.setActionDefinitionId("org.eclipse.ui.navigate.previous"); //$NON-NLS-1$
988
            action.setActionDefinitionId(getCommandId()); 
983
            return action;
989
            return action;
984
        }
990
        }
985
    };
991
    };
Lines 995-1001 Link Here
995
     * </p>
1001
     * </p>
996
     */
1002
     */
997
    public static final ActionFactory PREVIOUS_EDITOR = new ActionFactory(
1003
    public static final ActionFactory PREVIOUS_EDITOR = new ActionFactory(
998
            "previousEditor") {//$NON-NLS-1$
1004
            "previousEditor", IWorkbenchCommandConstants.WINDOW_PREVIOUSEDITOR) {//$NON-NLS-1$
999
       
1005
       
1000
        /* (non-Javadoc)
1006
        /* (non-Javadoc)
1001
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1007
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1004-1012 Link Here
1004
            if (window == null) {
1010
            if (window == null) {
1005
                throw new IllegalArgumentException();
1011
                throw new IllegalArgumentException();
1006
            }
1012
            }
1007
            IWorkbenchAction action = new WorkbenchCommandAction(
1013
			IWorkbenchAction action = new WorkbenchCommandAction(
1008
					"org.eclipse.ui.window.previousEditor", //$NON-NLS-1$
1014
					getCommandId(), window);
1009
					window);
1010
            action.setId(getId());
1015
            action.setId(getId());
1011
            action.setText(WorkbenchMessages.CycleEditorAction_prev_text);
1016
            action.setText(WorkbenchMessages.CycleEditorAction_prev_text);
1012
            action.setToolTipText(WorkbenchMessages.CycleEditorAction_prev_toolTip); 
1017
            action.setToolTipText(WorkbenchMessages.CycleEditorAction_prev_toolTip); 
Lines 1029-1035 Link Here
1029
     * </p>
1034
     * </p>
1030
     */
1035
     */
1031
    public static final ActionFactory PREVIOUS_PART = new ActionFactory(
1036
    public static final ActionFactory PREVIOUS_PART = new ActionFactory(
1032
            "previousPart") {//$NON-NLS-1$
1037
            "previousPart", IWorkbenchCommandConstants.WINDOW_PREVIOUSVIEW) {//$NON-NLS-1$
1033
        
1038
        
1034
        /* (non-Javadoc)
1039
        /* (non-Javadoc)
1035
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1040
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1038-1044 Link Here
1038
            if (window == null) {
1043
            if (window == null) {
1039
                throw new IllegalArgumentException();
1044
                throw new IllegalArgumentException();
1040
            }
1045
            }
1041
            WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.previousView",window); //$NON-NLS-1$
1046
			WorkbenchCommandAction action = new WorkbenchCommandAction(
1047
					getCommandId(), window);
1042
            action.setId(getId());
1048
            action.setId(getId());
1043
			action.setText(WorkbenchMessages.CyclePartAction_prev_text);
1049
			action.setText(WorkbenchMessages.CyclePartAction_prev_text);
1044
			action.setToolTipText(WorkbenchMessages.CyclePartAction_prev_toolTip);
1050
			action.setToolTipText(WorkbenchMessages.CyclePartAction_prev_toolTip);
Lines 1060-1066 Link Here
1060
     * </p>
1066
     * </p>
1061
     */
1067
     */
1062
    public static final ActionFactory PREVIOUS_PERSPECTIVE = new ActionFactory(
1068
    public static final ActionFactory PREVIOUS_PERSPECTIVE = new ActionFactory(
1063
            "previousPerspective") {//$NON-NLS-1$
1069
            "previousPerspective", IWorkbenchCommandConstants.WINDOW_PREVIOUSPERSPECTIVE) {//$NON-NLS-1$
1064
        
1070
        
1065
        /* (non-Javadoc)
1071
        /* (non-Javadoc)
1066
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1072
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1069-1075 Link Here
1069
            if (window == null) {
1075
            if (window == null) {
1070
                throw new IllegalArgumentException();
1076
                throw new IllegalArgumentException();
1071
            }
1077
            }
1072
            WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.previousPerspective",window); //$NON-NLS-1$
1078
			WorkbenchCommandAction action = new WorkbenchCommandAction(
1079
					getCommandId(), window);
1073
            action.setId(getId());
1080
            action.setId(getId());
1074
            action.setText(WorkbenchMessages.CyclePerspectiveAction_prev_text); 
1081
            action.setText(WorkbenchMessages.CyclePerspectiveAction_prev_text); 
1075
            action.setToolTipText(WorkbenchMessages.CyclePerspectiveAction_prev_toolTip); 
1082
            action.setToolTipText(WorkbenchMessages.CyclePerspectiveAction_prev_toolTip); 
Lines 1085-1091 Link Here
1085
     * {@link RetargetAction} with id "print". This action maintains
1092
     * {@link RetargetAction} with id "print". This action maintains
1086
     * its enablement state.
1093
     * its enablement state.
1087
     */
1094
     */
1088
    public static final ActionFactory PRINT = new ActionFactory("print") {//$NON-NLS-1$
1095
    public static final ActionFactory PRINT = new ActionFactory("print", //$NON-NLS-1$
1096
    		IWorkbenchCommandConstants.FILE_PRINT) {
1089
        
1097
        
1090
        /* (non-Javadoc)
1098
        /* (non-Javadoc)
1091
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1099
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1097-1103 Link Here
1097
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_print); 
1105
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_print); 
1098
            action.setToolTipText(WorkbenchMessages.Workbench_printToolTip); 
1106
            action.setToolTipText(WorkbenchMessages.Workbench_printToolTip); 
1099
            window.getPartService().addPartListener(action);
1107
            window.getPartService().addPartListener(action);
1100
            action.setActionDefinitionId("org.eclipse.ui.file.print"); //$NON-NLS-1$
1108
            action.setActionDefinitionId(getCommandId()); 
1101
            action
1109
            action
1102
                    .setImageDescriptor(WorkbenchImages
1110
                    .setImageDescriptor(WorkbenchImages
1103
                            .getImageDescriptor(ISharedImages.IMG_ETOOL_PRINT_EDIT));
1111
                            .getImageDescriptor(ISharedImages.IMG_ETOOL_PRINT_EDIT));
Lines 1114-1120 Link Here
1114
     * maintains its enablement state.
1122
     * maintains its enablement state.
1115
     */
1123
     */
1116
    public static final ActionFactory PROPERTIES = new ActionFactory(
1124
    public static final ActionFactory PROPERTIES = new ActionFactory(
1117
            "properties") {//$NON-NLS-1$
1125
            "properties", IWorkbenchCommandConstants.FILE_PROPERTIES) {//$NON-NLS-1$
1118
        
1126
        
1119
        /* (non-Javadoc)
1127
        /* (non-Javadoc)
1120
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1128
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1126-1132 Link Here
1126
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_properties); 
1134
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_properties); 
1127
            action.setToolTipText(WorkbenchMessages.Workbench_propertiesToolTip); 
1135
            action.setToolTipText(WorkbenchMessages.Workbench_propertiesToolTip); 
1128
            window.getPartService().addPartListener(action);
1136
            window.getPartService().addPartListener(action);
1129
            action.setActionDefinitionId("org.eclipse.ui.file.properties"); //$NON-NLS-1$
1137
            action.setActionDefinitionId(getCommandId());
1130
            return action;
1138
            return action;
1131
        }
1139
        }
1132
    };
1140
    };
Lines 1135-1141 Link Here
1135
     * Workbench action (id "quit"): Quit (close the workbench). This action
1143
     * Workbench action (id "quit"): Quit (close the workbench). This action
1136
     * maintains its enablement state.
1144
     * maintains its enablement state.
1137
     */
1145
     */
1138
    public static final ActionFactory QUIT = new ActionFactory("quit") {//$NON-NLS-1$
1146
    public static final ActionFactory QUIT = new ActionFactory("quit", //$NON-NLS-1$
1147
    		IWorkbenchCommandConstants.FILE_EXIT) {
1139
       
1148
       
1140
        /* (non-Javadoc)
1149
        /* (non-Javadoc)
1141
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1150
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1144-1150 Link Here
1144
            if (window == null) {
1153
            if (window == null) {
1145
                throw new IllegalArgumentException();
1154
                throw new IllegalArgumentException();
1146
            }
1155
            }
1147
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.file.exit", window); //$NON-NLS-1$
1156
			WorkbenchCommandAction action = new WorkbenchCommandAction(
1157
					getCommandId(), window);
1148
            action.setId(getId());
1158
            action.setId(getId());
1149
            action.setText(WorkbenchMessages.Exit_text); 
1159
            action.setText(WorkbenchMessages.Exit_text); 
1150
            action.setToolTipText(WorkbenchMessages.Exit_toolTip);
1160
            action.setToolTipText(WorkbenchMessages.Exit_toolTip);
Lines 1159-1165 Link Here
1159
     * {@link RetargetAction} with id "redo". This action maintains
1169
     * {@link RetargetAction} with id "redo". This action maintains
1160
     * its enablement state.
1170
     * its enablement state.
1161
     */
1171
     */
1162
    public static final ActionFactory REDO = new ActionFactory("redo") {//$NON-NLS-1$
1172
    public static final ActionFactory REDO = new ActionFactory("redo", //$NON-NLS-1$
1173
    		IWorkbenchCommandConstants.EDIT_REDO) {
1163
        
1174
        
1164
        /* (non-Javadoc)
1175
        /* (non-Javadoc)
1165
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1176
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1171-1177 Link Here
1171
            LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_redo); 
1182
            LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_redo); 
1172
            action.setToolTipText(WorkbenchMessages.Workbench_redoToolTip); 
1183
            action.setToolTipText(WorkbenchMessages.Workbench_redoToolTip); 
1173
            window.getPartService().addPartListener(action);
1184
            window.getPartService().addPartListener(action);
1174
            action.setActionDefinitionId("org.eclipse.ui.edit.redo"); //$NON-NLS-1$
1185
            action.setActionDefinitionId(getCommandId()); 
1175
            ISharedImages sharedImages = window.getWorkbench()
1186
            ISharedImages sharedImages = window.getWorkbench()
1176
                    .getSharedImages();
1187
                    .getSharedImages();
1177
            action.setImageDescriptor(sharedImages
1188
            action.setImageDescriptor(sharedImages
Lines 1187-1193 Link Here
1187
     * {@link RetargetAction} with id "refresh". This action
1198
     * {@link RetargetAction} with id "refresh". This action
1188
     * maintains its enablement state.
1199
     * maintains its enablement state.
1189
     */
1200
     */
1190
    public static final ActionFactory REFRESH = new ActionFactory("refresh") {//$NON-NLS-1$
1201
    public static final ActionFactory REFRESH = new ActionFactory("refresh", //$NON-NLS-1$
1202
    		IWorkbenchCommandConstants.FILE_REFRESH) {
1191
        
1203
        
1192
        /* (non-Javadoc)
1204
        /* (non-Javadoc)
1193
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1205
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1199-1205 Link Here
1199
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_refresh);
1211
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_refresh);
1200
            action.setToolTipText(WorkbenchMessages.Workbench_refreshToolTip); 
1212
            action.setToolTipText(WorkbenchMessages.Workbench_refreshToolTip); 
1201
            window.getPartService().addPartListener(action);
1213
            window.getPartService().addPartListener(action);
1202
            action.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
1214
            action.setActionDefinitionId(getCommandId());
1203
            return action;
1215
            return action;
1204
        }
1216
        }
1205
    };
1217
    };
Lines 1209-1215 Link Here
1209
     * {@link RetargetAction} with id "rename". This action maintains
1221
     * {@link RetargetAction} with id "rename". This action maintains
1210
     * its enablement state.
1222
     * its enablement state.
1211
     */
1223
     */
1212
    public static final ActionFactory RENAME = new ActionFactory("rename") {//$NON-NLS-1$
1224
    public static final ActionFactory RENAME = new ActionFactory("rename", //$NON-NLS-1$
1225
    		IWorkbenchCommandConstants.FILE_RENAME) {
1213
       
1226
       
1214
        /* (non-Javadoc)
1227
        /* (non-Javadoc)
1215
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1228
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1221-1227 Link Here
1221
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_rename); 
1234
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_rename); 
1222
            action.setToolTipText(WorkbenchMessages.Workbench_renameToolTip);
1235
            action.setToolTipText(WorkbenchMessages.Workbench_renameToolTip);
1223
            window.getPartService().addPartListener(action);
1236
            window.getPartService().addPartListener(action);
1224
            action.setActionDefinitionId("org.eclipse.ui.edit.rename"); //$NON-NLS-1$
1237
            action.setActionDefinitionId(getCommandId()); 
1225
            return action;
1238
            return action;
1226
        }
1239
        }
1227
    };
1240
    };
Lines 1231-1237 Link Here
1231
     * perspective. This action maintains its enablement state.
1244
     * perspective. This action maintains its enablement state.
1232
     */
1245
     */
1233
    public static final ActionFactory RESET_PERSPECTIVE = new ActionFactory(
1246
    public static final ActionFactory RESET_PERSPECTIVE = new ActionFactory(
1234
            "resetPerspective") {//$NON-NLS-1$
1247
            "resetPerspective", IWorkbenchCommandConstants.WINDOW_RESETPERSPECTIVE) {//$NON-NLS-1$
1235
        
1248
        
1236
        /* (non-Javadoc)
1249
        /* (non-Javadoc)
1237
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1250
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1251-1257 Link Here
1251
     * {@link RetargetAction} with id "revert". This action maintains
1264
     * {@link RetargetAction} with id "revert". This action maintains
1252
     * its enablement state.
1265
     * its enablement state.
1253
     */
1266
     */
1254
    public static final ActionFactory REVERT = new ActionFactory("revert") {//$NON-NLS-1$
1267
    public static final ActionFactory REVERT = new ActionFactory("revert", //$NON-NLS-1$
1268
    		IWorkbenchCommandConstants.FILE_REVERT) {
1255
        
1269
        
1256
        /* (non-Javadoc)
1270
        /* (non-Javadoc)
1257
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1271
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1263-1269 Link Here
1263
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_revert);
1277
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_revert);
1264
            action.setToolTipText(WorkbenchMessages.Workbench_revertToolTip); 
1278
            action.setToolTipText(WorkbenchMessages.Workbench_revertToolTip); 
1265
            window.getPartService().addPartListener(action);
1279
            window.getPartService().addPartListener(action);
1266
            action.setActionDefinitionId("org.eclipse.ui.file.revert"); //$NON-NLS-1$
1280
            action.setActionDefinitionId(getCommandId()); 
1267
            return action;
1281
            return action;
1268
        }
1282
        }
1269
    };
1283
    };
Lines 1272-1278 Link Here
1272
     * Workbench action (id "save"): Save the active editor. This action
1286
     * Workbench action (id "save"): Save the active editor. This action
1273
     * maintains its enablement state.
1287
     * maintains its enablement state.
1274
     */
1288
     */
1275
    public static final ActionFactory SAVE = new ActionFactory("save") {//$NON-NLS-1$
1289
    public static final ActionFactory SAVE = new ActionFactory("save", //$NON-NLS-1$
1290
    		IWorkbenchCommandConstants.FILE_SAVE) {
1276
        
1291
        
1277
        /* (non-Javadoc)
1292
        /* (non-Javadoc)
1278
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1293
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1291-1297 Link Here
1291
     * Workbench action (id "saveAll"): Save all open editors with unsaved
1306
     * Workbench action (id "saveAll"): Save all open editors with unsaved
1292
     * changes. This action maintains its enablement state.
1307
     * changes. This action maintains its enablement state.
1293
     */
1308
     */
1294
    public static final ActionFactory SAVE_ALL = new ActionFactory("saveAll") {//$NON-NLS-1$
1309
    public static final ActionFactory SAVE_ALL = new ActionFactory("saveAll", //$NON-NLS-1$
1310
    		IWorkbenchCommandConstants.FILE_SAVEALL) {
1295
        
1311
        
1296
        /* (non-Javadoc)
1312
        /* (non-Javadoc)
1297
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1313
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1310-1316 Link Here
1310
     * Workbench action (id "saveAs"): Save As for the active editor. This
1326
     * Workbench action (id "saveAs"): Save As for the active editor. This
1311
     * action maintains its enablement state.
1327
     * action maintains its enablement state.
1312
     */
1328
     */
1313
    public static final ActionFactory SAVE_AS = new ActionFactory("saveAs") {//$NON-NLS-1$
1329
    public static final ActionFactory SAVE_AS = new ActionFactory("saveAs", //$NON-NLS-1$
1330
    		IWorkbenchCommandConstants.FILE_SAVEAS) {
1314
        
1331
        
1315
        /* (non-Javadoc)
1332
        /* (non-Javadoc)
1316
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1333
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1330-1336 Link Here
1330
     * This action maintains its enablement state.
1347
     * This action maintains its enablement state.
1331
     */
1348
     */
1332
    public static final ActionFactory SAVE_PERSPECTIVE = new ActionFactory(
1349
    public static final ActionFactory SAVE_PERSPECTIVE = new ActionFactory(
1333
            "savePerspective") {//$NON-NLS-1$
1350
            "savePerspective", IWorkbenchCommandConstants.WINDOW_SAVEPERSPECTIVEAS) {//$NON-NLS-1$
1334
        
1351
        
1335
        /* (non-Javadoc)
1352
        /* (non-Javadoc)
1336
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1353
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1351-1357 Link Here
1351
     * maintains its enablement state.
1368
     * maintains its enablement state.
1352
     */
1369
     */
1353
    public static final ActionFactory SELECT_ALL = new ActionFactory(
1370
    public static final ActionFactory SELECT_ALL = new ActionFactory(
1354
            "selectAll") {//$NON-NLS-1$
1371
            "selectAll", IWorkbenchCommandConstants.EDIT_SELECTALL) {//$NON-NLS-1$
1355
        
1372
        
1356
        /* (non-Javadoc)
1373
        /* (non-Javadoc)
1357
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1374
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1363-1369 Link Here
1363
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_selectAll);
1380
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_selectAll);
1364
            action.setToolTipText(WorkbenchMessages.Workbench_selectAllToolTip);
1381
            action.setToolTipText(WorkbenchMessages.Workbench_selectAllToolTip);
1365
            window.getPartService().addPartListener(action);
1382
            window.getPartService().addPartListener(action);
1366
            action.setActionDefinitionId("org.eclipse.ui.edit.selectAll"); //$NON-NLS-1$
1383
            action.setActionDefinitionId(getCommandId()); 
1367
            return action;
1384
            return action;
1368
        }
1385
        }
1369
    };
1386
    };
Lines 1508-1514 Link Here
1508
     * {@link RetargetAction} with id "undo". This action maintains
1525
     * {@link RetargetAction} with id "undo". This action maintains
1509
     * its enablement state.
1526
     * its enablement state.
1510
     */
1527
     */
1511
    public static final ActionFactory UNDO = new ActionFactory("undo") {//$NON-NLS-1$
1528
    public static final ActionFactory UNDO = new ActionFactory("undo", //$NON-NLS-1$
1529
    		IWorkbenchCommandConstants.EDIT_UNDO) {
1512
        
1530
        
1513
        /* (non-Javadoc)
1531
        /* (non-Javadoc)
1514
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1532
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1520-1526 Link Here
1520
            LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_undo);
1538
            LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_undo);
1521
            action.setToolTipText(WorkbenchMessages.Workbench_undoToolTip);
1539
            action.setToolTipText(WorkbenchMessages.Workbench_undoToolTip);
1522
            window.getPartService().addPartListener(action);
1540
            window.getPartService().addPartListener(action);
1523
            action.setActionDefinitionId("org.eclipse.ui.edit.undo"); //$NON-NLS-1$
1541
            action.setActionDefinitionId(getCommandId()); 
1524
            ISharedImages sharedImages = window.getWorkbench()
1542
            ISharedImages sharedImages = window.getWorkbench()
1525
                    .getSharedImages();
1543
                    .getSharedImages();
1526
            action.setImageDescriptor(sharedImages
1544
            action.setImageDescriptor(sharedImages
Lines 1536-1542 Link Here
1536
     * {@link RetargetAction} with id "up". This action maintains its
1554
     * {@link RetargetAction} with id "up". This action maintains its
1537
     * enablement state.
1555
     * enablement state.
1538
     */
1556
     */
1539
    public static final ActionFactory UP = new ActionFactory("up") {//$NON-NLS-1$
1557
    public static final ActionFactory UP = new ActionFactory("up", //$NON-NLS-1$
1558
    		IWorkbenchCommandConstants.NAVIGATE_UP) {
1540
        
1559
        
1541
        /* (non-Javadoc)
1560
        /* (non-Javadoc)
1542
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1561
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1548-1554 Link Here
1548
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_up); 
1567
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_up); 
1549
            action.setToolTipText(WorkbenchMessages.Workbench_upToolTip); 
1568
            action.setToolTipText(WorkbenchMessages.Workbench_upToolTip); 
1550
            window.getPartService().addPartListener(action);
1569
            window.getPartService().addPartListener(action);
1551
            action.setActionDefinitionId("org.eclipse.ui.navigate.up"); //$NON-NLS-1$
1570
            action.setActionDefinitionId(getCommandId());
1552
            return action;
1571
            return action;
1553
        }
1572
        }
1554
    };
1573
    };
Lines 1558-1564 Link Here
1558
     * is always enabled.
1577
     * is always enabled.
1559
     */
1578
     */
1560
    public static final ActionFactory HELP_CONTENTS = new ActionFactory(
1579
    public static final ActionFactory HELP_CONTENTS = new ActionFactory(
1561
            "helpContents") {//$NON-NLS-1$
1580
            "helpContents", IWorkbenchCommandConstants.HELP_HELPCONTENTS) {//$NON-NLS-1$
1562
        
1581
        
1563
        /* (non-Javadoc)
1582
        /* (non-Javadoc)
1564
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1583
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1580-1586 Link Here
1580
     * @since 3.1  
1599
     * @since 3.1  
1581
     */
1600
     */
1582
    public static final ActionFactory HELP_SEARCH = new ActionFactory(
1601
    public static final ActionFactory HELP_SEARCH = new ActionFactory(
1583
            "helpSearch") {//$NON-NLS-1$
1602
            "helpSearch", IWorkbenchCommandConstants.HELP_HELPSEARCH) {//$NON-NLS-1$
1584
        
1603
        
1585
        /* (non-Javadoc)
1604
        /* (non-Javadoc)
1586
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1605
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1602-1608 Link Here
1602
     * @since 3.1
1621
     * @since 3.1
1603
     */
1622
     */
1604
    public static final ActionFactory DYNAMIC_HELP = new ActionFactory(
1623
    public static final ActionFactory DYNAMIC_HELP = new ActionFactory(
1605
            "dynamicHelp") {//$NON-NLS-1$
1624
            "dynamicHelp", IWorkbenchCommandConstants.HELP_DYNAMICHELP) {//$NON-NLS-1$
1606
        
1625
        
1607
        /* (non-Javadoc)
1626
        /* (non-Javadoc)
1608
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1627
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1624-1630 Link Here
1624
     * @since 3.1
1643
     * @since 3.1
1625
     */
1644
     */
1626
    public static final ActionFactory OPEN_PERSPECTIVE_DIALOG = new ActionFactory(
1645
    public static final ActionFactory OPEN_PERSPECTIVE_DIALOG = new ActionFactory(
1627
            "openPerspectiveDialog") {//$NON-NLS-1$
1646
            "openPerspectiveDialog", IWorkbenchCommandConstants.PERSPECTIVES_SHOWPERSPECTIVE) {//$NON-NLS-1$
1628
       
1647
       
1629
        /* (non-Javadoc)
1648
        /* (non-Javadoc)
1630
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1649
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1635-1641 Link Here
1635
			}
1654
			}
1636
			
1655
			
1637
			WorkbenchCommandAction action = new WorkbenchCommandAction(
1656
			WorkbenchCommandAction action = new WorkbenchCommandAction(
1638
					"org.eclipse.ui.perspectives.showPerspective", window); //$NON-NLS-1$
1657
					getCommandId(), window); 
1639
			action.setId(getId());
1658
			action.setId(getId());
1640
	        action.setText(WorkbenchMessages.OpenPerspectiveDialogAction_text);
1659
	        action.setText(WorkbenchMessages.OpenPerspectiveDialogAction_text);
1641
	        action.setToolTipText(WorkbenchMessages.OpenPerspectiveDialogAction_tooltip);
1660
	        action.setToolTipText(WorkbenchMessages.OpenPerspectiveDialogAction_tooltip);
Lines 1653-1659 Link Here
1653
     * @since 3.1
1672
     * @since 3.1
1654
     */
1673
     */
1655
    public static final ActionFactory NEW_EDITOR = new ActionFactory(
1674
    public static final ActionFactory NEW_EDITOR = new ActionFactory(
1656
            "newEditor") {//$NON-NLS-1$
1675
            "newEditor", IWorkbenchCommandConstants.WINDOW_NEWEDITOR) {//$NON-NLS-1$
1657
       
1676
       
1658
        /* (non-Javadoc)
1677
        /* (non-Javadoc)
1659
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
1678
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 1663-1669 Link Here
1663
                throw new IllegalArgumentException();
1682
                throw new IllegalArgumentException();
1664
            }
1683
            }
1665
1684
1666
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.window.newEditor", window); //$NON-NLS-1$
1685
			WorkbenchCommandAction action = new WorkbenchCommandAction(
1686
					getCommandId(), window);
1667
			action.setId(getId());			
1687
			action.setId(getId());			
1668
			action.setText(WorkbenchMessages.NewEditorAction_text);
1688
			action.setText(WorkbenchMessages.NewEditorAction_text);
1669
			action.setToolTipText(WorkbenchMessages.NewEditorAction_tooltip);
1689
			action.setToolTipText(WorkbenchMessages.NewEditorAction_tooltip);

Return to bug 266839