check for intention dumb-awareness before applying (EA-64965 - INRE: FileBasedIndexImpl.handleDumbMode)

This commit is contained in:
peter
2015-02-18 17:38:30 +01:00
parent b82acb31c5
commit fa9c628f91
@@ -246,6 +246,11 @@ class IntentionListStep implements ListPopupStep<IntentionActionWithTextCaching>
@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) {