From aac03345e944247ddef660a6a8af5b8c2c16eefd Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 19 Mar 2015 12:05:51 +0100 Subject: [PATCH] IDEA-136619 (show chooser only for those groups which cannot be executed as actions) --- .../intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java index baacb03efb2c..c8212fe82848 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeKeyEventDispatcher.java @@ -575,9 +575,9 @@ public final class IdeKeyEventDispatcher implements Disposable { public void performAction(@NotNull InputEvent e, @NotNull AnAction action, @NotNull AnActionEvent actionEvent) { e.consume(); - if (action instanceof ActionGroup) { + DataContext ctx = actionEvent.getDataContext(); + if (action instanceof ActionGroup && !((ActionGroup)action).canBePerformed(ctx)) { ActionGroup group = (ActionGroup)action; - DataContext ctx = actionEvent.getDataContext(); JBPopupFactory.getInstance() .createActionGroupPopup(group.getTemplatePresentation().getText(), group, ctx, JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false) .showInBestPositionFor(ctx);