mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
catch IndexNotReadyException in IdentifierHighlighterPass, don't highlight anything in that case
This commit is contained in:
+8
-1
@@ -33,6 +33,7 @@ import com.intellij.openapi.editor.impl.DocumentMarkupModel;
|
||||
import com.intellij.openapi.editor.markup.MarkupModel;
|
||||
import com.intellij.openapi.editor.markup.RangeHighlighter;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Couple;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
@@ -85,7 +86,13 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass {
|
||||
}
|
||||
|
||||
int flags = TargetElementUtilBase.ELEMENT_NAME_ACCEPTED | TargetElementUtilBase.REFERENCED_ELEMENT_ACCEPTED;
|
||||
PsiElement myTarget = TargetElementUtilBase.getInstance().findTargetElement(myEditor, flags, myCaretOffset);
|
||||
PsiElement myTarget;
|
||||
try {
|
||||
myTarget = TargetElementUtilBase.getInstance().findTargetElement(myEditor, flags, myCaretOffset);
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (myTarget == null) {
|
||||
if (!PsiDocumentManager.getInstance(myProject).isUncommited(myEditor.getDocument())) {
|
||||
|
||||
Reference in New Issue
Block a user