Search code examples
android-studiointellij-plugin

ToolbarRunGroup button in new UI (IntelliJ Plugin development)


I developed a plugin for Android Studio that adds a custom button to the ToolBar. After updating to the new UI the button is not displayed anymore. The plugin is still installed and enabled. Also i couldn't find any errors in idea.log.

The button is part of the ToolbarRunGroup and shows as the first item.

<action
        id="RunCustom"
        class="com.example.runcustom"
        description="Run custom Emulator"
        icon="/ic_example">
  <add-to-group group-id="ToolbarRunGroup" anchor="first"/>
</action>

My first guess was that ToolbarRunGroup might not be the correct group-id anymore as there was quite a change in the UI of the ToolbarRunGroup on the new UI.

Anyone has an idea what I have to change to make my plugin compatible to the new UI?


Solution

  • I found the answer: use the group-id MainToolbarRight for the new IntelliJ UI, where you would use ToolbarRunGroup for the old

    (In practice you will likely want to contribute to both, to support both)

    Took some finding, but see the comment here: https://youtrack.jetbrains.com/issue/IDEA-298614/newUI-breaks-Flutter-plugin-device-selector#focus=Comments-27-6723690.0-0