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 128054 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 IDE action factory v03
actionFactory-v03.txt (text/plain), 12.09 KB, created by
Paul Webster
on 2009-03-09 12:53:57 EDT
(
hide
)
Description:
Command IDs and IDE action factory v03
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2009-03-09 12:53:57 EDT
Size:
12.09 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >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.4 >diff -u -r1.4 IWorkbenchCommandConstants.java >--- Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java 9 Mar 2009 16:36:53 -0000 1.4 >+++ Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java 9 Mar 2009 16:52:14 -0000 >@@ -185,6 +185,11 @@ > public static final String EDIT_FINDANDREPLACE = "org.eclipse.ui.edit.findReplace"; //$NON-NLS-1$ > > /** >+ * Id for command "Add Task" in category "Edit". >+ */ >+ public static final String EDIT_ADDTASK = "org.eclipse.ui.edit.addTask"; //$NON-NLS-1$ >+ >+ /** > * Id for command "Add Bookmark" in category "Edit" > * (value is <code>"org.eclipse.ui.edit.addBookmark"</code>). > */ >@@ -270,6 +275,33 @@ > */ > public static final String NAVIGATE_SHOWIN = "org.eclipse.ui.navigate.showIn"; //$NON-NLS-1$ > >+ // project category >+ >+ /** >+ * Id for command "Build All" in category "Project". >+ */ >+ public static final String PROJECT_BUILDALL = "org.eclipse.ui.project.buildAll"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Build Project" in category "Project". >+ */ >+ public static final String PROJECT_BUILDPROJECT = "org.eclipse.ui.project.buildProject"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Close Project" in category "Project". >+ */ >+ public static final String PROJECT_CLOSEPROJECT = "org.eclipse.ui.project.closeProject"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Close Unrelated Projects" in category "Project". >+ */ >+ public static final String PROJECT_CLOSEUNRELATEDPROJECTS = "org.eclipse.ui.project.closeUnrelatedProjects"; //$NON-NLS-1$ >+ >+ /** >+ * Id for command "Open Project" in category "Project". >+ */ >+ public static final String PROJECT_OPENPROJECT = "org.eclipse.ui.project.openProject"; //$NON-NLS-1$ >+ > // Window Category: > > /** >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/ide/IDEActionFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java,v >retrieving revision 1.34 >diff -u -r1.34 IDEActionFactory.java >--- src/org/eclipse/ui/ide/IDEActionFactory.java 16 Mar 2007 18:00:48 -0000 1.34 >+++ src/org/eclipse/ui/ide/IDEActionFactory.java 9 Mar 2009 16:52:16 -0000 >@@ -12,6 +12,7 @@ > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IncrementalProjectBuilder; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.actions.ActionFactory; > import org.eclipse.ui.actions.GlobalBuildAction; >@@ -57,7 +58,8 @@ > * This action is a {@link RetargetAction} with > * id "addTask". This action maintains its enablement state. > */ >- public static final ActionFactory ADD_TASK = new ActionFactory("addTask") { //$NON-NLS-1$ >+ public static final ActionFactory ADD_TASK = new ActionFactory("addTask", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.EDIT_ADDTASK) { > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -66,7 +68,7 @@ > RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.Workbench_addTask); > action.setToolTipText(IDEWorkbenchMessages.Workbench_addTaskToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.addTask"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -76,7 +78,8 @@ > * This action is a {@link RetargetAction} with > * id "bookmark". This action maintains its enablement state. > */ >- public static final ActionFactory BOOKMARK = new ActionFactory("bookmark") { //$NON-NLS-1$ >+ public static final ActionFactory BOOKMARK = new ActionFactory("bookmark", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.EDIT_ADDBOOKMARK) { > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -85,7 +88,7 @@ > RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.Workbench_addBookmark); > action.setToolTipText(IDEWorkbenchMessages.Workbench_addBookmarkToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.edit.addBookmark"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -94,7 +97,8 @@ > * IDE-specific workbench action: Incremental build. > * This action maintains its enablement state. > */ >- public static final ActionFactory BUILD = new ActionFactory("build") { //$NON-NLS-1$ >+ public static final ActionFactory BUILD = new ActionFactory("build", //$NON-NLS-1$ >+ IWorkbenchCommandConstants.PROJECT_BUILDALL) { > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -148,7 +152,7 @@ > * id "buildProject". This action maintains its enablement state. > */ > public static final ActionFactory BUILD_PROJECT = new ActionFactory( >- "buildProject") { //$NON-NLS-1$ >+ "buildProject", IWorkbenchCommandConstants.PROJECT_BUILDPROJECT) { //$NON-NLS-1$ > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -158,7 +162,7 @@ > IDEWorkbenchMessages.Workbench_buildProject); > action.setToolTipText(IDEWorkbenchMessages.Workbench_buildProjectToolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.project.buildProject"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -169,7 +173,7 @@ > * id "closeProject". This action maintains its enablement state. > */ > public static final ActionFactory CLOSE_PROJECT = new ActionFactory( >- "closeProject") { //$NON-NLS-1$ >+ "closeProject", IWorkbenchCommandConstants.PROJECT_CLOSEPROJECT) { //$NON-NLS-1$ > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -178,7 +182,7 @@ > RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.CloseResourceAction_text); > action.setToolTipText(IDEWorkbenchMessages.CloseResourceAction_text); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.project.closeProject"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -199,7 +203,7 @@ > * @since 3.2 > */ > public static final ActionFactory CLOSE_UNRELATED_PROJECTS = new ActionFactory( >- "closeUnrelatedProjects") { //$NON-NLS-1$ >+ "closeUnrelatedProjects", IWorkbenchCommandConstants.PROJECT_CLOSEUNRELATEDPROJECTS) { //$NON-NLS-1$ > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -208,7 +212,7 @@ > RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text); > action.setToolTipText(IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.project.closeUnrelatedProjects"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -241,7 +245,7 @@ > * id "openProject". This action maintains its enablement state. > */ > public static final ActionFactory OPEN_PROJECT = new ActionFactory( >- "openProject") { //$NON-NLS-1$ >+ "openProject", IWorkbenchCommandConstants.PROJECT_OPENPROJECT) { //$NON-NLS-1$ > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >@@ -250,7 +254,7 @@ > RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.OpenResourceAction_text); > action.setToolTipText(IDEWorkbenchMessages.OpenResourceAction_toolTip); > window.getPartService().addPartListener(action); >- action.setActionDefinitionId("org.eclipse.ui.project.openProject"); //$NON-NLS-1$ >+ action.setActionDefinitionId(getCommandId()); > return action; > } > }; >@@ -356,7 +360,7 @@ > * This action maintains its enablement state. > */ > public static final ActionFactory TIPS_AND_TRICKS = new ActionFactory( >- "tipsAndTricks") { //$NON-NLS-1$ >+ "tipsAndTricks", IWorkbenchCommandConstants.HELP_TIPSANDTRICKS) { //$NON-NLS-1$ > /* (non-javadoc) method declared on ActionFactory */ > public IWorkbenchAction create(IWorkbenchWindow window) { > if (window == null) { >Index: extensions/org/eclipse/ui/actions/GlobalBuildAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java,v >retrieving revision 1.30 >diff -u -r1.30 GlobalBuildAction.java >--- extensions/org/eclipse/ui/actions/GlobalBuildAction.java 9 Sep 2008 13:14:41 -0000 1.30 >+++ extensions/org/eclipse/ui/actions/GlobalBuildAction.java 9 Mar 2009 16:52:16 -0000 >@@ -31,6 +31,7 @@ > import org.eclipse.jface.dialogs.MessageDialog; > > import org.eclipse.ui.IWorkbench; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages; >@@ -126,7 +127,7 @@ > .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC)); > setDisabledImageDescriptor(IDEInternalWorkbenchImages > .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED)); >- setActionDefinitionId("org.eclipse.ui.project.buildAll"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.PROJECT_BUILDALL); > break; > case IncrementalProjectBuilder.FULL_BUILD: > setText(IDEWorkbenchMessages.GlobalBuildAction_rebuildText); >Index: src/org/eclipse/ui/internal/ide/TipsAndTricksAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/TipsAndTricksAction.java,v >retrieving revision 1.16 >diff -u -r1.16 TipsAndTricksAction.java >--- src/org/eclipse/ui/internal/ide/TipsAndTricksAction.java 5 Nov 2007 21:22:49 -0000 1.16 >+++ src/org/eclipse/ui/internal/ide/TipsAndTricksAction.java 9 Mar 2009 16:52:16 -0000 >@@ -23,6 +23,7 @@ > import org.eclipse.jface.window.Window; > import org.eclipse.swt.custom.BusyIndicator; > import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.IWorkbenchCommandConstants; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.actions.ActionFactory; > import org.eclipse.ui.actions.PartEventAction; >@@ -52,7 +53,7 @@ > setToolTipText(IDEWorkbenchMessages.TipsAndTricks_toolTip); > window.getWorkbench().getHelpSystem().setHelp(this, > IIDEHelpContextIds.TIPS_AND_TRICKS_ACTION); >- setActionDefinitionId("org.eclipse.ui.help.tipsAndTricksAction"); //$NON-NLS-1$ >+ setActionDefinitionId(IWorkbenchCommandConstants.HELP_TIPSANDTRICKS); > workbenchWindow.getPartService().addPartListener(this); > } >
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