/******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ui; /** * Action ids for standard actions, groups in the workbench menu bar, and * global actions. *

* This interface contains constants only; it is not intended to be implemented * or extended. *

*

Standard menus

* *

Standard group for adding top level menus

* *

Global actions

* *

Standard File menu actions

* *

Standard Edit menu actions

* *

Standard Perspective menu actions

* *

Standard Workbench menu actions

* *

Standard Window menu actions

* *

Standard Help menu actions

* *

Standard pop-up menu groups

* *

* To hook a global action handler, a view should use the following code: * * IAction copyHandler = ...; * view.getSite().getActionBars().setGlobalActionHandler( * IWorkbenchActionConstants.COPY, * copyHandler); * * For editors, this should be done in the IEditorActionBarContributor. *

* * @see org.eclipse.ui.IActionBars#setGlobalActionHandler * * Note: many of the remaining non-deprecated constants here are IDE-specific * and should be deprecated and moved to a constant pool at the IDE layer * (e.g. IIDEActionConstants). * @noimplement This interface is not intended to be implemented by clients. * @noextend This interface is not intended to be extended by clients. */ public interface IWorkbenchActionConstants { // Standard menus: /** *

* [Issue: MENU_PREFIX is "". It is used to prefix some of the other * constants. There doesn't seem to be much point for this. * Recommend deleting it. * ] *

*/ public static final String MENU_PREFIX = ""; //$NON-NLS-1$ /** *

* [Issue: SEP is "/". It is not used anywhere. Recommend deleting it.] *

*/ public static final String SEP = "/"; //$NON-NLS-1$ /** * Name of standard File menu (value "file"). */ public static final String M_FILE = MENU_PREFIX + "file"; //$NON-NLS-1$ /** * Name of standard Edit menu (value "edit"). */ public static final String M_EDIT = MENU_PREFIX + "edit"; //$NON-NLS-1$ /** * Name of standard View menu (value "view"). * @deprecated Since 3.0. This is no longer used. */ public static final String M_VIEW = MENU_PREFIX + "view"; //$NON-NLS-1$ /** * Name of standard Workbench menu (value "workbench"). * @deprecated Since 3.0. This is no longer used. */ public static final String M_WORKBENCH = MENU_PREFIX + "workbench"; //$NON-NLS-1$ // menu reorg /** * Name of standard Navigate menu (value "navigate"). */ public static final String M_NAVIGATE = MENU_PREFIX + "navigate"; //$NON-NLS-1$ /** * Name of standard Project menu (value "project"). */ public static final String M_PROJECT = MENU_PREFIX + "project"; //$NON-NLS-1$ // end menu reorg /** * Name of standard Window menu (value "window"). */ public static final String M_WINDOW = MENU_PREFIX + "window"; //$NON-NLS-1$ /** * Name of Launch window menu (value "launch"). */ public static final String M_LAUNCH = MENU_PREFIX + "launch"; //$NON-NLS-1$ /** * Name of standard Help menu (value "help"). */ public static final String M_HELP = MENU_PREFIX + "help"; //$NON-NLS-1$ /** * ID of the Project configure popup menu, can be used in * menuContributions and objectContributions. * * @since 3.5 */ public static final String M_PROJECT_CONFIGURE = "org.eclipse.ui.projectConfigure"; //$NON-NLS-1$ // Standard area for adding top level menus: /** * Name of group for adding new top-level menus (value "additions"). */ public static final String MB_ADDITIONS = "additions"; // Group. //$NON-NLS-1$ // Standard file actions: /** * File menu: name of group for start of menu (value "fileStart"). */ public static final String FILE_START = "fileStart"; // Group. //$NON-NLS-1$ /** * File menu: name of group for end of menu (value "fileEnd"). */ public static final String FILE_END = "fileEnd"; // Group. //$NON-NLS-1$ /** * File menu: name of standard New action (value "new"). * * @deprecated in 3.0. Use * org.eclipse.ui.ActionFactory.NEW.getId() * instead. */ public static final String NEW = "new"; //$NON-NLS-1$ /** * File menu: name of group for extra New-like actions (value "new.ext"). */ public static final String NEW_EXT = "new.ext"; // Group. //$NON-NLS-1$ /** * File menu: name of standard Close action (value "close"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#CLOSE * ActionFactory.CLOSE.getId()} instead. */ public static final String CLOSE = "close"; //$NON-NLS-1$ /** * File menu: name of standard Close All action (value "closeAll"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#CLOSE_ALL * ActionFactory.CLOSE_ALL.getId()} instead. */ public static final String CLOSE_ALL = "closeAll"; //$NON-NLS-1$ /** * File menu: name of group for extra Close-like actions (value "close.ext"). */ public static final String CLOSE_EXT = "close.ext"; // Group. //$NON-NLS-1$ /** * File menu: name of standard Save action (value "save"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#SAVE * ActionFactory.SAVE.getId()} instead. */ public static final String SAVE = "save"; //$NON-NLS-1$ /** * File menu: name of standard Save As action (value "saveAs"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#SAVE_AS * ActionFactory.SAVE_AS.getId()} instead. */ public static final String SAVE_AS = "saveAs"; //$NON-NLS-1$ /** * File menu: name of standard Save All action (value "saveAll"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#SAVE_ALL * ActionFactory.SAVE_ALL.getId()} instead. */ public static final String SAVE_ALL = "saveAll"; //$NON-NLS-1$ /** * File menu: name of group for extra Save-like actions (value "save.ext"). */ public static final String SAVE_EXT = "save.ext"; // Group. //$NON-NLS-1$ /** * File menu: name of standard Print global action * (value "print"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#PRINT * ActionFactory.PRINT.getId()} instead. */ public static final String PRINT = "print"; // Global action. //$NON-NLS-1$ /** * File menu: name of group for extra Print-like actions (value "print.ext"). * @since 3.0 */ public static final String PRINT_EXT = "print.ext"; // Group. //$NON-NLS-1$ /** * File menu: name of standard Import action (value "import"). * * @deprecated in 3.0. Use * org.eclipse.ui.ActionFactory.IMPORT.getId() * instead. */ public static final String IMPORT = "import"; //$NON-NLS-1$ /** * File menu: name of standard Export action (value "export"). * * @deprecated in 3.0. Use * org.eclipse.ui.ActionFactory.EXPORT.getId() * instead. */ public static final String EXPORT = "export"; //$NON-NLS-1$ /** * File menu: name of group for extra Import-like actions (value "import.ext"). */ public static final String IMPORT_EXT = "import.ext"; // Group. //$NON-NLS-1$ /** * File menu: name of "Most Recently Used File" group. * (value "mru"). */ public static final String MRU = "mru"; //$NON-NLS-1$ /** * File menu: name of standard Quit action (value "quit"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#QUIT * ActionFactory.QUIT.getId()} instead. */ public static final String QUIT = "quit"; //$NON-NLS-1$ // Standard edit actions: /** * Edit menu: name of group for start of menu (value "editStart"). */ public static final String EDIT_START = "editStart"; // Group. //$NON-NLS-1$ /** * Edit menu: name of group for end of menu (value "editEnd"). */ public static final String EDIT_END = "editEnd"; // Group. //$NON-NLS-1$ /** * Edit menu: name of standard Undo global action * (value "undo"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#UNDO * ActionFactory.UNDO.getId()} instead. */ public static final String UNDO = "undo"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Redo global action * (value "redo"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#REDO * ActionFactory.REDO.getId()} instead. */ public static final String REDO = "redo"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of group for extra Undo-like actions (value "undo.ext"). */ public static final String UNDO_EXT = "undo.ext"; // Group. //$NON-NLS-1$ /** * Edit menu: name of standard Cut global action * (value "cut"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#CUT * ActionFactory.CUT.getId()} instead. */ public static final String CUT = "cut"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Copy global action * (value "copy"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#COPY * ActionFactory.COPY.getId()} instead. */ public static final String COPY = "copy"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Paste global action * (value "paste"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#PASTE * ActionFactory.PASTE.getId()} instead. */ public static final String PASTE = "paste"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of group for extra Cut-like actions (value "cut.ext"). */ public static final String CUT_EXT = "cut.ext"; // Group. //$NON-NLS-1$ /** * Edit menu: name of standard Delete global action * (value "delete"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#DELETE * ActionFactory.DELETE.getId()} instead. */ public static final String DELETE = "delete"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Find global action * (value "find"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#FIND * ActionFactory.FIND.getId()} instead. */ public static final String FIND = "find"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of group for extra Find-like actions (value "find.ext"). */ public static final String FIND_EXT = "find.ext"; // Group. //$NON-NLS-1$ /** * Edit menu: name of standard Select All global action * (value "selectAll"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#SELECT_ALL * ActionFactory.SELECT_ALL.getId()} instead. */ public static final String SELECT_ALL = "selectAll"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Add Bookmark global action * (value "bookmark"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.BOOKMARK.getId() * instead. */ public static final String BOOKMARK = "bookmark"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Add Task global action * (value "addTask"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.ADD_TASK.getId() * instead. */ public static final String ADD_TASK = "addTask"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of group for extra Add-like actions (value "add.ext"). */ public static final String ADD_EXT = "add.ext"; // Group. //$NON-NLS-1$ // Standard workbench actions: /** * Workbench menu: name of group for start of menu * (value "wbStart"). */ public static final String WB_START = "wbStart"; // Group. //$NON-NLS-1$ /** * Workbench menu: name of group for end of menu * (value "wbEnd"). */ public static final String WB_END = "wbEnd"; // Group. //$NON-NLS-1$ /** * Workbench menu: name of group for extra Build-like actions * (value "build.ext"). */ public static final String BUILD_EXT = "build.ext"; // Group. //$NON-NLS-1$ /** * Workbench menu: name of standard Build action * (value "build"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.BUILD.getId() * instead. */ public static final String BUILD = "build"; //$NON-NLS-1$ /** * Workbench menu: name of standard Rebuild All action * (value "rebuildAll"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.REBUILD_ALL.getId() * instead. */ public static final String REBUILD_ALL = "rebuildAll"; //$NON-NLS-1$ // Workbench toolbar ids: /** * Workbench toolbar id for file toolbar group. * * @since 2.1 */ public static final String TOOLBAR_FILE = "org.eclipse.ui.workbench.file"; //$NON-NLS-1$ /** * Workbench toolbar id for navigate toolbar group. * * @since 2.1 */ public static final String TOOLBAR_NAVIGATE = "org.eclipse.ui.workbench.navigate"; //$NON-NLS-1$ /** * Workbench toolbar id for help toolbar group. * * @since 3.1 */ public static final String TOOLBAR_HELP = "org.eclipse.ui.workbench.help"; //$NON-NLS-1$ // Workbench toolbar group ids. To add an item at the beginning of the group, // use the GROUP id. To add an item at the end of the group, use the EXT id. /** * Group id for pin toolbar group. * * @since 2.1 */ public static final String PIN_GROUP = "pin.group"; //$NON-NLS-1$ /** * Group id for history toolbar group. * * @since 2.1 */ public static final String HISTORY_GROUP = "history.group"; //$NON-NLS-1$ /** * Group id for new toolbar group. * * @since 2.1 */ public static final String NEW_GROUP = "new.group"; //$NON-NLS-1$ /** * Group id for save group. * * @since 2.1 */ public static final String SAVE_GROUP = "save.group"; //$NON-NLS-1$ /** * Group id for build group. * * @since 2.1 */ public static final String BUILD_GROUP = "build.group"; //$NON-NLS-1$ // Pop-up menu groups: /** * Pop-up menu: name of group for Managing actions (value "group.managing"). */ public static final String GROUP_MANAGING = "group.managing"; //$NON-NLS-1$ /** * Pop-up menu: name of group for Reorganize actions (value "group.reorganize"). */ public static final String GROUP_REORGANIZE = "group.reorganize"; //$NON-NLS-1$ /** * Pop-up menu: name of group for Add actions (value "group.add"). */ public static final String GROUP_ADD = "group.add"; //$NON-NLS-1$ /** * Pop-up menu: name of group for File actions (value "group.file"). */ public static final String GROUP_FILE = "group.file"; //$NON-NLS-1$ /** * Pop-up menu: name of group for Show In actions (value "group.showIn"). * * @since 2.1 */ public static final String GROUP_SHOW_IN = "group.showIn"; //$NON-NLS-1$ /** * Coolbar: name of group for application created actions * * @since 3.0 */ public static final String GROUP_APP = "group.application"; //$NON-NLS-1$ /** * Toolbar: name of group for editor action bars. */ public static final String GROUP_EDITOR = "group.editor"; //$NON-NLS-1$ /** * Coolbar: name of group for help actions and contributions * * @since 3.1 */ public static final String GROUP_HELP = "group.help"; //$NON-NLS-1$ // Standard view actions: /** * View menu: name of group for additional view-like items. * (value "additions"). */ public static final String VIEW_EXT = MB_ADDITIONS; // Group. // Standard window actions: /** * Window menu: name of group for additional window-like items. * (value "additions"). */ public static final String WINDOW_EXT = MB_ADDITIONS; // Group. /** * Launch menu: name of group for launching additional windows. * (value "additions"). */ public static final String LAUNCH_EXT = MB_ADDITIONS; // Group. // menu reorg /** * File menu: name of standard Revert global action * (value "revert"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#REVERT * ActionFactory.REVERT.getId()} instead. */ public static final String REVERT = "revert"; // Global action. //$NON-NLS-1$ /** * File menu: name of standard Refresh global action * (value "refresh"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#REFRESH * ActionFactory.REFRESH.getId()} instead. */ public static final String REFRESH = "refresh"; // Global action. //$NON-NLS-1$ /** * File menu: name of standard Properties global action * (value "properties"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#PROPERTIES * ActionFactory.PROPERTIES.getId()} instead. */ public static final String PROPERTIES = "properties"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Move global action * (value "move"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#MOVE * ActionFactory.MOVE.getId()} instead. */ public static final String MOVE = "move"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Rename global action * (value "rename"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#RENAME * ActionFactory.RENAME.getId()} instead. */ public static final String RENAME = "rename"; // Global action. //$NON-NLS-1$ /** * Edit menu: name of standard Add Task global action * (value "addTask"). */ // public static final String ADD_TASK = "addTask"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of group for start of menu * (value "navStart"). */ public static final String NAV_START = "navStart"; // Group. //$NON-NLS-1$ /** * Navigate menu: name of group for end of menu * (value "navEnd"). */ public static final String NAV_END = "navEnd"; // Group. //$NON-NLS-1$ /** * File and Navigate menu: name of group for extra Open actions * (value "open.ext"). */ public static final String OPEN_EXT = "open.ext"; // Group. //$NON-NLS-1$ /** * Navigate menu: name of group for extra Show actions * (value "show.ext"). */ public static final String SHOW_EXT = "show.ext"; // Group. //$NON-NLS-1$ /** * Navigate menu: name of standard Go Into global action * (value "goInto"). */ public static final String GO_INTO = "goInto"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Go To submenu * (value "goTo"). */ public static final String GO_TO = "goTo"; //$NON-NLS-1$ /** * Navigate menu: name of standard Go To Resource global action * (value "goToResource"). */ public static final String GO_TO_RESOURCE = "goToResource"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Sync With Editor global action (value * "syncEditor"). * * @deprecated this action will be removed soon; use SHOW_IN instead */ public static final String SYNC_EDITOR = "syncEditor"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Show In... action * (value "showIn"). * * @since 2.1 * * @deprecated */ public static final String SHOW_IN = "showIn"; //$NON-NLS-1$ /** * Navigate menu: name of standard Back global action * (value "back"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#BACK * ActionFactory.BACK.getId()} instead. */ public static final String BACK = "back"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Forward global action * (value "forward"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#FORWARD * ActionFactory.FORWARD.getId()} instead. */ public static final String FORWARD = "forward"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Up global action * (value "up"). */ public static final String UP = "up"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Next global action * (value "next"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#NEXT * ActionFactory.NEXT.getId()} instead. */ public static final String NEXT = "next"; // Global action. //$NON-NLS-1$ /** * Navigate menu: name of standard Up global action * (value "previous"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#PREVIOUS * ActionFactory.PREVIOUS.getId()} instead. */ public static final String PREVIOUS = "previous"; // Global action. //$NON-NLS-1$ /** * Project menu: name of group for start of menu * (value "projStart"). */ public static final String PROJ_START = "projStart"; // Group. //$NON-NLS-1$ /** * Project menu: name of group for start of menu * (value "projEnd"). */ public static final String PROJ_END = "projEnd"; // Group. //$NON-NLS-1$ /** * Project menu: name of standard Build Project global action * (value "buildProject"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.BUILD_PROJECT.getId() * instead. */ public static final String BUILD_PROJECT = "buildProject"; // Global action. //$NON-NLS-1$ /** * Project menu: name of standard Rebuild Project global action * (value "rebuildProject"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.REBUILD_PROJECT.getId() * instead. */ public static final String REBUILD_PROJECT = "rebuildProject"; // Global action. //$NON-NLS-1$ /** * Project menu: name of standard Open Project global action * (value "openProject"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.OPEN_PROJECT.getId() * instead. */ public static final String OPEN_PROJECT = "openProject"; // Global action. //$NON-NLS-1$ /** * Project menu: name of standard Close Project global action * (value "closeProject"). * * @deprecated in 3.0. Use * org.eclipse.ui.ide.IDEActionFactory.CLOSE_PROJECT.getId() * instead. */ public static final String CLOSE_PROJECT = "closeProject"; // Global action. //$NON-NLS-1$ // end menu reorg // Standard help actions: /** * Help menu: name of group for start of menu * (value "helpStart"). */ public static final String HELP_START = "helpStart"; // Group. //$NON-NLS-1$ /** * Help menu: name of group for end of menu * (value "helpEnd"). */ public static final String HELP_END = "helpEnd"; // Group. //$NON-NLS-1$ /** * Help menu: name of standard About action * (value "about"). * * @deprecated in 3.0. Use {@link org.eclipse.ui.actions.ActionFactory#ABOUT * ActionFactory.ABOUT.getId()} instead. */ public static final String ABOUT = "about"; //$NON-NLS-1$ /** * Standard global actions in a workbench window. * * @deprecated in 3.0 */ public static final String[] GLOBAL_ACTIONS = { UNDO, REDO, CUT, COPY, PASTE, PRINT, DELETE, FIND, SELECT_ALL, BOOKMARK }; }