KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > EditActionSetsAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal;
12
13 import org.eclipse.ui.IPerspectiveDescriptor;
14 import org.eclipse.ui.IWorkbenchPage;
15 import org.eclipse.ui.IWorkbenchWindow;
16 import org.eclipse.ui.PlatformUI;
17
18 /**
19  * Edit the action sets.
20  */

21 public class EditActionSetsAction extends PerspectiveAction {
22
23     /**
24      * This default constructor allows the the action to be called from the welcome page.
25      */

26     public EditActionSetsAction() {
27         this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
28     }
29
30     /**
31      * Create a new instance of this class.
32      *
33      * @param window the window
34      */

35     public EditActionSetsAction(IWorkbenchWindow window) {
36         super(window);
37         setText(WorkbenchMessages.EditActionSetsAction_text);
38         setActionDefinitionId("org.eclipse.ui.window.customizePerspective"); //$NON-NLS-1$
39
// @issue missing action id
40
setToolTipText(WorkbenchMessages.EditActionSetsAction_toolTip);
41         window.getWorkbench().getHelpSystem().setHelp(this,
42                 IWorkbenchHelpContextIds.EDIT_ACTION_SETS_ACTION);
43     }
44
45     /* (non-Javadoc)
46      * Method declared on IAction.
47      */

48     protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) {
49         ((WorkbenchPage) page).editActionSets();
50     }
51
52 }
53
Popular Tags