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/IWorkbenchCommandConstants.java (+32 lines)
Lines 185-190 Link Here
185
    public static final String EDIT_FINDANDREPLACE = "org.eclipse.ui.edit.findReplace"; //$NON-NLS-1$
185
    public static final String EDIT_FINDANDREPLACE = "org.eclipse.ui.edit.findReplace"; //$NON-NLS-1$
186
186
187
    /**
187
    /**
188
     * Id for command "Add Task" in category "Edit".
189
     */
190
    public static final String EDIT_ADDTASK = "org.eclipse.ui.edit.addTask"; //$NON-NLS-1$
191
192
    /**
188
     * Id for command "Add Bookmark" in category "Edit"
193
     * Id for command "Add Bookmark" in category "Edit"
189
     * (value is <code>"org.eclipse.ui.edit.addBookmark"</code>).
194
     * (value is <code>"org.eclipse.ui.edit.addBookmark"</code>).
190
     */
195
     */
Lines 270-275 Link Here
270
     */
275
     */
271
    public static final String NAVIGATE_SHOWIN = "org.eclipse.ui.navigate.showIn"; //$NON-NLS-1$
276
    public static final String NAVIGATE_SHOWIN = "org.eclipse.ui.navigate.showIn"; //$NON-NLS-1$
272
277
278
    // project category
279
    
280
    /**
281
     * Id for command "Build All" in category "Project".
282
     */
283
    public static final String PROJECT_BUILDALL = "org.eclipse.ui.project.buildAll"; //$NON-NLS-1$
284
285
    /**
286
     * Id for command "Build Project" in category "Project".
287
     */
288
    public static final String PROJECT_BUILDPROJECT = "org.eclipse.ui.project.buildProject"; //$NON-NLS-1$
289
290
    /**
291
     * Id for command "Close Project" in category "Project".
292
     */
293
    public static final String PROJECT_CLOSEPROJECT = "org.eclipse.ui.project.closeProject"; //$NON-NLS-1$
294
295
    /**
296
     * Id for command "Close Unrelated Projects" in category "Project".
297
     */
298
    public static final String PROJECT_CLOSEUNRELATEDPROJECTS = "org.eclipse.ui.project.closeUnrelatedProjects"; //$NON-NLS-1$
299
300
    /**
301
     * Id for command "Open Project" in category "Project".
302
     */
303
    public static final String PROJECT_OPENPROJECT = "org.eclipse.ui.project.openProject"; //$NON-NLS-1$
304
273
    // Window Category:
305
    // Window Category:
274
306
275
    /**
307
    /**
(-)src/org/eclipse/ui/ide/IDEActionFactory.java (-14 / +18 lines)
Lines 12-17 Link Here
12
12
13
import org.eclipse.core.resources.IProject;
13
import org.eclipse.core.resources.IProject;
14
import org.eclipse.core.resources.IncrementalProjectBuilder;
14
import org.eclipse.core.resources.IncrementalProjectBuilder;
15
import org.eclipse.ui.IWorkbenchCommandConstants;
15
import org.eclipse.ui.IWorkbenchWindow;
16
import org.eclipse.ui.IWorkbenchWindow;
16
import org.eclipse.ui.actions.ActionFactory;
17
import org.eclipse.ui.actions.ActionFactory;
17
import org.eclipse.ui.actions.GlobalBuildAction;
18
import org.eclipse.ui.actions.GlobalBuildAction;
Lines 57-63 Link Here
57
     * This action is a {@link RetargetAction} with 
58
     * This action is a {@link RetargetAction} with 
58
     * id "addTask". This action maintains its enablement state.
59
     * id "addTask". This action maintains its enablement state.
59
     */
60
     */
60
    public static final ActionFactory ADD_TASK = new ActionFactory("addTask") { //$NON-NLS-1$
61
    public static final ActionFactory ADD_TASK = new ActionFactory("addTask", //$NON-NLS-1$
62
    		IWorkbenchCommandConstants.EDIT_ADDTASK) { 
61
        /* (non-javadoc) method declared on ActionFactory */
63
        /* (non-javadoc) method declared on ActionFactory */
62
        public IWorkbenchAction create(IWorkbenchWindow window) {
64
        public IWorkbenchAction create(IWorkbenchWindow window) {
63
            if (window == null) {
65
            if (window == null) {
Lines 66-72 Link Here
66
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.Workbench_addTask);
68
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.Workbench_addTask);
67
            action.setToolTipText(IDEWorkbenchMessages.Workbench_addTaskToolTip);
69
            action.setToolTipText(IDEWorkbenchMessages.Workbench_addTaskToolTip);
68
            window.getPartService().addPartListener(action);
70
            window.getPartService().addPartListener(action);
69
            action.setActionDefinitionId("org.eclipse.ui.edit.addTask"); //$NON-NLS-1$
71
            action.setActionDefinitionId(getCommandId());
70
            return action;
72
            return action;
71
        }
73
        }
72
    };
74
    };
Lines 76-82 Link Here
76
     * This action is a {@link RetargetAction} with 
78
     * This action is a {@link RetargetAction} with 
77
     * id "bookmark". This action maintains its enablement state.
79
     * id "bookmark". This action maintains its enablement state.
78
     */
80
     */
79
    public static final ActionFactory BOOKMARK = new ActionFactory("bookmark") { //$NON-NLS-1$
81
    public static final ActionFactory BOOKMARK = new ActionFactory("bookmark", //$NON-NLS-1$
82
    		IWorkbenchCommandConstants.EDIT_ADDBOOKMARK) { 
80
        /* (non-javadoc) method declared on ActionFactory */
83
        /* (non-javadoc) method declared on ActionFactory */
81
        public IWorkbenchAction create(IWorkbenchWindow window) {
84
        public IWorkbenchAction create(IWorkbenchWindow window) {
82
            if (window == null) {
85
            if (window == null) {
Lines 85-91 Link Here
85
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.Workbench_addBookmark);
88
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.Workbench_addBookmark);
86
            action.setToolTipText(IDEWorkbenchMessages.Workbench_addBookmarkToolTip);
89
            action.setToolTipText(IDEWorkbenchMessages.Workbench_addBookmarkToolTip);
87
            window.getPartService().addPartListener(action);
90
            window.getPartService().addPartListener(action);
88
            action.setActionDefinitionId("org.eclipse.ui.edit.addBookmark"); //$NON-NLS-1$
91
            action.setActionDefinitionId(getCommandId());
89
            return action;
92
            return action;
90
        }
93
        }
91
    };
94
    };
Lines 94-100 Link Here
94
     * IDE-specific workbench action: Incremental build.
97
     * IDE-specific workbench action: Incremental build.
95
     * This action maintains its enablement state.
98
     * This action maintains its enablement state.
96
     */
99
     */
97
    public static final ActionFactory BUILD = new ActionFactory("build") { //$NON-NLS-1$
100
    public static final ActionFactory BUILD = new ActionFactory("build",  //$NON-NLS-1$
101
    		IWorkbenchCommandConstants.PROJECT_BUILDALL) {
98
        /* (non-javadoc) method declared on ActionFactory */
102
        /* (non-javadoc) method declared on ActionFactory */
99
        public IWorkbenchAction create(IWorkbenchWindow window) {
103
        public IWorkbenchAction create(IWorkbenchWindow window) {
100
            if (window == null) {
104
            if (window == null) {
Lines 148-154 Link Here
148
     * id "buildProject". This action maintains its enablement state.
152
     * id "buildProject". This action maintains its enablement state.
149
     */
153
     */
150
    public static final ActionFactory BUILD_PROJECT = new ActionFactory(
154
    public static final ActionFactory BUILD_PROJECT = new ActionFactory(
151
            "buildProject") { //$NON-NLS-1$
155
            "buildProject", IWorkbenchCommandConstants.PROJECT_BUILDPROJECT) { //$NON-NLS-1$
152
        /* (non-javadoc) method declared on ActionFactory */
156
        /* (non-javadoc) method declared on ActionFactory */
153
        public IWorkbenchAction create(IWorkbenchWindow window) {
157
        public IWorkbenchAction create(IWorkbenchWindow window) {
154
            if (window == null) {
158
            if (window == null) {
Lines 158-164 Link Here
158
                    IDEWorkbenchMessages.Workbench_buildProject);
162
                    IDEWorkbenchMessages.Workbench_buildProject);
159
            action.setToolTipText(IDEWorkbenchMessages.Workbench_buildProjectToolTip);
163
            action.setToolTipText(IDEWorkbenchMessages.Workbench_buildProjectToolTip);
160
            window.getPartService().addPartListener(action);
164
            window.getPartService().addPartListener(action);
161
            action.setActionDefinitionId("org.eclipse.ui.project.buildProject"); //$NON-NLS-1$
165
            action.setActionDefinitionId(getCommandId());
162
            return action;
166
            return action;
163
        }
167
        }
164
    };
168
    };
Lines 169-175 Link Here
169
     * id "closeProject". This action maintains its enablement state.
173
     * id "closeProject". This action maintains its enablement state.
170
     */
174
     */
171
    public static final ActionFactory CLOSE_PROJECT = new ActionFactory(
175
    public static final ActionFactory CLOSE_PROJECT = new ActionFactory(
172
            "closeProject") { //$NON-NLS-1$
176
            "closeProject", IWorkbenchCommandConstants.PROJECT_CLOSEPROJECT) { //$NON-NLS-1$
173
        /* (non-javadoc) method declared on ActionFactory */
177
        /* (non-javadoc) method declared on ActionFactory */
174
        public IWorkbenchAction create(IWorkbenchWindow window) {
178
        public IWorkbenchAction create(IWorkbenchWindow window) {
175
            if (window == null) {
179
            if (window == null) {
Lines 178-184 Link Here
178
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.CloseResourceAction_text);
182
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.CloseResourceAction_text);
179
            action.setToolTipText(IDEWorkbenchMessages.CloseResourceAction_text);
183
            action.setToolTipText(IDEWorkbenchMessages.CloseResourceAction_text);
180
            window.getPartService().addPartListener(action);
184
            window.getPartService().addPartListener(action);
181
            action.setActionDefinitionId("org.eclipse.ui.project.closeProject"); //$NON-NLS-1$
185
            action.setActionDefinitionId(getCommandId());
182
            return action;
186
            return action;
183
        }
187
        }
184
    };
188
    };
Lines 199-205 Link Here
199
     * @since 3.2
203
     * @since 3.2
200
     */
204
     */
201
    public static final ActionFactory CLOSE_UNRELATED_PROJECTS = new ActionFactory(
205
    public static final ActionFactory CLOSE_UNRELATED_PROJECTS = new ActionFactory(
202
            "closeUnrelatedProjects") { //$NON-NLS-1$
206
            "closeUnrelatedProjects", IWorkbenchCommandConstants.PROJECT_CLOSEUNRELATEDPROJECTS) { //$NON-NLS-1$
203
        /* (non-javadoc) method declared on ActionFactory */
207
        /* (non-javadoc) method declared on ActionFactory */
204
        public IWorkbenchAction create(IWorkbenchWindow window) {
208
        public IWorkbenchAction create(IWorkbenchWindow window) {
205
            if (window == null) {
209
            if (window == null) {
Lines 208-214 Link Here
208
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text);
212
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text);
209
            action.setToolTipText(IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip);
213
            action.setToolTipText(IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip);
210
            window.getPartService().addPartListener(action);
214
            window.getPartService().addPartListener(action);
211
            action.setActionDefinitionId("org.eclipse.ui.project.closeUnrelatedProjects"); //$NON-NLS-1$
215
            action.setActionDefinitionId(getCommandId()); 
212
            return action;
216
            return action;
213
        }
217
        }
214
    };
218
    };
Lines 241-247 Link Here
241
     * id "openProject". This action maintains its enablement state.
245
     * id "openProject". This action maintains its enablement state.
242
     */
246
     */
243
    public static final ActionFactory OPEN_PROJECT = new ActionFactory(
247
    public static final ActionFactory OPEN_PROJECT = new ActionFactory(
244
            "openProject") { //$NON-NLS-1$
248
            "openProject", IWorkbenchCommandConstants.PROJECT_OPENPROJECT) { //$NON-NLS-1$
245
        /* (non-javadoc) method declared on ActionFactory */
249
        /* (non-javadoc) method declared on ActionFactory */
246
        public IWorkbenchAction create(IWorkbenchWindow window) {
250
        public IWorkbenchAction create(IWorkbenchWindow window) {
247
            if (window == null) {
251
            if (window == null) {
Lines 250-256 Link Here
250
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.OpenResourceAction_text);
254
            RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.OpenResourceAction_text);
251
            action.setToolTipText(IDEWorkbenchMessages.OpenResourceAction_toolTip);
255
            action.setToolTipText(IDEWorkbenchMessages.OpenResourceAction_toolTip);
252
            window.getPartService().addPartListener(action);
256
            window.getPartService().addPartListener(action);
253
            action.setActionDefinitionId("org.eclipse.ui.project.openProject"); //$NON-NLS-1$
257
            action.setActionDefinitionId(getCommandId()); 
254
            return action;
258
            return action;
255
        }
259
        }
256
    };
260
    };
Lines 356-362 Link Here
356
     * This action maintains its enablement state.
360
     * This action maintains its enablement state.
357
     */
361
     */
358
    public static final ActionFactory TIPS_AND_TRICKS = new ActionFactory(
362
    public static final ActionFactory TIPS_AND_TRICKS = new ActionFactory(
359
            "tipsAndTricks") { //$NON-NLS-1$
363
            "tipsAndTricks", IWorkbenchCommandConstants.HELP_TIPSANDTRICKS) { //$NON-NLS-1$
360
        /* (non-javadoc) method declared on ActionFactory */
364
        /* (non-javadoc) method declared on ActionFactory */
361
        public IWorkbenchAction create(IWorkbenchWindow window) {
365
        public IWorkbenchAction create(IWorkbenchWindow window) {
362
            if (window == null) {
366
            if (window == null) {
(-)extensions/org/eclipse/ui/actions/GlobalBuildAction.java (-1 / +2 lines)
Lines 31-36 Link Here
31
import org.eclipse.jface.dialogs.MessageDialog;
31
import org.eclipse.jface.dialogs.MessageDialog;
32
32
33
import org.eclipse.ui.IWorkbench;
33
import org.eclipse.ui.IWorkbench;
34
import org.eclipse.ui.IWorkbenchCommandConstants;
34
import org.eclipse.ui.IWorkbenchWindow;
35
import org.eclipse.ui.IWorkbenchWindow;
35
import org.eclipse.ui.PlatformUI;
36
import org.eclipse.ui.PlatformUI;
36
import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
37
import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
Lines 126-132 Link Here
126
                    .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC));
127
                    .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC));
127
            setDisabledImageDescriptor(IDEInternalWorkbenchImages
128
            setDisabledImageDescriptor(IDEInternalWorkbenchImages
128
                    .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED));
129
                    .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED));
129
            setActionDefinitionId("org.eclipse.ui.project.buildAll"); //$NON-NLS-1$
130
            setActionDefinitionId(IWorkbenchCommandConstants.PROJECT_BUILDALL);
130
            break;
131
            break;
131
        case IncrementalProjectBuilder.FULL_BUILD:
132
        case IncrementalProjectBuilder.FULL_BUILD:
132
            setText(IDEWorkbenchMessages.GlobalBuildAction_rebuildText);
133
            setText(IDEWorkbenchMessages.GlobalBuildAction_rebuildText);
(-)src/org/eclipse/ui/internal/ide/TipsAndTricksAction.java (-1 / +2 lines)
Lines 23-28 Link Here
23
import org.eclipse.jface.window.Window;
23
import org.eclipse.jface.window.Window;
24
import org.eclipse.swt.custom.BusyIndicator;
24
import org.eclipse.swt.custom.BusyIndicator;
25
import org.eclipse.swt.widgets.Shell;
25
import org.eclipse.swt.widgets.Shell;
26
import org.eclipse.ui.IWorkbenchCommandConstants;
26
import org.eclipse.ui.IWorkbenchWindow;
27
import org.eclipse.ui.IWorkbenchWindow;
27
import org.eclipse.ui.actions.ActionFactory;
28
import org.eclipse.ui.actions.ActionFactory;
28
import org.eclipse.ui.actions.PartEventAction;
29
import org.eclipse.ui.actions.PartEventAction;
Lines 52-58 Link Here
52
        setToolTipText(IDEWorkbenchMessages.TipsAndTricks_toolTip);
53
        setToolTipText(IDEWorkbenchMessages.TipsAndTricks_toolTip);
53
        window.getWorkbench().getHelpSystem().setHelp(this,
54
        window.getWorkbench().getHelpSystem().setHelp(this,
54
				IIDEHelpContextIds.TIPS_AND_TRICKS_ACTION);
55
				IIDEHelpContextIds.TIPS_AND_TRICKS_ACTION);
55
        setActionDefinitionId("org.eclipse.ui.help.tipsAndTricksAction"); //$NON-NLS-1$
56
        setActionDefinitionId(IWorkbenchCommandConstants.HELP_TIPSANDTRICKS);
56
        workbenchWindow.getPartService().addPartListener(this);
57
        workbenchWindow.getPartService().addPartListener(this);
57
    }
58
    }
58
59

Return to bug 266839