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
ActionToolbar classes. These objects can be created through calls to
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.