run action from the UI elements
Answered
I have actions in <actions> group defined in plugin.xml which are called from the context menu. is it possible to trigger an action from another ui element? for example, I have a panel that has a button and I want to add a call to this action when the button is clicked
Please sign in to leave a comment.
Hi Anton,
Please check
com.intellij.openapi.actionSystem.impl.ActionButton
and subclasses.If it doesn't meet your requirements, consider extracting the action logic to a service or util and calling it from both the action and button, as mentioned in the docs:
https://plugins.jetbrains.com/docs/intellij/basic-action-system.html#executing-actions-programmatically