mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
check if env is outdated when showing Add Import hint "later" (EA-97609 - TDDE: TraceableDisposable.throwDisposalError)
This commit is contained in:
@@ -23,6 +23,7 @@ import com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings;
|
||||
import com.intellij.codeInsight.daemon.ReferenceImporter;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInspection.HintAction;
|
||||
import com.intellij.injected.editor.EditorWindow;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
@@ -80,7 +81,9 @@ public class ShowAutoImportPass extends TextEditorHighlightingPass {
|
||||
Application application = ApplicationManager.getApplication();
|
||||
application.assertIsDispatchThread();
|
||||
if (!application.isUnitTestMode() && !myEditor.getContentComponent().hasFocus()) return;
|
||||
if (DumbService.isDumb(myProject)) return;
|
||||
if (DumbService.isDumb(myProject) || !myFile.isValid()) return;
|
||||
if (myEditor.isDisposed() || myEditor instanceof EditorWindow && !((EditorWindow)myEditor).isValid()) return;
|
||||
|
||||
int caretOffset = myEditor.getCaretModel().getOffset();
|
||||
importUnambiguousImports(caretOffset);
|
||||
List<HighlightInfo> visibleHighlights = getVisibleHighlights(myStartOffset, myEndOffset, myProject, myEditor);
|
||||
|
||||
Reference in New Issue
Block a user