public abstract class ActionManager
extends java.lang.Object
AnAction
Constructor and Description |
---|
ActionManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addAnActionListener(AnActionListener listener)
Deprecated.
|
void |
addAnActionListener(AnActionListener listener,
Disposable parentDisposable)
Deprecated.
|
abstract void |
addTimerListener(int delay,
TimerListener listener) |
abstract void |
addTransparentTimerListener(int delay,
TimerListener listener) |
abstract ActionPopupMenu |
createActionPopupMenu(java.lang.String place,
ActionGroup group)
Factory method that creates an
ActionPopupMenu from the
specified group. |
abstract ActionToolbar |
createActionToolbar(java.lang.String place,
ActionGroup group,
boolean horizontal)
Factory method that creates an
ActionToolbar from the
specified group. |
abstract javax.swing.JComponent |
createButtonToolbar(java.lang.String actionPlace,
ActionGroup messageActionGroup)
Creates a panel with buttons which invoke actions from the specified action group.
|
abstract AnAction |
getAction(java.lang.String actionId)
Returns action associated with the specified actionId.
|
abstract java.lang.String [] |
getActionIds(java.lang.String idPrefix)
Returns the list of all registered action IDs with the specified prefix.
|
abstract AnAction |
getActionOrStub(java.lang.String id) |
java.lang.String |
getComponentName()
Deprecated.
Don't use
|
abstract java.lang.String |
getId(AnAction action)
Returns actionId associated with the specified action.
|
static ActionManager |
getInstance()
Fetches the instance of ActionManager implementation.
|
abstract KeyboardShortcut |
getKeyboardShortcut(java.lang.String actionId) |
abstract boolean |
isGroup(java.lang.String actionId)
Checks if the specified action ID represents an action group and not an individual action.
|
abstract void |
registerAction(java.lang.String actionId,
AnAction action)
Registers the specified action with the specified id.
|
abstract void |
registerAction(java.lang.String actionId,
AnAction action,
PluginId pluginId)
Registers the specified action with the specified id.
|
abstract void |
removeAnActionListener(AnActionListener listener)
Deprecated.
|
abstract void |
removeTimerListener(TimerListener listener) |
abstract void |
removeTransparentTimerListener(TimerListener listener) |
abstract void |
replaceAction(java.lang.String actionId,
AnAction newAction)
Replaces an existing action with ID
actionId by newAction . |
abstract ActionCallback |
tryToExecute(AnAction action,
java.awt.event.InputEvent inputEvent,
java.awt.Component contextComponent,
java.lang.String place,
boolean now) |
abstract void |
unregisterAction(java.lang.String actionId)
Unregisters the action with the specified actionId.
|
public static ActionManager getInstance()
public abstract ActionPopupMenu createActionPopupMenu(java.lang.String place, ActionGroup group)
ActionPopupMenu
from the
specified group. The specified place is associated with the created popup.place
- Determines the place that will be set for AnActionEvent
passed
when an action from the group is either performed or updated
See ActionPlaces
group
- Group from which the actions for the menu are taken.ActionPopupMenu
public abstract ActionToolbar createActionToolbar(java.lang.String place, ActionGroup group, boolean horizontal)
ActionToolbar
from the
specified group. The specified place is associated with the created toolbar.place
- Determines the place that will be set for AnActionEvent
passed
when an action from the group is either performed or updated.
See ActionPlaces
group
- Group from which the actions for the toolbar are taken.horizontal
- The orientation of the toolbar (true
- horizontal, false
- vertical)ActionToolbar
public abstract AnAction getAction(java.lang.String actionId)
actionId
- Id of the registered actionnull
if
there is no actions associated with the specified actionIdjava.lang.IllegalArgumentException
- if actionId
is null
IdeActions
public abstract java.lang.String getId(AnAction action)
null
if action
is not registeredjava.lang.IllegalArgumentException
- if action
is null
public abstract void registerAction(java.lang.String actionId, AnAction action)
actionId
- Id to associate with the actionaction
- Action to registerpublic abstract void registerAction(java.lang.String actionId, AnAction action, PluginId pluginId)
actionId
- Id to associate with the actionaction
- Action to registerpluginId
- Identifier of the plugin owning the action. Used to show the actions in the
correct place under the "Plugins" node in the "Keymap" settings pane and similar dialogs.public abstract void unregisterAction(java.lang.String actionId)
replaceAction(String, AnAction)
instead, otherwise references in action groups may not be replaced.actionId
- Id of the action to be unregisteredpublic abstract void replaceAction(java.lang.String actionId, AnAction newAction)
actionId
by newAction
. Using this method for changing behavior of a platform action
is not recommended, extract an extension point in the action implementation instead.public abstract java.lang.String [] getActionIds(java.lang.String idPrefix)
id
s which have the specified prefix.public abstract boolean isGroup(java.lang.String actionId)
actionId
- the ID to check.true
if the ID represents an action group, false
otherwise.public abstract javax.swing.JComponent createButtonToolbar(java.lang.String actionPlace, ActionGroup messageActionGroup)
actionPlace
- the place where the panel will be used (see ActionPlaces
).messageActionGroup
- the action group from which the toolbar is created.public abstract AnAction getActionOrStub(java.lang.String id)
public abstract void addTimerListener(int delay, TimerListener listener)
public abstract void removeTimerListener(TimerListener listener)
public abstract void addTransparentTimerListener(int delay, TimerListener listener)
public abstract void removeTransparentTimerListener(TimerListener listener)
public abstract ActionCallback tryToExecute(AnAction action, java.awt.event.InputEvent inputEvent, java.awt.Component contextComponent, java.lang.String place, boolean now)
@Deprecated public abstract void addAnActionListener(AnActionListener listener)
AnActionListener.TOPIC
@Deprecated public void addAnActionListener(AnActionListener listener, Disposable parentDisposable)
AnActionListener.TOPIC
@Deprecated public abstract void removeAnActionListener(AnActionListener listener)
AnActionListener.TOPIC
public abstract KeyboardShortcut getKeyboardShortcut(java.lang.String actionId)
@Deprecated public java.lang.String getComponentName()