Skip to content

analyze

inline fun <R> analyze(useSiteElement: PsiElement, action: context(KaSession) () -> R): R

Executes the given action in an analysis session context.

The KaSession is provided as a context parameter, so members of the Analysis API are available inside action without an explicit receiver.

The project will be analyzed from the perspective of useSiteElement's module, also called the use-site module.

Neither the analysis session nor any other lifetime owners may be leaked outside the analyze block. Please consult the documentation of KaSession for important information about lifetime management.

See also

inline fun <R> analyze(useSiteModule: KaModule, action: context(KaSession) () -> R): R

Executes the given action in an analysis session context.

The KaSession is provided as a context parameter, so members of the Analysis API are available inside action without an explicit receiver.

The project will be analyzed from the perspective of the given useSiteModule.

Neither the analysis session nor any other lifetime owners may be leaked outside the analyze block. Please consult the documentation of KaSession for important information about lifetime management.