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 (+96 lines)
Lines 116-121 Link Here
116
     */
116
     */
117
    public static final String FILE_RENAME = "org.eclipse.ui.edit.rename"; //$NON-NLS-1$
117
    public static final String FILE_RENAME = "org.eclipse.ui.edit.rename"; //$NON-NLS-1$
118
118
119
    /**
120
     * Id for command "Close Others" in category "File"
121
     * (value is <code>"org.eclipse.ui.file.closeOthers"</code>).
122
     */
123
    public static final String FILE_CLOSEOTHERS = "org.eclipse.ui.file.closeOthers"; //$NON-NLS-1$
124
119
    // Edit Category:
125
    // Edit Category:
120
126
121
    /**
127
    /**
Lines 155-168 Link Here
155
    public static final String EDIT_DELETE = "org.eclipse.ui.edit.delete"; //$NON-NLS-1$
161
    public static final String EDIT_DELETE = "org.eclipse.ui.edit.delete"; //$NON-NLS-1$
156
162
157
    /**
163
    /**
164
     * Id for command "Content Assist" in category "Edit"
165
     * (value is <code>"org.eclipse.ui.edit.text.contentAssist.proposals"</code>).
166
     */
167
    public static final String EDIT_CONTENTASSIST = "org.eclipse.ui.edit.text.contentAssist.proposals"; //$NON-NLS-1$
168
169
    /**
170
     * Id for command "Context Information" in category "Edit"
171
     * (value is <code>"org.eclipse.ui.edit.text.contentAssist.contextInformation"</code>).
172
     */
173
    public static final String EDIT_CONTEXTINFORMATION = "org.eclipse.ui.edit.text.contentAssist.contextInformation"; //$NON-NLS-1$
174
175
    /**
158
     * Id for command "Select All" in category "Edit"
176
     * Id for command "Select All" in category "Edit"
159
     * (value is <code>"org.eclipse.ui.edit.selectAll"</code>).
177
     * (value is <code>"org.eclipse.ui.edit.selectAll"</code>).
160
     */
178
     */
161
    public static final String EDIT_SELECTALL = "org.eclipse.ui.edit.selectAll"; //$NON-NLS-1$
179
    public static final String EDIT_SELECTALL = "org.eclipse.ui.edit.selectAll"; //$NON-NLS-1$
162
180
181
    /**
182
     * Id for command "Find and Replace" in category "Edit"
183
     * (value is <code>"org.eclipse.ui.edit.findReplace"</code>).
184
     */
185
    public static final String EDIT_FINDANDREPLACE = "org.eclipse.ui.edit.findReplace"; //$NON-NLS-1$
186
187
    /**
188
     * Id for command "Add Bookmark" in category "Edit"
189
     * (value is <code>"org.eclipse.ui.edit.addBookmark"</code>).
190
     */
191
    public static final String EDIT_ADDBOOKMARK = "org.eclipse.ui.edit.addBookmark"; //$NON-NLS-1$
192
163
    // Navigate Category:
193
    // Navigate Category:
164
194
165
    /**
195
    /**
196
     * Id for command "Go Into" in category "Navigate"
197
     * (value is <code>"org.eclipse.ui.navigate.goInto"</code>).
198
     */
199
    public static final String NAVIGATE_GOINTO = "org.eclipse.ui.navigate.goInto"; //$NON-NLS-1$
200
201
    /**
166
     * Id for command "Back" in category "Navigate"
202
     * Id for command "Back" in category "Navigate"
167
     * (value is <code>"org.eclipse.ui.navigate.back"</code>).
203
     * (value is <code>"org.eclipse.ui.navigate.back"</code>).
168
     */
204
     */
Lines 175-186 Link Here
175
    public static final String NAVIGATE_FORWARD = "org.eclipse.ui.navigate.forward"; //$NON-NLS-1$
211
    public static final String NAVIGATE_FORWARD = "org.eclipse.ui.navigate.forward"; //$NON-NLS-1$
176
212
177
    /**
213
    /**
214
     * Id for command "Up" in category "Navigate"
215
     * (value is <code>"org.eclipse.ui.navigate.up"</code>).
216
     */
217
    public static final String NAVIGATE_UP = "org.eclipse.ui.navigate.up"; //$NON-NLS-1$
218
219
    /**
178
     * Id for command "Next" in category "Navigate"
220
     * Id for command "Next" in category "Navigate"
179
     * (value is <code>"org.eclipse.ui.navigate.next"</code>).
221
     * (value is <code>"org.eclipse.ui.navigate.next"</code>).
180
     */
222
     */
181
    public static final String NAVIGATE_NEXT = "org.eclipse.ui.navigate.next"; //$NON-NLS-1$
223
    public static final String NAVIGATE_NEXT = "org.eclipse.ui.navigate.next"; //$NON-NLS-1$
182
224
183
    /**
225
    /**
226
     * Id for command "Backward History" in category "Navigate"
227
     * (value is <code>"org.eclipse.ui.navigate.backwardHistory"</code>).
228
     */
229
    public static final String NAVIGATE_BACKWARDHISTORY = "org.eclipse.ui.navigate.backwardHistory"; //$NON-NLS-1$
230
231
    /**
232
     * Id for command "Forward History" in category "Navigate"
233
     * (value is <code>"org.eclipse.ui.navigate.forwardHistory"</code>).
234
     */
235
    public static final String NAVIGATE_FORWARDHISTORY = "org.eclipse.ui.navigate.forwardHistory"; //$NON-NLS-1$
236
237
    /**
184
     * Id for command "Previous" in category "Navigate"
238
     * Id for command "Previous" in category "Navigate"
185
     * (value is <code>"org.eclipse.ui.navigate.previous"</code>).
239
     * (value is <code>"org.eclipse.ui.navigate.previous"</code>).
186
     */
240
     */
Lines 243-248 Link Here
243
    public static final String WINDOW_MAXIMIZEACTIVEVIEWOREDITOR = "org.eclipse.ui.window.maximizePart"; //$NON-NLS-1$
297
    public static final String WINDOW_MAXIMIZEACTIVEVIEWOREDITOR = "org.eclipse.ui.window.maximizePart"; //$NON-NLS-1$
244
298
245
    /**
299
    /**
300
     * Id for command "Minimize Active View or Editor" in category "Window"
301
     * (value is <code>"org.eclipse.ui.window.minimizePart"</code>).
302
     */
303
    public static final String WINDOW_MINIMIZEACTIVEVIEWOREDITOR = "org.eclipse.ui.window.minimizePart"; //$NON-NLS-1$
304
305
    /**
246
     * Id for command "Close All Perspectives" in category "Window"
306
     * Id for command "Close All Perspectives" in category "Window"
247
     * (value is <code>"org.eclipse.ui.window.closeAllPerspectives"</code>).
307
     * (value is <code>"org.eclipse.ui.window.closeAllPerspectives"</code>).
248
     */
308
     */
Lines 261-266 Link Here
261
    public static final String WINDOW_CLOSEPART = "org.eclipse.ui.file.closePart"; //$NON-NLS-1$
321
    public static final String WINDOW_CLOSEPART = "org.eclipse.ui.file.closePart"; //$NON-NLS-1$
262
322
263
    /**
323
    /**
324
     * Id for command "Customize Perspective" in category "Window"
325
     * (value is <code>"org.eclipse.ui.window.customizePerspective"</code>).
326
     */
327
    public static final String WINDOW_CUSTOMIZEPERSPECTIVE = "org.eclipse.ui.window.customizePerspective"; //$NON-NLS-1$
328
329
    /**
330
     * Id for command "Pin Editor" in category "Window"
331
     * (value is <code>"org.eclipse.ui.window.pinEditor"</code>).
332
     */
333
    public static final String WINDOW_PINEDITOR = "org.eclipse.ui.window.pinEditor"; //$NON-NLS-1$
334
335
    /**
264
     * Id for command "Preferences" in category "Window"
336
     * Id for command "Preferences" in category "Window"
265
     * (value is <code>"org.eclipse.ui.window.preferences"</code>).
337
     * (value is <code>"org.eclipse.ui.window.preferences"</code>).
266
     */
338
     */
Lines 281-286 Link Here
281
    public static final String HELP_HELPCONTENTS = "org.eclipse.ui.help.helpContents"; //$NON-NLS-1$
353
    public static final String HELP_HELPCONTENTS = "org.eclipse.ui.help.helpContents"; //$NON-NLS-1$
282
354
283
    /**
355
    /**
356
     * Id for command "Help Search" in category "Help"
357
     * (value is <code>"org.eclipse.ui.help.helpSearch"</code>).
358
     */
359
    public static final String HELP_HELPSEARCH = "org.eclipse.ui.help.helpSearch"; //$NON-NLS-1$
360
361
    /**
362
     * Id for command "Dynamic Help" in category "Help"
363
     * (value is <code>"org.eclipse.ui.help.dynamicHelp"</code>).
364
     */
365
    public static final String HELP_DYNAMICHELP = "org.eclipse.ui.help.dynamicHelp"; //$NON-NLS-1$
366
367
    /**
368
     * Id for command "Welcome" in category "Help"
369
     * (value is <code>"org.eclipse.ui.help.quickStartAction"</code>).
370
     */
371
    public static final String HELP_WELCOME = "org.eclipse.ui.help.quickStartAction"; //$NON-NLS-1$
372
373
    /**
374
     * Id for command "Tips and Tricks" in category "Help"
375
     * (value is <code>"org.eclipse.ui.help.tipsAndTricksAction"</code>).
376
     */
377
    public static final String HELP_TIPSANDTRICKS = "org.eclipse.ui.help.tipsAndTricksAction"; //$NON-NLS-1$
378
379
    /**
284
     * Id for command "About" in category "Help"
380
     * Id for command "About" in category "Help"
285
     * (value is <code>"org.eclipse.ui.help.aboutAction"</code>).
381
     * (value is <code>"org.eclipse.ui.help.aboutAction"</code>).
286
     */
382
     */
(-)Eclipse UI/org/eclipse/ui/actions/ActionFactory.java (-47 / +101 lines)
Lines 15-20 Link Here
15
import org.eclipse.jface.action.IAction;
15
import org.eclipse.jface.action.IAction;
16
import org.eclipse.osgi.util.NLS;
16
import org.eclipse.osgi.util.NLS;
17
import org.eclipse.ui.ISharedImages;
17
import org.eclipse.ui.ISharedImages;
18
import org.eclipse.ui.IWorkbenchCommandConstants;
18
import org.eclipse.ui.IWorkbenchWindow;
19
import org.eclipse.ui.IWorkbenchWindow;
19
import org.eclipse.ui.internal.CloseAllSavedAction;
20
import org.eclipse.ui.internal.CloseAllSavedAction;
20
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
21
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
Lines 86-92 Link Here
86
     * Workbench action: Displays the About dialog. This action maintains its
87
     * Workbench action: Displays the About dialog. This action maintains its
87
     * enablement state.
88
     * enablement state.
88
     */
89
     */
89
    public static final ActionFactory ABOUT = new ActionFactory("about") { //$NON-NLS-1$
90
    public static final ActionFactory ABOUT = new ActionFactory("about", //$NON-NLS-1$ 
91
    		IWorkbenchCommandConstants.HELP_ABOUT) { 
90
92
91
		/*
93
		/*
92
		 * (non-Javadoc)
94
		 * (non-Javadoc)
Lines 99-105 Link Here
99
			}
101
			}
100
102
101
			WorkbenchCommandAction action = new WorkbenchCommandAction(
103
			WorkbenchCommandAction action = new WorkbenchCommandAction(
102
					"org.eclipse.ui.help.aboutAction", window); //$NON-NLS-1$
104
					getCommandId(), window);
103
105
104
			action.setId(getId());
106
			action.setId(getId());
105
			IProduct product = Platform.getProduct();
107
			IProduct product = Platform.getProduct();
Lines 126-132 Link Here
126
	 * editor. This action maintains its enablement state.
128
	 * editor. This action maintains its enablement state.
127
	 */
129
	 */
128
    public static final ActionFactory ACTIVATE_EDITOR = new ActionFactory(
130
    public static final ActionFactory ACTIVATE_EDITOR = new ActionFactory(
129
            "activateEditor") {//$NON-NLS-1$
131
            "activateEditor", IWorkbenchCommandConstants.WINDOW_ACTIVATEEDITOR) {//$NON-NLS-1$
130
       
132
       
131
        /* (non-Javadoc)
133
        /* (non-Javadoc)
132
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
134
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 136-142 Link Here
136
				throw new IllegalArgumentException();
138
				throw new IllegalArgumentException();
137
			}
139
			}
138
			WorkbenchCommandAction action = new WorkbenchCommandAction(
140
			WorkbenchCommandAction action = new WorkbenchCommandAction(
139
					"org.eclipse.ui.window.activateEditor", window); //$NON-NLS-1$
141
					getCommandId(), window);
140
			action.setId(getId());
142
			action.setId(getId());
141
			action.setText(WorkbenchMessages.ActivateEditorAction_text);
143
			action.setText(WorkbenchMessages.ActivateEditorAction_text);
142
			action
144
			action
Lines 150-156 Link Here
150
	 * {@link RetargetAction} with id "back". This action maintains its
152
	 * {@link RetargetAction} with id "back". This action maintains its
151
	 * enablement state.
153
	 * enablement state.
152
	 */
154
	 */
153
    public static final ActionFactory BACK = new ActionFactory("back") {//$NON-NLS-1$
155
    public static final ActionFactory BACK = new ActionFactory("back", //$NON-NLS-1$
156
    		IWorkbenchCommandConstants.NAVIGATE_BACK) {
154
        /* (non-Javadoc)
157
        /* (non-Javadoc)
155
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
158
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
156
         */
159
         */
Lines 161-167 Link Here
161
            RetargetAction action = new LabelRetargetAction(getId(), WorkbenchMessages.Workbench_back);
164
            RetargetAction action = new LabelRetargetAction(getId(), WorkbenchMessages.Workbench_back);
162
            action.setToolTipText(WorkbenchMessages.Workbench_backToolTip);
165
            action.setToolTipText(WorkbenchMessages.Workbench_backToolTip);
163
            window.getPartService().addPartListener(action);
166
            window.getPartService().addPartListener(action);
164
            action.setActionDefinitionId("org.eclipse.ui.navigate.back"); //$NON-NLS-1$
167
            action.setActionDefinitionId(getCommandId());
165
            return action;
168
            return action;
166
        }
169
        }
167
    };
170
    };
Lines 171-177 Link Here
171
     * history. This action maintains its enablement state.
174
     * history. This action maintains its enablement state.
172
     */
175
     */
173
    public static final ActionFactory BACKWARD_HISTORY = new ActionFactory(
176
    public static final ActionFactory BACKWARD_HISTORY = new ActionFactory(
174
            "backardHistory") {//$NON-NLS-1$
177
            "backardHistory", IWorkbenchCommandConstants.NAVIGATE_BACKWARDHISTORY) {//$NON-NLS-1$
175
        /* (non-Javadoc)
178
        /* (non-Javadoc)
176
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
179
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
177
         */
180
         */
Lines 189-195 Link Here
189
     * Workbench action (id "close"): Close the active editor. This action
192
     * Workbench action (id "close"): Close the active editor. This action
190
     * maintains its enablement state.
193
     * maintains its enablement state.
191
     */
194
     */
192
    public static final ActionFactory CLOSE = new ActionFactory("close") {//$NON-NLS-1$
195
    public static final ActionFactory CLOSE = new ActionFactory("close",//$NON-NLS-1$
196
    		IWorkbenchCommandConstants.FILE_CLOSE) {
193
        /* (non-Javadoc)
197
        /* (non-Javadoc)
194
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
198
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
195
         */
199
         */
Lines 197-203 Link Here
197
            if (window == null) {
201
            if (window == null) {
198
                throw new IllegalArgumentException();
202
                throw new IllegalArgumentException();
199
            }
203
            }
200
            WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.file.close",window); //$NON-NLS-1$
204
			WorkbenchCommandAction action = new WorkbenchCommandAction(
205
					getCommandId(), window);
201
            action.setId(getId());
206
            action.setId(getId());
202
            action.setText(WorkbenchMessages.CloseEditorAction_text);
207
            action.setText(WorkbenchMessages.CloseEditorAction_text);
203
            action.setToolTipText(WorkbenchMessages.CloseEditorAction_toolTip);
208
            action.setToolTipText(WorkbenchMessages.CloseEditorAction_toolTip);
Lines 209-215 Link Here
209
     * Workbench action (id "closeAll"): Close all open editors. This action
214
     * Workbench action (id "closeAll"): Close all open editors. This action
210
     * maintains its enablement state.
215
     * maintains its enablement state.
211
     */
216
     */
212
    public static final ActionFactory CLOSE_ALL = new ActionFactory("closeAll") {//$NON-NLS-1$
217
    public static final ActionFactory CLOSE_ALL = new ActionFactory("closeAll",//$NON-NLS-1$
218
    		IWorkbenchCommandConstants.FILE_CLOSEALL) {
213
        /* (non-Javadoc)
219
        /* (non-Javadoc)
214
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
220
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
215
         */
221
         */
Lines 217-223 Link Here
217
            if (window == null) {
223
            if (window == null) {
218
                throw new IllegalArgumentException();
224
                throw new IllegalArgumentException();
219
            }
225
            }
220
            WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.file.closeAll",window); //$NON-NLS-1$
226
			WorkbenchCommandAction action = new WorkbenchCommandAction(
227
					getCommandId(), window);
221
            action.setId(getId());
228
            action.setId(getId());
222
            action.setText(WorkbenchMessages.CloseAllAction_text);
229
            action.setText(WorkbenchMessages.CloseAllAction_text);
223
            action.setToolTipText(WorkbenchMessages.CloseAllAction_toolTip);
230
            action.setToolTipText(WorkbenchMessages.CloseAllAction_toolTip);
Lines 231-237 Link Here
231
	 * 
238
	 * 
232
	 * @since 3.2
239
	 * @since 3.2
233
     */
240
     */
234
    public static final ActionFactory CLOSE_OTHERS = new ActionFactory("closeOthers") {//$NON-NLS-1$
241
    public static final ActionFactory CLOSE_OTHERS = new ActionFactory("closeOthers",//$NON-NLS-1$
242
    		IWorkbenchCommandConstants.FILE_CLOSEOTHERS) {
235
        /* (non-Javadoc)
243
        /* (non-Javadoc)
236
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
244
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
237
         */
245
         */
Lines 240-246 Link Here
240
				throw new IllegalArgumentException();
248
				throw new IllegalArgumentException();
241
			}
249
			}
242
			WorkbenchCommandAction action = new WorkbenchCommandAction(
250
			WorkbenchCommandAction action = new WorkbenchCommandAction(
243
					"org.eclipse.ui.file.closeOthers", window); //$NON-NLS-1$
251
					getCommandId(), window);
244
			action.setId(getId());
252
			action.setId(getId());
245
			action.setText(WorkbenchMessages.CloseOthersAction_text);
253
			action.setText(WorkbenchMessages.CloseOthersAction_text);
246
			action.setToolTipText(WorkbenchMessages.CloseOthersAction_toolTip);
254
			action.setToolTipText(WorkbenchMessages.CloseOthersAction_toolTip);
Lines 253-259 Link Here
253
	 * This action maintains its enablement state.
261
	 * This action maintains its enablement state.
254
	 */
262
	 */
255
    public static final ActionFactory CLOSE_ALL_PERSPECTIVES = new ActionFactory(
263
    public static final ActionFactory CLOSE_ALL_PERSPECTIVES = new ActionFactory(
256
            "closeAllPerspectives") {//$NON-NLS-1$
264
            "closeAllPerspectives", IWorkbenchCommandConstants.WINDOW_CLOSEALLPERSPECTIVES) {//$NON-NLS-1$
257
        /* (non-Javadoc)
265
        /* (non-Javadoc)
258
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
266
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
259
         */
267
         */
Lines 261-268 Link Here
261
            if (window == null) {
269
            if (window == null) {
262
                throw new IllegalArgumentException();
270
                throw new IllegalArgumentException();
263
            }
271
            }
264
            WorkbenchCommandAction action = new WorkbenchCommandAction
272
			WorkbenchCommandAction action = new WorkbenchCommandAction(
265
            ("org.eclipse.ui.window.closeAllPerspectives", window); //$NON-NLS-1$
273
					getCommandId(), window);
266
            
274
            
267
            action.setId(getId());
275
            action.setId(getId());
268
            action.setText(WorkbenchMessages.CloseAllPerspectivesAction_text);
276
            action.setText(WorkbenchMessages.CloseAllPerspectivesAction_text);
Lines 297-303 Link Here
297
     * perspective. This action maintains its enablement state.
305
     * perspective. This action maintains its enablement state.
298
     */
306
     */
299
    public static final ActionFactory CLOSE_PERSPECTIVE = new ActionFactory(
307
    public static final ActionFactory CLOSE_PERSPECTIVE = new ActionFactory(
300
    "closePerspective") {//$NON-NLS-1$
308
    "closePerspective", IWorkbenchCommandConstants.WINDOW_CLOSEPERSPECTIVE) {//$NON-NLS-1$
301
    	/*
309
    	/*
302
    	 * (non-Javadoc)
310
    	 * (non-Javadoc)
303
    	 * 
311
    	 * 
Lines 308-314 Link Here
308
    			throw new IllegalArgumentException();
316
    			throw new IllegalArgumentException();
309
    		}
317
    		}
310
    		WorkbenchCommandAction action = new WorkbenchCommandAction(
318
    		WorkbenchCommandAction action = new WorkbenchCommandAction(
311
    				"org.eclipse.ui.window.closePerspective", window); //$NON-NLS-1$
319
    				getCommandId(), window);
312
320
313
    		action.setId(getId());
321
    		action.setId(getId());
314
    		action.setText(WorkbenchMessages.
322
    		action.setText(WorkbenchMessages.
Lines 332-338 Link Here
332
     * }
340
     * }
333
     * </pre>
341
     * </pre>
334
     */
342
     */
335
    public static final ActionFactory INTRO = new ActionFactory("intro") {//$NON-NLS-1$
343
    public static final ActionFactory INTRO = new ActionFactory("intro", //$NON-NLS-1$
344
    		IWorkbenchCommandConstants.HELP_WELCOME) {
336
        /* (non-Javadoc)
345
        /* (non-Javadoc)
337
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
346
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
338
         */
347
         */
Lines 351-357 Link Here
351
     * {@link RetargetAction} with id "copy". This action maintains
360
     * {@link RetargetAction} with id "copy". This action maintains
352
     * its enablement state.
361
     * its enablement state.
353
     */
362
     */
354
    public static final ActionFactory COPY = new ActionFactory("copy") {//$NON-NLS-1$
363
    public static final ActionFactory COPY = new ActionFactory("copy", //$NON-NLS-1$
364
    		IWorkbenchCommandConstants.EDIT_COPY) {
355
        
365
        
356
        /* (non-Javadoc)
366
        /* (non-Javadoc)
357
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
367
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 363-369 Link Here
363
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_copy);
373
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_copy);
364
            action.setToolTipText(WorkbenchMessages.Workbench_copyToolTip); 
374
            action.setToolTipText(WorkbenchMessages.Workbench_copyToolTip); 
365
            window.getPartService().addPartListener(action);
375
            window.getPartService().addPartListener(action);
366
            action.setActionDefinitionId("org.eclipse.ui.edit.copy"); //$NON-NLS-1$
376
            action.setActionDefinitionId(getCommandId());
367
            ISharedImages sharedImages = window.getWorkbench()
377
            ISharedImages sharedImages = window.getWorkbench()
368
                    .getSharedImages();
378
                    .getSharedImages();
369
            action.setImageDescriptor(sharedImages
379
            action.setImageDescriptor(sharedImages
Lines 379-385 Link Here
379
     * {@link RetargetAction} with id "cut". This action maintains
389
     * {@link RetargetAction} with id "cut". This action maintains
380
     * its enablement state.
390
     * its enablement state.
381
     */
391
     */
382
    public static final ActionFactory CUT = new ActionFactory("cut") {//$NON-NLS-1$
392
    public static final ActionFactory CUT = new ActionFactory("cut", //$NON-NLS-1$
393
    		IWorkbenchCommandConstants.EDIT_CUT) {
383
        
394
        
384
        /* (non-Javadoc)
395
        /* (non-Javadoc)
385
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
396
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 391-397 Link Here
391
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_cut); 
402
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_cut); 
392
            action.setToolTipText(WorkbenchMessages.Workbench_cutToolTip);
403
            action.setToolTipText(WorkbenchMessages.Workbench_cutToolTip);
393
            window.getPartService().addPartListener(action);
404
            window.getPartService().addPartListener(action);
394
            action.setActionDefinitionId("org.eclipse.ui.edit.cut"); //$NON-NLS-1$
405
            action.setActionDefinitionId(getCommandId());
395
            ISharedImages sharedImages = window.getWorkbench()
406
            ISharedImages sharedImages = window.getWorkbench()
396
                    .getSharedImages();
407
                    .getSharedImages();
397
            action.setImageDescriptor(sharedImages
408
            action.setImageDescriptor(sharedImages
Lines 407-413 Link Here
407
     * {@link RetargetAction} with id "delete". This action maintains
418
     * {@link RetargetAction} with id "delete". This action maintains
408
     * its enablement state.
419
     * its enablement state.
409
     */
420
     */
410
    public static final ActionFactory DELETE = new ActionFactory("delete") {//$NON-NLS-1$
421
    public static final ActionFactory DELETE = new ActionFactory("delete", //$NON-NLS-1$
422
    		IWorkbenchCommandConstants.EDIT_DELETE) {
411
        
423
        
412
        /* (non-Javadoc)
424
        /* (non-Javadoc)
413
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
425
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 419-425 Link Here
419
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_delete); 
431
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_delete); 
420
            action.setToolTipText(WorkbenchMessages.Workbench_deleteToolTip); 
432
            action.setToolTipText(WorkbenchMessages.Workbench_deleteToolTip); 
421
            window.getPartService().addPartListener(action);
433
            window.getPartService().addPartListener(action);
422
            action.setActionDefinitionId("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
434
            action.setActionDefinitionId(getCommandId());
423
            action.enableAccelerator(false);
435
            action.enableAccelerator(false);
424
            window.getWorkbench().getHelpSystem().setHelp(action,
436
            window.getWorkbench().getHelpSystem().setHelp(action,
425
                    IWorkbenchHelpContextIds.DELETE_RETARGET_ACTION);
437
                    IWorkbenchHelpContextIds.DELETE_RETARGET_ACTION);
Lines 439-445 Link Here
439
     * action maintains its enablement state.
451
     * action maintains its enablement state.
440
     */
452
     */
441
    public static final ActionFactory EDIT_ACTION_SETS = new ActionFactory(
453
    public static final ActionFactory EDIT_ACTION_SETS = new ActionFactory(
442
            "editActionSets") {//$NON-NLS-1$
454
            "editActionSets", IWorkbenchCommandConstants.WINDOW_CUSTOMIZEPERSPECTIVE) {//$NON-NLS-1$
443
        
455
        
444
        /* (non-Javadoc)
456
        /* (non-Javadoc)
445
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
457
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 448-454 Link Here
448
            if (window == null) {
460
            if (window == null) {
449
                throw new IllegalArgumentException();
461
                throw new IllegalArgumentException();
450
            }
462
            }
451
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.window.customizePerspective", window); //$NON-NLS-1$
463
			WorkbenchCommandAction action = new WorkbenchCommandAction(
464
					getCommandId(), window);
452
            action.setId(getId());
465
            action.setId(getId());
453
            action.setText(WorkbenchMessages.EditActionSetsAction_text);
466
            action.setText(WorkbenchMessages.EditActionSetsAction_text);
454
            action.setToolTipText(WorkbenchMessages.EditActionSetsAction_toolTip);
467
            action.setToolTipText(WorkbenchMessages.EditActionSetsAction_toolTip);
Lines 463-469 Link Here
463
     * Workbench action (id "export"): Opens the export wizard. This action
476
     * Workbench action (id "export"): Opens the export wizard. This action
464
     * maintains its enablement state.
477
     * maintains its enablement state.
465
     */
478
     */
466
    public static final ActionFactory EXPORT = new ActionFactory("export") {//$NON-NLS-1$
479
    public static final ActionFactory EXPORT = new ActionFactory("export", //$NON-NLS-1$
480
    		IWorkbenchCommandConstants.FILE_EXPORT) {
467
        
481
        
468
        /* (non-Javadoc)
482
        /* (non-Javadoc)
469
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
483
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 473-479 Link Here
473
                throw new IllegalArgumentException();
487
                throw new IllegalArgumentException();
474
            }
488
            }
475
489
476
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.file.export", window); //$NON-NLS-1$
490
			WorkbenchCommandAction action = new WorkbenchCommandAction(
491
					getCommandId(), window);
477
            action.setId(getId());
492
            action.setId(getId());
478
            action.setText(WorkbenchMessages.ExportResourcesAction_fileMenuText);
493
            action.setText(WorkbenchMessages.ExportResourcesAction_fileMenuText);
479
            action.setToolTipText(WorkbenchMessages.ExportResourcesAction_toolTip);
494
            action.setToolTipText(WorkbenchMessages.ExportResourcesAction_toolTip);
Lines 491-497 Link Here
491
     * {@link RetargetAction} with id "find". This action maintains
506
     * {@link RetargetAction} with id "find". This action maintains
492
     * its enablement state.
507
     * its enablement state.
493
     */
508
     */
494
    public static final ActionFactory FIND = new ActionFactory("find") {//$NON-NLS-1$
509
    public static final ActionFactory FIND = new ActionFactory("find", //$NON-NLS-1$
510
    		IWorkbenchCommandConstants.EDIT_FINDANDREPLACE) {
495
        
511
        
496
        /* (non-Javadoc)
512
        /* (non-Javadoc)
497
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
513
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 503-509 Link Here
503
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_findReplace); 
519
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_findReplace); 
504
            action.setToolTipText(WorkbenchMessages.Workbench_findReplaceToolTip); 
520
            action.setToolTipText(WorkbenchMessages.Workbench_findReplaceToolTip); 
505
            window.getPartService().addPartListener(action);
521
            window.getPartService().addPartListener(action);
506
            action.setActionDefinitionId("org.eclipse.ui.edit.findReplace"); //$NON-NLS-1$
522
            action.setActionDefinitionId(getCommandId());
507
            // Find's images are commented out due to a conflict with Search.
523
            // Find's images are commented out due to a conflict with Search.
508
            // See bug 16412.
524
            // See bug 16412.
509
            //		action.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_SEARCH_SRC));
525
            //		action.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_SEARCH_SRC));
Lines 517-523 Link Here
517
     * {@link RetargetAction} with id "forward". This action
533
     * {@link RetargetAction} with id "forward". This action
518
     * maintains its enablement state.
534
     * maintains its enablement state.
519
     */
535
     */
520
    public static final ActionFactory FORWARD = new ActionFactory("forward") {//$NON-NLS-1$
536
    public static final ActionFactory FORWARD = new ActionFactory("forward", //$NON-NLS-1$
537
    		IWorkbenchCommandConstants.NAVIGATE_FORWARD) {
521
        
538
        
522
        /* (non-Javadoc)
539
        /* (non-Javadoc)
523
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
540
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 529-535 Link Here
529
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_forward);
546
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_forward);
530
            action.setToolTipText(WorkbenchMessages.Workbench_forwardToolTip);
547
            action.setToolTipText(WorkbenchMessages.Workbench_forwardToolTip);
531
            window.getPartService().addPartListener(action);
548
            window.getPartService().addPartListener(action);
532
            action.setActionDefinitionId("org.eclipse.ui.navigate.forward"); //$NON-NLS-1$
549
            action.setActionDefinitionId(getCommandId());
533
            return action;
550
            return action;
534
        }
551
        }
535
    };
552
    };
Lines 539-545 Link Here
539
     * history. This action maintains its enablement state.
556
     * history. This action maintains its enablement state.
540
     */
557
     */
541
    public static final ActionFactory FORWARD_HISTORY = new ActionFactory(
558
    public static final ActionFactory FORWARD_HISTORY = new ActionFactory(
542
            "forwardHistory") {//$NON-NLS-1$
559
            "forwardHistory", IWorkbenchCommandConstants.NAVIGATE_FORWARDHISTORY) {//$NON-NLS-1$
543
        
560
        
544
        /* (non-Javadoc)
561
        /* (non-Javadoc)
545
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
562
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 559-565 Link Here
559
     * {@link RetargetAction} with id "goInto". This action maintains
576
     * {@link RetargetAction} with id "goInto". This action maintains
560
     * its enablement state.
577
     * its enablement state.
561
     */
578
     */
562
    public static final ActionFactory GO_INTO = new ActionFactory("goInto") {//$NON-NLS-1$
579
    public static final ActionFactory GO_INTO = new ActionFactory("goInto", //$NON-NLS-1$
580
    		IWorkbenchCommandConstants.NAVIGATE_GOINTO) {
563
        
581
        
564
        /* (non-Javadoc)
582
        /* (non-Javadoc)
565
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
583
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 571-577 Link Here
571
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_goInto); 
589
            RetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_goInto); 
572
            action.setToolTipText(WorkbenchMessages.Workbench_goIntoToolTip); 
590
            action.setToolTipText(WorkbenchMessages.Workbench_goIntoToolTip); 
573
            window.getPartService().addPartListener(action);
591
            window.getPartService().addPartListener(action);
574
            action.setActionDefinitionId("org.eclipse.ui.navigate.goInto"); //$NON-NLS-1$
592
            action.setActionDefinitionId(getCommandId());
575
            return action;
593
            return action;
576
        }
594
        }
577
    };
595
    };
Lines 580-586 Link Here
580
     * Workbench action (id "import"): Opens the import wizard. This action
598
     * Workbench action (id "import"): Opens the import wizard. This action
581
     * maintains its enablement state.
599
     * maintains its enablement state.
582
     */
600
     */
583
    public static final ActionFactory IMPORT = new ActionFactory("import") {//$NON-NLS-1$
601
    public static final ActionFactory IMPORT = new ActionFactory("import", //$NON-NLS-1$
602
    		IWorkbenchCommandConstants.FILE_IMPORT) {
584
        
603
        
585
        /* (non-Javadoc)
604
        /* (non-Javadoc)
586
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
605
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 590-596 Link Here
590
                throw new IllegalArgumentException();
609
                throw new IllegalArgumentException();
591
            }
610
            }
592
            
611
            
593
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.file.import", window); //$NON-NLS-1$
612
			WorkbenchCommandAction action = new WorkbenchCommandAction(
613
					getCommandId(), window);
594
            action.setId(getId());
614
            action.setId(getId());
595
            action.setText(WorkbenchMessages.ImportResourcesAction_text);
615
            action.setText(WorkbenchMessages.ImportResourcesAction_text);
596
            action.setToolTipText(WorkbenchMessages.ImportResourcesAction_toolTip);
616
            action.setToolTipText(WorkbenchMessages.ImportResourcesAction_toolTip);
Lines 627-633 Link Here
627
     * Workbench action (id "maximize"): Maximize/restore the active part. This
647
     * Workbench action (id "maximize"): Maximize/restore the active part. This
628
     * action maintains its enablement state.
648
     * action maintains its enablement state.
629
     */
649
     */
630
    public static final ActionFactory MAXIMIZE = new ActionFactory("maximize") {//$NON-NLS-1$
650
    public static final ActionFactory MAXIMIZE = new ActionFactory("maximize", //$NON-NLS-1$
651
    		IWorkbenchCommandConstants.WINDOW_MAXIMIZEACTIVEVIEWOREDITOR) {
631
       
652
       
632
        /* (non-Javadoc)
653
        /* (non-Javadoc)
633
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
654
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 637-643 Link Here
637
                throw new IllegalArgumentException();
658
                throw new IllegalArgumentException();
638
            }
659
            }
639
            WorkbenchCommandAction action = new WorkbenchCommandAction(
660
            WorkbenchCommandAction action = new WorkbenchCommandAction(
640
					"org.eclipse.ui.window.maximizePart", window); //$NON-NLS-1$
661
					getCommandId(), window); 
641
            action.setId(getId());
662
            action.setId(getId());
642
            action.setToolTipText(WorkbenchMessages.MaximizePartAction_toolTip);
663
            action.setToolTipText(WorkbenchMessages.MaximizePartAction_toolTip);
643
            window.getWorkbench().getHelpSystem().setHelp(action,
664
            window.getWorkbench().getHelpSystem().setHelp(action,
Lines 653-659 Link Here
653
     * 
674
     * 
654
     * @since 3.1
675
     * @since 3.1
655
     */
676
     */
656
    public static final ActionFactory MINIMIZE = new ActionFactory("minimize") {//$NON-NLS-1$
677
    public static final ActionFactory MINIMIZE = new ActionFactory("minimize", //$NON-NLS-1$
678
    		IWorkbenchCommandConstants.WINDOW_MINIMIZEACTIVEVIEWOREDITOR) {
657
        
679
        
658
        /* (non-Javadoc)
680
        /* (non-Javadoc)
659
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
681
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 663-669 Link Here
663
                throw new IllegalArgumentException();
685
                throw new IllegalArgumentException();
664
            }
686
            }
665
            WorkbenchCommandAction action = new WorkbenchCommandAction(
687
            WorkbenchCommandAction action = new WorkbenchCommandAction(
666
					"org.eclipse.ui.window.minimizePart", window); //$NON-NLS-1$
688
					getCommandId(), window); 
667
			action.setId(getId());
689
			action.setId(getId());
668
			action.setToolTipText(WorkbenchMessages.MinimizePartAction_toolTip);
690
			action.setToolTipText(WorkbenchMessages.MinimizePartAction_toolTip);
669
			window.getWorkbench().getHelpSystem().setHelp(action,
691
			window.getWorkbench().getHelpSystem().setHelp(action,
Lines 677-683 Link Here
677
	 * {@link RetargetAction} with id "move". This action maintains its
699
	 * {@link RetargetAction} with id "move". This action maintains its
678
	 * enablement state.
700
	 * enablement state.
679
	 */
701
	 */
680
    public static final ActionFactory MOVE = new ActionFactory("move") {//$NON-NLS-1$
702
    public static final ActionFactory MOVE = new ActionFactory("move", //$NON-NLS-1$
703
    		IWorkbenchCommandConstants.FILE_MOVE) {
681
        
704
        
682
        /* (non-Javadoc)
705
        /* (non-Javadoc)
683
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
706
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 689-695 Link Here
689
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_move); 
712
            RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_move); 
690
            action.setToolTipText(WorkbenchMessages.Workbench_moveToolTip);
713
            action.setToolTipText(WorkbenchMessages.Workbench_moveToolTip);
691
            window.getPartService().addPartListener(action);
714
            window.getPartService().addPartListener(action);
692
            action.setActionDefinitionId("org.eclipse.ui.edit.move"); //$NON-NLS-1$
715
            action.setActionDefinitionId(getCommandId()); 
693
            return action;
716
            return action;
694
        }
717
        }
695
    };
718
    };
Lines 698-704 Link Here
698
     * Workbench action (id "new"): Opens the new wizard dialog. This action maintains
721
     * Workbench action (id "new"): Opens the new wizard dialog. This action maintains
699
     * its enablement state.
722
     * its enablement state.
700
     */
723
     */
701
    public static final ActionFactory NEW = new ActionFactory("new") {//$NON-NLS-1$
724
    public static final ActionFactory NEW = new ActionFactory("new", //$NON-NLS-1$
725
    		IWorkbenchCommandConstants.FILE_NEW) {
702
        
726
        
703
        /* (non-Javadoc)
727
        /* (non-Javadoc)
704
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
728
         * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
Lines 707-713 Link Here
707
            if (window == null) {
731
            if (window == null) {
708
                throw new IllegalArgumentException();
732
                throw new IllegalArgumentException();
709
            }
733
            }
710
            WorkbenchCommandAction action = new WorkbenchCommandAction("org.eclipse.ui.newWizard", window); //$NON-NLS-1$
734
			WorkbenchCommandAction action = new WorkbenchCommandAction(
735
					getCommandId(), window); 
711
            action.setId(getId());
736
            action.setId(getId());
712
            ISharedImages images = window.getWorkbench().getSharedImages();
737
            ISharedImages images = window.getWorkbench().getSharedImages();
713
            action.setImageDescriptor(images
738
            action.setImageDescriptor(images
Lines 1701-1706 Link Here
1701
     * Id of actions created by this action factory.
1726
     * Id of actions created by this action factory.
1702
     */
1727
     */
1703
    private final String actionId;
1728
    private final String actionId;
1729
    
1730
    /**
1731
     * Optional ID for this action.
1732
     */
1733
    private final String commandId;
1704
1734
1705
    /**
1735
    /**
1706
     * Creates a new workbench action factory with the given id.
1736
     * Creates a new workbench action factory with the given id.
Lines 1709-1715 Link Here
1709
     *            the id of actions created by this action factory
1739
     *            the id of actions created by this action factory
1710
     */
1740
     */
1711
    protected ActionFactory(String actionId) {
1741
    protected ActionFactory(String actionId) {
1712
        this.actionId = actionId;
1742
    	this(actionId, null);
1743
    }
1744
1745
	/**
1746
	 * Create a new workbench action factory with the given IDs.
1747
	 * 
1748
	 * @param actionId
1749
	 *            the id of actions created by this action factory
1750
	 * @param commandId
1751
	 *            the matching command id
1752
	 * @since 3.5
1753
	 */
1754
    protected ActionFactory(String actionId, String commandId) {
1755
    	this.actionId = actionId;
1756
    	this.commandId = commandId;
1713
    }
1757
    }
1714
1758
1715
    /**
1759
    /**
Lines 1741-1744 Link Here
1741
        return actionId;
1785
        return actionId;
1742
    }
1786
    }
1743
1787
1788
	/**
1789
	 * Return the command id of this action factory.
1790
	 * 
1791
	 * @return the command id of the action created by this action factory. May
1792
	 *         be <code>null</code>.
1793
	 * @since 3.5
1794
	 */
1795
    public String getCommandId() {
1796
    	return commandId;
1797
    }
1744
}
1798
}
(-)Eclipse UI/org/eclipse/ui/internal/NavigationHistoryAction.java (-2 / +3 lines)
Lines 25-30 Link Here
25
import org.eclipse.swt.widgets.Menu;
25
import org.eclipse.swt.widgets.Menu;
26
import org.eclipse.swt.widgets.MenuItem;
26
import org.eclipse.swt.widgets.MenuItem;
27
import org.eclipse.ui.ISharedImages;
27
import org.eclipse.ui.ISharedImages;
28
import org.eclipse.ui.IWorkbenchCommandConstants;
28
import org.eclipse.ui.IWorkbenchPage;
29
import org.eclipse.ui.IWorkbenchPage;
29
import org.eclipse.ui.IWorkbenchWindow;
30
import org.eclipse.ui.IWorkbenchWindow;
30
31
Lines 158-164 Link Here
158
                    .getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
159
                    .getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
159
            setDisabledImageDescriptor(sharedImages
160
            setDisabledImageDescriptor(sharedImages
160
                    .getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED));
161
                    .getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED));
161
            setActionDefinitionId("org.eclipse.ui.navigate.forwardHistory"); //$NON-NLS-1$
162
            setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_FORWARDHISTORY);
162
        } else {
163
        } else {
163
            setText(WorkbenchMessages.NavigationHistoryAction_backward_text); 
164
            setText(WorkbenchMessages.NavigationHistoryAction_backward_text); 
164
            setToolTipText(WorkbenchMessages.NavigationHistoryAction_backward_toolTip);
165
            setToolTipText(WorkbenchMessages.NavigationHistoryAction_backward_toolTip);
Lines 169-175 Link Here
169
                    .getImageDescriptor(ISharedImages.IMG_TOOL_BACK));
170
                    .getImageDescriptor(ISharedImages.IMG_TOOL_BACK));
170
            setDisabledImageDescriptor(sharedImages
171
            setDisabledImageDescriptor(sharedImages
171
                    .getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED));
172
                    .getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED));
172
            setActionDefinitionId("org.eclipse.ui.navigate.backwardHistory"); //$NON-NLS-1$
173
            setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_BACKWARDHISTORY);
173
        }
174
        }
174
        // WorkbenchHelp.setHelp(this, IHelpContextIds.CLOSE_ALL_PAGES_ACTION);
175
        // WorkbenchHelp.setHelp(this, IHelpContextIds.CLOSE_ALL_PAGES_ACTION);
175
        setEnabled(false);
176
        setEnabled(false);
(-)Eclipse UI/org/eclipse/ui/internal/IntroAction.java (-1 / +2 lines)
Lines 17-22 Link Here
17
import org.eclipse.jface.resource.ImageDescriptor;
17
import org.eclipse.jface.resource.ImageDescriptor;
18
import org.eclipse.swt.widgets.Event;
18
import org.eclipse.swt.widgets.Event;
19
import org.eclipse.ui.IPageListener;
19
import org.eclipse.ui.IPageListener;
20
import org.eclipse.ui.IWorkbenchCommandConstants;
20
import org.eclipse.ui.IWorkbenchPage;
21
import org.eclipse.ui.IWorkbenchPage;
21
import org.eclipse.ui.IWorkbenchWindow;
22
import org.eclipse.ui.IWorkbenchWindow;
22
import org.eclipse.ui.actions.ActionFactory;
23
import org.eclipse.ui.actions.ActionFactory;
Lines 66-72 Link Here
66
        if (labelOverride != null)
67
        if (labelOverride != null)
67
        	setText(labelOverride);
68
        	setText(labelOverride);
68
        
69
        
69
        setActionDefinitionId("org.eclipse.ui.help.quickStartAction"); //$NON-NLS-1$
70
        setActionDefinitionId(IWorkbenchCommandConstants.HELP_WELCOME);
70
        
71
        
71
        window.addPageListener(pageListener);
72
        window.addPageListener(pageListener);
72
    }
73
    }

Return to bug 266839