File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,14 +24,21 @@ public final class FlutterDebugProcessActions {
2424 private FlutterDebugProcessActions () {
2525 }
2626
27+ /**
28+ * Appends toolbar actions contributed by downstream dependent plugins.
29+ *
30+ * <p>{@link ActionManager#getAction(String)} returns {@link AnAction} because action groups are
31+ * actions too. The extension id resolves to an inline {@link ActionGroup}, which can contain
32+ * multiple contributed child actions.
33+ */
2734 public static void addTopToolbarExtensionActions (@ NotNull DefaultActionGroup topToolbar ) {
28- final AnAction action = ActionManager .getInstance ().getAction (TOP_TOOLBAR_EXTENSION_GROUP_ID );
29- if (!(action instanceof ActionGroup actionGroup ) || isEmpty (actionGroup )) {
35+ final AnAction extensionGroupAction = ActionManager .getInstance ().getAction (TOP_TOOLBAR_EXTENSION_GROUP_ID );
36+ if (!(extensionGroupAction instanceof ActionGroup actionGroup ) || isEmpty (actionGroup )) {
3037 return ;
3138 }
3239
3340 topToolbar .addSeparator ();
34- topToolbar .addAction (action );
41+ topToolbar .addAction (extensionGroupAction );
3542 }
3643
3744 private static boolean isEmpty (@ NotNull ActionGroup actionGroup ) {
You can’t perform that action at this time.
0 commit comments