Skip to content

createExtensionCandidateChecker

context(session: KaSession)
fun createExtensionCandidateChecker(
    originalFile: KtFile, 
    nameExpression: KtSimpleNameExpression, 
    explicitReceiver: KtExpression?
): KaCompletionExtensionCandidateChecker

Returns an extension applicability checker for the given context nameExpression. The function is meant to only be used for providing auto-completion for Kotlin in IntelliJ IDEA.

The returned checker does not cache the results for individual callable candidates.

Parameters

  • originalFile: The file being edited.

  • nameExpression: The expression under the caret in an in-memory copy of originalFile with a placeholder identifier inserted. Also see CompletionUtilCore.DUMMY_IDENTIFIER in IntelliJ IDEA.

  • explicitReceiver: A receiver expression, if available (also from the in-memory copy of originalFile).