com.intellij.openapi.actionSystem
Class AnActionEvent

java.lang.Object
  extended by com.intellij.openapi.actionSystem.AnActionEvent

public final class AnActionEvent
extends java.lang.Object

Container for the information necessary to execute or update an AnAction.

See Also:
AnAction.actionPerformed(AnActionEvent), AnAction.update(AnActionEvent)

Constructor Summary
AnActionEvent(java.awt.event.InputEvent inputEvent, DataContext dataContext, java.lang.String place, Presentation presentation, ActionManager actionManager, int modifiers)
           
 
Method Summary
 ActionManager getActionManager()
           
 DataContext getDataContext()
          Returns the context which allows to retrieve information about the state of IDEA related to the action invocation (active editor, selection and so on).
 java.awt.event.InputEvent getInputEvent()
          Returns the InputEvent which causes invocation of the action.
 int getModifiers()
          Returns the modifier keys held down during this action event.
 java.lang.String getPlace()
          Returns the identifier of the place in the IDEA user interface from where the action is invoked or updated.
 Presentation getPresentation()
          Returns the presentation which represents the action in the place from where it is invoked or updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnActionEvent

public AnActionEvent(java.awt.event.InputEvent inputEvent,
                     DataContext dataContext,
                     java.lang.String place,
                     Presentation presentation,
                     ActionManager actionManager,
                     int modifiers)
Throws:
java.lang.IllegalArgumentException - dataContext is null or place is null or presentation is null
Method Detail

getInputEvent

public java.awt.event.InputEvent getInputEvent()
Returns the InputEvent which causes invocation of the action. It might be KeyEvent, MouseEvent.

Returns:
the InputEvent instance.

getDataContext

public DataContext getDataContext()
Returns the context which allows to retrieve information about the state of IDEA related to the action invocation (active editor, selection and so on).

Returns:
the data context instance.

getPlace

public java.lang.String getPlace()
Returns the identifier of the place in the IDEA user interface from where the action is invoked or updated.

Returns:
the place identifier
See Also:
ActionPlaces

getPresentation

public Presentation getPresentation()
Returns the presentation which represents the action in the place from where it is invoked or updated.

Returns:
the presentation instance.

getModifiers

public int getModifiers()
Returns the modifier keys held down during this action event.

Returns:
the modifier keys.

getActionManager

public ActionManager getActionManager()