IDEA-136619 (show chooser only for those groups which cannot be executed as actions)

This commit is contained in:
Roman Shevchenko
2015-03-19 12:05:51 +01:00
parent 20aebd2362
commit aac03345e9
@@ -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);