mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[editor] add several explicit threading annotations
GitOrigin-RevId: ae09ce9de205dfaf03693846c3754c38dbd58198
This commit is contained in:
committed by
intellij-monorepo-bot
parent
06271cdaeb
commit
faf95cced4
@@ -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"))
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user