Skip to content

org.jetbrains.kotlin.analysis.api.permissions

Types

KaAllowAnalysisFromWriteAction

@RequiresOptIn(message = "Analysis should not be allowed to be run from a write action, as otherwise it may cause incorrect behavior and IDE freezes.")
annotation class KaAllowAnalysisFromWriteAction

KaAllowAnalysisOnEdt

@RequiresOptIn(message = "Analysis should not be allowed to be run from the EDT, as otherwise it may cause IDE freezes.")
annotation class KaAllowAnalysisOnEdt

KaAnalysisPermissionRegistry

Functions

allowAnalysisFromWriteAction

inline fun <T> allowAnalysisFromWriteAction(action: () -> T): T

Allows analyze to be called from a write action in the given action, which is normally not allowed.

allowAnalysisOnEdt

inline fun <T> allowAnalysisOnEdt(action: () -> T): T

Allows analyze to be called on the EDT in the given action, which is normally not allowed.

forbidAnalysis

inline fun <R> forbidAnalysis(description: String, action: () -> R): R

Forbids analyze to be called in the given action.