AnAction event from Toolwindow button.



I am trying to execute action using a button on the toolbar of ToolWindow. But the actionListener doesn't support AnAction but just Action. any hints? I want to basically be able to perform an action in the project after the button click.


1 comment
Comment actions Permalink

You can create ActionToolbar using `com.intellij.openapi.actionSystem.ActionManager.createActionToolbar` and add AnAction on it via ActionGroup.

Or, if you need to use JButton, Action and InputEvents, you can use `com.intellij.openapi.actionSystem.ex.ActionUtil.invokeAction`.


Please sign in to leave a comment.