Child pages
  • IntelliJ IDEA Action System

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


If a plugin needs to include a toolbar or popup menu built from a group of actions in its own user interface, that can be accomplished through the ActionPopupMenu and ActionToolbar classes. These objects can be created through calls to ActionManager.createActionPopupMenu and ActionManager.createActionToolbar. To get a Swing component from such an object, simply call the getComponent() method.

If your action toolbar is attached to a specific component (for example, a panel in a toolwindow), you usually need to call ActionToolbar.setTargetComponent() and pass the instance of the related component as a parameter. This ensures that the state of the toolbar buttons depends on the state of the related component, and not on the current focus location within the IDE frame.