I wanted to register my action in new ui main toolbar (macos) and all of below fails:
val group = ActionManager.getInstance().getAction(IdeActions.GROUP_MAIN_TOOLBAR_NEW_UI) as DefaultActionGroup
group.add(DebugUsingHotSwapAgentAction.getAction())
and standard:
<action
id="HotSwap.debug"
class="com.vaadin.plugin.actions.DebugUsingHotSwapAgentAction"
text="Debug using HotSwapAgent"
icon="/vaadin/icons/debug.svg">
<add-to-group group-id="RunToolbarMainActionGroup"
relative-to-action="Run"
anchor="after"/>
<add-to-group group-id="MainToolbarRight" />
</action>
What’s interesting is that for plugin.xml it is displayed for < 1 second and then removed. (it can be seen on screen recording in GH issue Show debug with hotswap in toolbar by default · Issue #177 · vaadin/intellij-plugin · GitHub).
I also noticed in sources that some actions extend CustomComponentAction and define there where to be placed, but no luck in my case, implemented as below:
override fun createCustomComponent(presentation: Presentation, place: String): JComponent {
presentation.text = "Debug using HotSwapAgent"
presentation.icon = VaadinIcons.DEBUG_HOTSWAP
return object : ActionButton(this, presentation, ActionPlaces.NEW_UI_RUN_TOOLBAR, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE) {
}
}
I can see it is possible because SearchEverywhere or JRebel actions are present exactly there.