AnAction event from Toolwindow button.

Answered

Hi,

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.

Thanks

0
1 comment

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`.

0

Please sign in to leave a comment.