[AA] createDeclarationProvider: Document usages of the contextual module

^KTIJ-27411
This commit is contained in:
Marco Pennekamp
2023-10-16 20:34:03 +02:00
committed by Space Team
parent 2e5ee28681
commit 485a4cebb2
@@ -75,12 +75,12 @@ public abstract class KotlinDeclarationProviderMerger : KotlinComposableProvider
} }
/** /**
* Creates a [KotlinDeclarationProvider] providing symbols within the given [scope] in the context of the given [contextualModule]. * Creates a [KotlinDeclarationProvider] providing symbols within the given [scope].
* *
* The contextual module is the [KtModule] * 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
* TODO (marco): Document that `contextualModule` may also be used as a base for calculating the "package name set", in addition to outsider * functionality such as package set computation may also depend on the contextual module, as the declaration provider may require
* module stuff. (Not sure how deep into detail we should go here, since it's an implementation detail.) * additional information not available in the [scope].
*/ */
public fun Project.createDeclarationProvider(scope: GlobalSearchScope, contextualModule: KtModule?): KotlinDeclarationProvider = public fun Project.createDeclarationProvider(scope: GlobalSearchScope, contextualModule: KtModule?): KotlinDeclarationProvider =
KotlinDeclarationProviderFactory.getInstance(this).createDeclarationProvider(scope, contextualModule) KotlinDeclarationProviderFactory.getInstance(this).createDeclarationProvider(scope, contextualModule)