diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java index 04cc0d509cf1..d1f452384a57 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java @@ -35,6 +35,7 @@ import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressIndicatorProvider; import com.intellij.openapi.project.DumbAware; +import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.*; import com.intellij.openapi.util.text.StringUtil; @@ -113,18 +114,15 @@ public class GotoActionModel implements ChooseByNameModel, Comparator, D Map keymapActionGroups = new HashMap<>(); collectActions(keymapActionGroups, keymapOthers, emptyList(), true); - for (AnAction action : keymapActionGroups.keySet()) { - // Let menu groups have priority over keymap (and do not introduce ambiguity) - if (!myActionGroups.containsKey(action)) { - myActionGroups.put(action, keymapActionGroups.get(action)); - } - } + // Let menu groups have priority over keymap (and do not introduce ambiguity) + keymapActionGroups.forEach(myActionGroups::putIfAbsent); } @NotNull Map getAvailableIntentions() { Map map = new TreeMap<>(); - if (myProject != null && !myProject.isDisposed() && myEditor != null && !myEditor.isDisposed()) { + if (myProject != null && !myProject.isDisposed() && !DumbService.isDumb(myProject) && + myEditor != null && !myEditor.isDisposed()) { PsiFile file = PsiDocumentManager.getInstance(myProject).getPsiFile(myEditor.getDocument()); ApplyIntentionAction[] children = file == null ? null : ApplyIntentionAction.getAvailableIntentions(myEditor, file); if (children != null) {