Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 128052 Details for
Bug 266839
[GlobalActions] Provide more API for commandIDs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Command IDs and action factory v02
actionFactory-v02.txt (text/plain), 37.43 KB, created by
Paul Webster
on 2009-03-09 12:35:13 EDT
(
hide
)
Description:
Command IDs and action factory v02
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2009-03-09 12:35:13 EDT
Size:
37.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java,v >retrieving revision 1.22 >diff -u -r1.22 SaveAllAction.java >--- Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java 9 May 2008 14:13:13 -0000 1.22 >+++ Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java 9 Mar 2009 16:34:50 -0000 >@@ -19,6 +19,7 @@ > import org.eclipse.ui.ISaveablesLifecycleListener; > import org.eclipse.ui.ISaveablesSource; > import org.eclipse.ui.ISharedImages; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.IWorkbenchWindow; >@@ -60,7 +61,7 @@ > .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT)); > setDisabledImageDescriptor(WorkbenchImages > .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT_DISABLED)); >- setActionDefinitionId("org.eclipse.ui.file.saveAll"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVEALL); > } > > /* (non-Javadoc) >Index: Eclipse UI/org/eclipse/ui/internal/SaveAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java,v >retrieving revision 1.27 >diff -u -r1.27 SaveAction.java >--- Eclipse UI/org/eclipse/ui/internal/SaveAction.java 9 May 2008 14:13:13 -0000 1.27 >+++ Eclipse UI/org/eclipse/ui/internal/SaveAction.java 9 Mar 2009 16:34:50 -0000 >@@ -14,6 +14,7 @@ > import org.eclipse.ui.ISaveablePart; > import org.eclipse.ui.ISaveablesSource; > import org.eclipse.ui.ISharedImages; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchWindow; > >@@ -38,7 +39,7 @@ > .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT)); > setDisabledImageDescriptor(WorkbenchImages > .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED)); >- setActionDefinitionId("org.eclipse.ui.file.save"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVE); > ((WorkbenchWindow)window).addBackgroundSaveListener(this); > } > >Index: Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java,v >retrieving revision 1.13 >diff -u -r1.13 SavePerspectiveAction.java >--- Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java 30 Mar 2005 17:48:15 -0000 1.13 >+++ Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java 9 Mar 2009 16:34:50 -0000 >@@ -13,6 +13,7 @@ > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.ui.IPerspectiveDescriptor; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.internal.dialogs.SavePerspectiveDialog; >@@ -32,7 +33,7 @@ > public SavePerspectiveAction(IWorkbenchWindow window) { > super(window); > setText(WorkbenchMessages.SavePerspective_text); >- setActionDefinitionId("org.eclipse.ui.window.savePerspective"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_SAVEPERSPECTIVEAS); > // @issue missing action id > setToolTipText(WorkbenchMessages.SavePerspective_toolTip); > window.getWorkbench().getHelpSystem().setHelp(this, >Index: Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java,v >retrieving revision 1.18 >diff -u -r1.18 SaveAsAction.java >--- Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java 9 May 2008 14:13:13 -0000 1.18 >+++ Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java 9 Mar 2009 16:34:50 -0000 >@@ -13,6 +13,7 @@ > import org.eclipse.ui.IEditorPart; > import org.eclipse.ui.ISaveablePart; > import org.eclipse.ui.ISharedImages; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchWindow; > > /** >@@ -27,7 +28,7 @@ > */ > public SaveAsAction(IWorkbenchWindow window) { > super(WorkbenchMessages.SaveAs_text, window); >- setActionDefinitionId("org.eclipse.ui.file.saveAs"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVEAS); > setText(WorkbenchMessages.SaveAs_text); > setToolTipText(WorkbenchMessages.SaveAs_toolTip); > setId("saveAs"); //$NON-NLS-1$ >Index: Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java,v >retrieving revision 1.13 >diff -u -r1.13 ResetPerspectiveAction.java >--- Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java 8 May 2006 20:55:34 -0000 1.13 >+++ Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java 9 Mar 2009 16:34:50 -0000 >@@ -14,6 +14,7 @@ > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.osgi.util.NLS; > import org.eclipse.ui.IPerspectiveDescriptor; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PlatformUI; >@@ -37,7 +38,7 @@ > public ResetPerspectiveAction(IWorkbenchWindow window) { > super(window); > setText(WorkbenchMessages.ResetPerspective_text); >- setActionDefinitionId("org.eclipse.ui.window.resetPerspective"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_RESETPERSPECTIVE); > // @issue missing action id > setToolTipText(WorkbenchMessages.ResetPerspective_toolTip); > window.getWorkbench().getHelpSystem().setHelp(this, >Index: Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java,v >retrieving revision 1.3 >diff -u -r1.3 IWorkbenchCommandConstants.java >--- Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java 9 Mar 2009 15:06:23 -0000 1.3 >+++ Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java 9 Mar 2009 16:34:50 -0000 >@@ -303,6 +303,42 @@ > public static final String WINDOW_MINIMIZEACTIVEVIEWOREDITOR = "org.eclipse.ui.window.minimizePart"; //$NON-NLS-1$ > > /** >+ * Id for command "Next Editor" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.nextEditor"</code>). >+ */ >+ public static final String WINDOW_NEXTEDITOR = "org.eclipse.ui.window.nextEditor"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Previous Editor" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.previousEditor"</code>). >+ */ >+ public static final String WINDOW_PREVIOUSEDITOR = "org.eclipse.ui.window.previousEditor"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Next View" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.nextView"</code>). >+ */ >+ public static final String WINDOW_NEXTVIEW = "org.eclipse.ui.window.nextView"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Previous View" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.previousView"</code>). >+ */ >+ public static final String WINDOW_PREVIOUSVIEW = "org.eclipse.ui.window.previousView"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Next Perspective" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.nextPerspective"</code>). >+ */ >+ public static final String WINDOW_NEXTPERSPECTIVE = "org.eclipse.ui.window.nextPerspective"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Previous Perspective" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.previousPerspective"</code>). >+ */ >+ public static final String WINDOW_PREVIOUSPERSPECTIVE = "org.eclipse.ui.window.previousPerspective"; //$NON-NLS-1$ >+ >+ /** > * Id for command "Close All Perspectives" in category "Window" > * (value is <code>"org.eclipse.ui.window.closeAllPerspectives"</code>). > */ >@@ -339,6 +375,18 @@ > public static final String WINDOW_PREFERENCES = "org.eclipse.ui.window.preferences"; //$NON-NLS-1$ > > /** >+ * Id for command "Reset Perspective" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.resetPerspective"</code>). >+ */ >+ public static final String WINDOW_RESETPERSPECTIVE = "org.eclipse.ui.window.resetPerspective"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Save Perspective As" in category "Window" >+ * (value is <code>"org.eclipse.ui.window.savePerspective"</code>). >+ */ >+ public static final String WINDOW_SAVEPERSPECTIVEAS = "org.eclipse.ui.window.savePerspective"; //$NON-NLS-1$ >+ >+ /** > * Id for command "Show Key Assist" in category "Window" > * (value is <code>"org.eclipse.ui.window.showKeyAssist"</code>). > */ >Index: Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java,v >retrieving revision 1.3 >diff -u -r1.3 HelpSearchAction.java >--- Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java 25 Feb 2005 20:52:38 -0000 1.3 >+++ Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java 9 Mar 2009 16:34:50 -0000 >@@ -12,6 +12,7 @@ > > import org.eclipse.jface.action.Action; > import org.eclipse.swt.custom.BusyIndicator; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPreferenceConstants; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PlatformUI; >@@ -51,7 +52,7 @@ > throw new IllegalArgumentException(); > } > this.workbenchWindow = window; >- setActionDefinitionId("org.eclipse.ui.help.helpSearch"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELPSEARCH); > > // support for allowing a product to override the text for the action > String overrideText = PrefUtil.getAPIPreferenceStore().getString( >Index: Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java,v >retrieving revision 1.7 >diff -u -r1.7 HelpContentsAction.java >--- Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java 25 Feb 2005 20:52:38 -0000 1.7 >+++ Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java 9 Mar 2009 16:34:50 -0000 >@@ -12,6 +12,7 @@ > > import org.eclipse.jface.action.Action; > import org.eclipse.swt.custom.BusyIndicator; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPreferenceConstants; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PlatformUI; >@@ -51,7 +52,7 @@ > throw new IllegalArgumentException(); > } > this.workbenchWindow = window; >- setActionDefinitionId("org.eclipse.ui.help.helpContents"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELPCONTENTS); > > // support for allowing a product to override the text for the action > String overrideText = PrefUtil.getAPIPreferenceStore().getString( >Index: Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java,v >retrieving revision 1.3 >diff -u -r1.3 DynamicHelpAction.java >--- Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java 12 May 2005 23:00:59 -0000 1.3 >+++ Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java 9 Mar 2009 16:34:50 -0000 >@@ -12,6 +12,7 @@ > > import org.eclipse.jface.action.Action; > import org.eclipse.swt.custom.BusyIndicator; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchPreferenceConstants; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PlatformUI; >@@ -50,7 +51,7 @@ > throw new IllegalArgumentException(); > } > this.workbenchWindow = window; >- setActionDefinitionId("org.eclipse.ui.help.dynamicHelp"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.HELP_DYNAMICHELP); > > // support for allowing a product to override the text for the action > String overrideText = PrefUtil.getAPIPreferenceStore().getString( >Index: Eclipse UI/org/eclipse/ui/actions/ActionFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java,v >retrieving revision 1.72 >diff -u -r1.72 ActionFactory.java >--- Eclipse UI/org/eclipse/ui/actions/ActionFactory.java 9 Mar 2009 15:06:23 -0000 1.72 >+++ Eclipse UI/org/eclipse/ui/actions/ActionFactory.java 9 Mar 2009 16:34:50 -0000 >@@ -775,7 +775,8 @@ > * {@link RetargetAction} with id "next". This action maintains > * its enablement state. > */ >- public static final ActionFactory NEXT = new ActionFactory("next") {//$NON-NLS-1$ >+ public static final ActionFactory NEXT = new ActionFactory("next", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.NAVIGATE_NEXT) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -787,7 +788,7 @@ > RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_next); > action.setToolTipText(WorkbenchMessages.Workbench_nextToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.navigate.next"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -803,7 +804,7 @@ > * </p> > */ > public static final ActionFactory NEXT_EDITOR = new ActionFactory( >- "nextEditor") {//$NON-NLS-1$ >+ "nextEditor", IWorkbenchCommandConstants.WINDOW_NEXTEDITOR) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -813,8 +814,7 @@ > throw new IllegalArgumentException(); > } > IWorkbenchAction action = new WorkbenchCommandAction( >- "org.eclipse.ui.window.nextEditor", //$NON-NLS-1$ >- window); >+ getCommandId(), window); > > action.setId(getId()); > action.setText(WorkbenchMessages.CycleEditorAction_next_text); >@@ -837,7 +837,8 @@ > * ActionFactory.linkCycleActionPair</code>} to connect the two. > * </p> > */ >- public static final ActionFactory NEXT_PART = new ActionFactory("nextPart") {//$NON-NLS-1$ >+ public static final ActionFactory NEXT_PART = new ActionFactory("nextPart", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.WINDOW_NEXTVIEW) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -846,7 +847,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.nextView",window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.CyclePartAction_next_text); > action.setToolTipText(WorkbenchMessages.CyclePartAction_next_toolTip); >@@ -868,7 +870,7 @@ > * </p> > */ > public static final ActionFactory NEXT_PERSPECTIVE = new ActionFactory( >- "nextPerspective") {//$NON-NLS-1$ >+ "nextPerspective", IWorkbenchCommandConstants.WINDOW_NEXTPERSPECTIVE) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -877,7 +879,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.nextPerspective",window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.CyclePerspectiveAction_next_text); > action.setToolTipText(WorkbenchMessages.CyclePerspectiveAction_next_toolTip); >@@ -893,7 +896,7 @@ > * action maintains its enablement state. > */ > public static final ActionFactory OPEN_NEW_WINDOW = new ActionFactory( >- "openNewWindow") {//$NON-NLS-1$ >+ "openNewWindow", IWorkbenchCommandConstants.WINDOW_NEWWINDOW) {//$NON-NLS-1$ > > > /* (non-Javadoc) >@@ -903,7 +906,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.window.newWindow", window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.OpenInNewWindowAction_text); > action.setToolTipText(WorkbenchMessages.OpenInNewWindowAction_toolTip); >@@ -919,7 +923,8 @@ > * {@link RetargetAction} with id "paste". This action maintains > * its enablement state. > */ >- public static final ActionFactory PASTE = new ActionFactory("paste") {//$NON-NLS-1$ >+ public static final ActionFactory PASTE = new ActionFactory("paste", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.EDIT_PASTE) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -931,7 +936,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_paste); > action.setToolTipText(WorkbenchMessages.Workbench_pasteToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.paste"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > ISharedImages sharedImages = window.getWorkbench() > .getSharedImages(); > action.setImageDescriptor(sharedImages >@@ -947,7 +952,7 @@ > * This action maintains its enablement state. > */ > public static final ActionFactory PREFERENCES = new ActionFactory( >- "preferences") {//$NON-NLS-1$ >+ "preferences", IWorkbenchCommandConstants.WINDOW_PREFERENCES) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -967,7 +972,8 @@ > * {@link RetargetAction} with id "previous". This action > * maintains its enablement state. > */ >- public static final ActionFactory PREVIOUS = new ActionFactory("previous") {//$NON-NLS-1$ >+ public static final ActionFactory PREVIOUS = new ActionFactory("previous", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.NAVIGATE_PREVIOUS) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -979,7 +985,7 @@ > RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_previous); > action.setToolTipText(WorkbenchMessages.Workbench_previousToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.navigate.previous"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -995,7 +1001,7 @@ > * </p> > */ > public static final ActionFactory PREVIOUS_EDITOR = new ActionFactory( >- "previousEditor") {//$NON-NLS-1$ >+ "previousEditor", IWorkbenchCommandConstants.WINDOW_PREVIOUSEDITOR) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1004,9 +1010,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- IWorkbenchAction action = new WorkbenchCommandAction( >- "org.eclipse.ui.window.previousEditor", //$NON-NLS-1$ >- window); >+ IWorkbenchAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.CycleEditorAction_prev_text); > action.setToolTipText(WorkbenchMessages.CycleEditorAction_prev_toolTip); >@@ -1029,7 +1034,7 @@ > * </p> > */ > public static final ActionFactory PREVIOUS_PART = new ActionFactory( >- "previousPart") {//$NON-NLS-1$ >+ "previousPart", IWorkbenchCommandConstants.WINDOW_PREVIOUSVIEW) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1038,7 +1043,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.previousView",window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.CyclePartAction_prev_text); > action.setToolTipText(WorkbenchMessages.CyclePartAction_prev_toolTip); >@@ -1060,7 +1066,7 @@ > * </p> > */ > public static final ActionFactory PREVIOUS_PERSPECTIVE = new ActionFactory( >- "previousPerspective") {//$NON-NLS-1$ >+ "previousPerspective", IWorkbenchCommandConstants.WINDOW_PREVIOUSPERSPECTIVE) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1069,7 +1075,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.window.previousPerspective",window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.CyclePerspectiveAction_prev_text); > action.setToolTipText(WorkbenchMessages.CyclePerspectiveAction_prev_toolTip); >@@ -1085,7 +1092,8 @@ > * {@link RetargetAction} with id "print". This action maintains > * its enablement state. > */ >- public static final ActionFactory PRINT = new ActionFactory("print") {//$NON-NLS-1$ >+ public static final ActionFactory PRINT = new ActionFactory("print", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_PRINT) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1097,7 +1105,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_print); > action.setToolTipText(WorkbenchMessages.Workbench_printToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.file.print"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > action > .setImageDescriptor(WorkbenchImages > .getImageDescriptor(ISharedImages.IMG_ETOOL_PRINT_EDIT)); >@@ -1114,7 +1122,7 @@ > * maintains its enablement state. > */ > public static final ActionFactory PROPERTIES = new ActionFactory( >- "properties") {//$NON-NLS-1$ >+ "properties", IWorkbenchCommandConstants.FILE_PROPERTIES) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1126,7 +1134,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_properties); > action.setToolTipText(WorkbenchMessages.Workbench_propertiesToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.file.properties"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -1135,7 +1143,8 @@ > * Workbench action (id "quit"): Quit (close the workbench). This action > * maintains its enablement state. > */ >- public static final ActionFactory QUIT = new ActionFactory("quit") {//$NON-NLS-1$ >+ public static final ActionFactory QUIT = new ActionFactory("quit", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_EXIT) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1144,7 +1153,8 @@ > if (window == null) { > throw new IllegalArgumentException(); > } >- WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.file.exit", window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.Exit_text); > action.setToolTipText(WorkbenchMessages.Exit_toolTip); >@@ -1159,7 +1169,8 @@ > * {@link RetargetAction} with id "redo". This action maintains > * its enablement state. > */ >- public static final ActionFactory REDO = new ActionFactory("redo") {//$NON-NLS-1$ >+ public static final ActionFactory REDO = new ActionFactory("redo", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.EDIT_REDO) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1171,7 +1182,7 @@ > LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_redo); > action.setToolTipText(WorkbenchMessages.Workbench_redoToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.redo"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > ISharedImages sharedImages = window.getWorkbench() > .getSharedImages(); > action.setImageDescriptor(sharedImages >@@ -1187,7 +1198,8 @@ > * {@link RetargetAction} with id "refresh". This action > * maintains its enablement state. > */ >- public static final ActionFactory REFRESH = new ActionFactory("refresh") {//$NON-NLS-1$ >+ public static final ActionFactory REFRESH = new ActionFactory("refresh", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_REFRESH) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1199,7 +1211,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_refresh); > action.setToolTipText(WorkbenchMessages.Workbench_refreshToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -1209,7 +1221,8 @@ > * {@link RetargetAction} with id "rename". This action maintains > * its enablement state. > */ >- public static final ActionFactory RENAME = new ActionFactory("rename") {//$NON-NLS-1$ >+ public static final ActionFactory RENAME = new ActionFactory("rename", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_RENAME) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1221,7 +1234,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_rename); > action.setToolTipText(WorkbenchMessages.Workbench_renameToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.rename"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -1231,7 +1244,7 @@ > * perspective. This action maintains its enablement state. > */ > public static final ActionFactory RESET_PERSPECTIVE = new ActionFactory( >- "resetPerspective") {//$NON-NLS-1$ >+ "resetPerspective", IWorkbenchCommandConstants.WINDOW_RESETPERSPECTIVE) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1251,7 +1264,8 @@ > * {@link RetargetAction} with id "revert". This action maintains > * its enablement state. > */ >- public static final ActionFactory REVERT = new ActionFactory("revert") {//$NON-NLS-1$ >+ public static final ActionFactory REVERT = new ActionFactory("revert", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_REVERT) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1263,7 +1277,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_revert); > action.setToolTipText(WorkbenchMessages.Workbench_revertToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.file.revert"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -1272,7 +1286,8 @@ > * Workbench action (id "save"): Save the active editor. This action > * maintains its enablement state. > */ >- public static final ActionFactory SAVE = new ActionFactory("save") {//$NON-NLS-1$ >+ public static final ActionFactory SAVE = new ActionFactory("save", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_SAVE) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1291,7 +1306,8 @@ > * Workbench action (id "saveAll"): Save all open editors with unsaved > * changes. This action maintains its enablement state. > */ >- public static final ActionFactory SAVE_ALL = new ActionFactory("saveAll") {//$NON-NLS-1$ >+ public static final ActionFactory SAVE_ALL = new ActionFactory("saveAll", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_SAVEALL) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1310,7 +1326,8 @@ > * Workbench action (id "saveAs"): Save As for the active editor. This > * action maintains its enablement state. > */ >- public static final ActionFactory SAVE_AS = new ActionFactory("saveAs") {//$NON-NLS-1$ >+ public static final ActionFactory SAVE_AS = new ActionFactory("saveAs", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.FILE_SAVEAS) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1330,7 +1347,7 @@ > * This action maintains its enablement state. > */ > public static final ActionFactory SAVE_PERSPECTIVE = new ActionFactory( >- "savePerspective") {//$NON-NLS-1$ >+ "savePerspective", IWorkbenchCommandConstants.WINDOW_SAVEPERSPECTIVEAS) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1351,7 +1368,7 @@ > * maintains its enablement state. > */ > public static final ActionFactory SELECT_ALL = new ActionFactory( >- "selectAll") {//$NON-NLS-1$ >+ "selectAll", IWorkbenchCommandConstants.EDIT_SELECTALL) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1363,7 +1380,7 @@ > RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_selectAll); > action.setToolTipText(WorkbenchMessages.Workbench_selectAllToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.selectAll"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -1508,7 +1525,8 @@ > * {@link RetargetAction} with id "undo". This action maintains > * its enablement state. > */ >- public static final ActionFactory UNDO = new ActionFactory("undo") {//$NON-NLS-1$ >+ public static final ActionFactory UNDO = new ActionFactory("undo", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.EDIT_UNDO) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1520,7 +1538,7 @@ > LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_undo); > action.setToolTipText(WorkbenchMessages.Workbench_undoToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.undo"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > ISharedImages sharedImages = window.getWorkbench() > .getSharedImages(); > action.setImageDescriptor(sharedImages >@@ -1536,7 +1554,8 @@ > * {@link RetargetAction} with id "up". This action maintains its > * enablement state. > */ >- public static final ActionFactory UP = new ActionFactory("up") {//$NON-NLS-1$ >+ public static final ActionFactory UP = new ActionFactory("up", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.NAVIGATE_UP) { > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1548,7 +1567,7 @@ > RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_up); > action.setToolTipText(WorkbenchMessages.Workbench_upToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.navigate.up"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -1558,7 +1577,7 @@ > * is always enabled. > */ > public static final ActionFactory HELP_CONTENTS = new ActionFactory( >- "helpContents") {//$NON-NLS-1$ >+ "helpContents", IWorkbenchCommandConstants.HELP_HELPCONTENTS) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1580,7 +1599,7 @@ > * @since 3.1 > */ > public static final ActionFactory HELP_SEARCH = new ActionFactory( >- "helpSearch") {//$NON-NLS-1$ >+ "helpSearch", IWorkbenchCommandConstants.HELP_HELPSEARCH) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1602,7 +1621,7 @@ > * @since 3.1 > */ > public static final ActionFactory DYNAMIC_HELP = new ActionFactory( >- "dynamicHelp") {//$NON-NLS-1$ >+ "dynamicHelp", IWorkbenchCommandConstants.HELP_DYNAMICHELP) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1624,7 +1643,7 @@ > * @since 3.1 > */ > public static final ActionFactory OPEN_PERSPECTIVE_DIALOG = new ActionFactory( >- "openPerspectiveDialog") {//$NON-NLS-1$ >+ "openPerspectiveDialog", IWorkbenchCommandConstants.PERSPECTIVES_SHOWPERSPECTIVE) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1635,7 +1654,7 @@ > } > > WorkbenchCommandAction action = new WorkbenchCommandAction( >- "org.eclipse.ui.perspectives.showPerspective", window); //$NON-NLS-1$ >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.OpenPerspectiveDialogAction_text); > action.setToolTipText(WorkbenchMessages.OpenPerspectiveDialogAction_tooltip); >@@ -1653,7 +1672,7 @@ > * @since 3.1 > */ > public static final ActionFactory NEW_EDITOR = new ActionFactory( >- "newEditor") {//$NON-NLS-1$ >+ "newEditor", IWorkbenchCommandConstants.WINDOW_NEWEDITOR) {//$NON-NLS-1$ > > /* (non-Javadoc) > * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) >@@ -1663,7 +1682,8 @@ > throw new IllegalArgumentException(); > } > >- WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.window.newEditor", window); //$NON-NLS-1$ >+ WorkbenchCommandAction action = new WorkbenchCommandAction( >+ getCommandId(), window); > action.setId(getId()); > action.setText(WorkbenchMessages.NewEditorAction_text); > action.setToolTipText(WorkbenchMessages.NewEditorAction_tooltip);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 266839
:
128037
| 128052 |
128054
|
128075