I have written a Intellij plugin that defines a custom action. I want to execute this via button icon like below.
Any pointers on how to add this?
I have written a Intellij plugin that defines a custom action. I want to execute this via button icon like below.
Any pointers on how to add this?
You can add the action to the VcsNavBarToobarActions
groups. You can do this by adding something like the below to your plugin.xml
.
<actions>
<group text="MyNavBarGroup">
<add-to-group group-id="VcsNavBarToobarActions" anchor="last"/>
<action class="com.myplugin.action.RandomAction" text="Random" icon="/icons/pdf-icon.png"/>
</group>
</actions>
I added a random pdf icon because that's what I had on hand.
See the discussion on
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004225719-New-actions-on-toolbar
Following worked for me:
<action id="MyCustomAction.UniqueID"
class="com.mycompany.MyCustomAction"
text="Execute an action" icon="/MyIcons/icon-16x16.png">
<add-to-group group-id="ToolbarRunGroup" anchor="last"/>
</action>
It looks as follows: