From 3e5f57202eddfb677ba03293a2430593e009febb Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Mon, 25 Mar 2024 13:33:37 +0400 Subject: [PATCH] switch `getActions` to existing visible actions only Groups must not be queried outside an update session. Especially in RemDev. IJPL-566 Cleanup ActionToolbar API GitOrigin-RevId: 090e9611db62d410068727f4e0c53c8e76acda9e --- .../openapi/actionSystem/impl/ActionToolbarImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionToolbarImpl.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionToolbarImpl.java index fd6359f3d3a1..17a89626a13a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionToolbarImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionToolbarImpl.java @@ -1506,10 +1506,8 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar, QuickAct @Override public @NotNull List getActions() { List result = new ArrayList<>(); - List secondary = new ArrayList<>(); - AnAction[] kids = myActionGroup.getChildren(null); - for (AnAction each : kids) { + for (AnAction each : myVisibleActions) { if (myActionGroup.isPrimary(each)) { result.add(each); } @@ -1519,7 +1517,6 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar, QuickAct } result.add(new Separator()); result.addAll(secondary); - return result; }