01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal;
11:
12: import org.eclipse.ui.IPerspectiveDescriptor;
13: import org.eclipse.ui.IWorkbenchPage;
14: import org.eclipse.ui.IWorkbenchWindow;
15: import org.eclipse.ui.PlatformUI;
16:
17: /**
18: * Edit the action sets.
19: */
20: public class EditActionSetsAction extends PerspectiveAction {
21:
22: /**
23: * This default constructor allows the the action to be called from the welcome page.
24: */
25: public EditActionSetsAction() {
26: this (PlatformUI.getWorkbench().getActiveWorkbenchWindow());
27: }
28:
29: /**
30: * Create a new instance of this class.
31: *
32: * @param window the window
33: */
34: public EditActionSetsAction(IWorkbenchWindow window) {
35: super (window);
36: setText(WorkbenchMessages.EditActionSetsAction_text);
37: setActionDefinitionId("org.eclipse.ui.window.customizePerspective"); //$NON-NLS-1$
38: // @issue missing action id
39: setToolTipText(WorkbenchMessages.EditActionSetsAction_toolTip);
40: window.getWorkbench().getHelpSystem().setHelp(this ,
41: IWorkbenchHelpContextIds.EDIT_ACTION_SETS_ACTION);
42: }
43:
44: /* (non-Javadoc)
45: * Method declared on IAction.
46: */
47: protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) {
48: ((WorkbenchPage) page).editActionSets();
49: }
50:
51: }
|