org.eclipse.gmf.runtime.common.ui.action.actions.global
Class GlobalActionManager
java.lang.Object
org.eclipse.gmf.runtime.common.ui.action.actions.global.GlobalActionManager
-
Direct Known Subclasses:
-
IDEGlobalActionManager
-
public class GlobalActionManager
- extends java.lang.Object
This class manages all the global actions. It has methods to create
global actions, add these actions to a menu and set these actions as
the workbench global actions handlers.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
GlobalActionManager
protected GlobalActionManager()
- Constructor for GlobalActionManager.
getInstance
public static
GlobalActionManager getInstance()
- Return the singleton.
-
-
Returns:
- a singleton instance of
GlobalActionManager
getGlobalActionHandler
public
GlobalAction getGlobalActionHandler(
IWorkbenchPart part,
java.lang.String globalActionId)
- Returns the
GlobalAction
for the given part and action id
-
-
Parameters:
-
globalActionId
- An action id -
part
- The IWorkbenchPart
-
Returns:
- GlobalAction
createActionHandler
public
GlobalAction createActionHandler(
IWorkbenchPage page,
java.lang.String id)
- Creates an GlobalAction.
-
-
Parameters:
-
page
- The workbench page -
id
- The action id
-
Returns:
- GlobalAction
createActionHandler
public
GlobalAction createActionHandler(
IWorkbenchPart part,
java.lang.String id)
- Creates an GlobalAction.
-
-
Parameters:
-
part
- The workbench part -
id
- The action id
-
Returns:
- GlobalAction
createGlobalActions
public
GlobalAction[] createGlobalActions(
IWorkbenchPart part)
- Creates default list of all global actions
-
-
Parameters:
-
part
- The workbench part
-
Returns:
- GlobalAction[] An array of GlobalAction
createGlobalActions
public
GlobalAction[] createGlobalActions(
IWorkbenchPart part,
java.lang.String[] actionIds)
- Creates specified list of global actions
-
-
Parameters:
-
part
- The workbench part -
actionIds
- List of actions ids
-
Returns:
- GlobalAction[] An array of GlobalAction
getGlobalAction
public
GlobalAction getGlobalAction(
IWorkbenchPart part,
java.lang.String actionId)
- Get Global Action
This method obtains the specific global action for the given part.
If the action does not exist, null is returned.
-
-
Parameters:
-
part
- the workbench part associated with the global action -
actionId
- the ID of the global action to locate
-
Returns:
- GlobalAction the global action, or null if none is defined for the part
setGlobalActionHandlers
public void setGlobalActionHandlers(
IActionBars bar,
IWorkbenchPart part)
- Set the global actions as the workbench global action handlers
-
-
Parameters:
-
bar
- The action bars -
part
- The workbench part
unSetGlobalActionHandlers
public void unSetGlobalActionHandlers(
IActionBars bar,
IWorkbenchPart part)
- Unset the global actions as the workbench global action handlers
-
-
Parameters:
-
bar
- The action bars -
part
- The workbench part
refreshGlobalActions
public void refreshGlobalActions(
IWorkbenchPart part)
- Refreshes the global actions for the given part
-
-
Parameters:
-
part
- The workbench part
addActionId
protected void addActionId(java.lang.String actionId)
- Adds an ActionId to the list of action ids.
-
-
Parameters:
-
actionId
- String action id to add.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.