highlighting cleanup: rename for clarity

GitOrigin-RevId: 548003cab49fd81077cd43b767a74688cb260383
This commit is contained in:
Alexey Kudravtsev
2024-08-09 19:24:45 +02:00
committed by intellij-monorepo-bot
parent 6d9f37b644
commit 6a74b2ff01
2 changed files with 5 additions and 5 deletions

View File

@@ -444,7 +444,7 @@ public final class UpdateHighlightersUtil {
for (HighlightInfo info : toRemove) {
RangeHighlighterEx highlighter = info.getHighlighter();
if (!highlighter.isValid() || info.type.equals(HighlightInfoType.WRONG_REF)) {
disposeWithFileLevelIgnoreErrors(highlighter, project, info);
disposeWithFileLevelIgnoreErrorsInEDT(highlighter, project, info);
}
}
@@ -454,9 +454,9 @@ public final class UpdateHighlightersUtil {
}
@RequiresEdt
static void disposeWithFileLevelIgnoreErrors(@NotNull RangeHighlighter highlighter,
@NotNull Project project,
@NotNull HighlightInfo info) {
static void disposeWithFileLevelIgnoreErrorsInEDT(@NotNull RangeHighlighter highlighter,
@NotNull Project project,
@NotNull HighlightInfo info) {
if (info.isFileLevelAnnotation()) {
DaemonCodeAnalyzerEx codeAnalyzer = DaemonCodeAnalyzerEx.getInstanceEx(project);
PsiFile psiFile = PsiDocumentManager.getInstance(project).getCachedPsiFile(highlighter.getDocument());

View File

@@ -446,7 +446,7 @@ public final class DaemonListeners implements Disposable {
for (RangeHighlighter highlighter : toRemove) {
HighlightInfo info = HighlightInfo.fromRangeHighlighter(highlighter);
if (info != null) {
UpdateHighlightersUtil.disposeWithFileLevelIgnoreErrors(highlighter, myProject, info);
UpdateHighlightersUtil.disposeWithFileLevelIgnoreErrorsInEDT(highlighter, myProject, info);
}
}
}