diff --git a/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/HighlightingPanel.kt b/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/HighlightingPanel.kt index e4c6caa11f6b..e2e49fd53e6b 100644 --- a/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/HighlightingPanel.kt +++ b/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/HighlightingPanel.kt @@ -21,6 +21,8 @@ import com.intellij.util.Alarm.ThreadToUse import com.intellij.util.SingleAlarm import com.intellij.util.concurrency.AppExecutorUtil import com.intellij.util.concurrency.ThreadingAssertions +import com.intellij.util.concurrency.annotations.RequiresBackgroundThread +import com.intellij.util.concurrency.annotations.RequiresReadLock import com.intellij.util.ui.tree.TreeUtil import org.jetbrains.annotations.Nls import org.jetbrains.concurrency.CancellablePromise @@ -146,6 +148,7 @@ class HighlightingPanel(project: Project, state: ProblemsViewState) return null } + @RequiresBackgroundThread private fun updateStatus() { ApplicationManager.getApplication().assertIsNonDispatchThread() val status = ClientId.withClientId(session.clientId) { ReadAction.compute(ThrowableComputable { getCurrentStatus() })} @@ -163,6 +166,8 @@ class HighlightingPanel(project: Project, state: ProblemsViewState) } } + @RequiresBackgroundThread + @RequiresReadLock private fun getCurrentStatus(): Status { ApplicationManager.getApplication().assertIsNonDispatchThread() val file = getCurrentFile() ?: return Status(ProblemsViewBundle.message("problems.view.highlighting.no.selected.file")) diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/markup/ErrorStripeRenderer.java b/platform/platform-impl/src/com/intellij/openapi/editor/markup/ErrorStripeRenderer.java index 41f2307c9589..1ddd054c8105 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/markup/ErrorStripeRenderer.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/markup/ErrorStripeRenderer.java @@ -15,8 +15,13 @@ */ package com.intellij.openapi.editor.markup; +import com.intellij.util.concurrency.annotations.RequiresBackgroundThread; +import com.intellij.util.concurrency.annotations.RequiresReadLock; import org.jetbrains.annotations.NotNull; public interface ErrorStripeRenderer { - @NotNull AnalyzerStatus getStatus(); + @RequiresReadLock + @RequiresBackgroundThread + @NotNull + AnalyzerStatus getStatus(); }