Skip to content

createDeclarationProvider

fun Project.createDeclarationProvider(scope: GlobalSearchScope, contextualModule: KaModule?): KotlinDeclarationProvider

Creates a KotlinDeclarationProvider providing symbols within the given scope.

The contextualModule is the module which contains the symbols to be provided, if applicable. The declaration provider may use the contextual module to provide declarations differently, such as providing alternative declarations for an outsider module. Some functionality such as package set computation may also depend on the contextual module, as the declaration provider may require additional information not available in the scope.