From fa9c628f91f391e845b7ea1c4a1a2629d6fa123b Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 18 Feb 2015 17:21:22 +0100 Subject: [PATCH] check for intention dumb-awareness before applying (EA-64965 - INRE: FileBasedIndexImpl.handleDumbMode) --- .../codeInsight/intention/impl/IntentionListStep.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java index 3e23137c8621..9b0f4f10720b 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java @@ -246,6 +246,11 @@ class IntentionListStep implements ListPopupStep @Override public void run() { if (myProject.isDisposed()) return; + if (DumbService.isDumb(myProject) && !DumbService.isDumbAware(cachedAction)) { + DumbService.getInstance(myProject).showDumbModeNotification(cachedAction.getText() + " is not available during indexing"); + return; + } + PsiDocumentManager.getInstance(myProject).commitAllDocuments(); final PsiFile file = PsiUtilBase.getPsiFileInEditor(myEditor, myProject); if (file == null) {