Skip to content

Commit

Permalink
Rename resolveKDocTextLink functions to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatBeresnev committed Nov 22, 2023
1 parent 8f16281 commit 89afca3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal inline fun DRI?.ifUnresolved(action: () -> Unit): DRI? = this ?: run {
*
* @return [DRI] or null if the [link] is unresolved
*/
internal fun KtAnalysisSession.resolveKDocTextLinkDRI(link: String, context: PsiElement? = null): DRI? {
internal fun KtAnalysisSession.resolveKDocTextLinkToDRI(link: String, context: PsiElement? = null): DRI? {
val kDocLink = createKDocLink(link, context)
return kDocLink?.let { resolveKDocLinkToDRI(it) }
}
Expand All @@ -46,7 +46,7 @@ internal fun KtAnalysisSession.resolveKDocTextLinkDRI(link: String, context: Psi
*
* @return [KtSymbol] or null if the [link] is unresolved
*/
internal fun KtAnalysisSession.resolveKDocTextLinkSymbol(link: String, context: PsiElement? = null): KtSymbol? {
internal fun KtAnalysisSession.resolveKDocTextLinkToSymbol(link: String, context: PsiElement? = null): KtSymbol? {
val kDocLink = createKDocLink(link, context)
return kDocLink?.let { resolveToSymbol(it) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal fun KtAnalysisSession.getGeneratedKDocDocumentationFrom(symbol: KtSymbo
private fun KtAnalysisSession.loadTemplate(filePath: String): DocumentationNode? {
val kdoc = loadContent(filePath) ?: return null
val externalDriProvider = { link: String ->
resolveKDocTextLinkDRI(link)
resolveKDocTextLinkToDRI(link)
}

val parser = MarkdownParser(externalDriProvider, filePath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.logUnresolvedLink
import org.jetbrains.dokka.analysis.kotlin.symbols.plugin.KotlinAnalysis
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.moduledocs.ModuleAndPackageDocumentation.Classifier.Module
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.moduledocs.ModuleAndPackageDocumentation.Classifier.Package
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.resolveKDocTextLinkDRI
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.resolveKDocTextLinkToDRI
import org.jetbrains.dokka.analysis.markdown.jb.MarkdownParser
import org.jetbrains.dokka.model.doc.DocumentationNode
import org.jetbrains.dokka.utilities.DokkaLogger
Expand Down Expand Up @@ -47,7 +47,7 @@ internal fun ModuleAndPackageDocumentationParsingContext(
MarkdownParser(
externalDri = { link ->
analyze(sourceModule) {
resolveKDocTextLinkDRI(
resolveKDocTextLinkToDRI(
link,
contextPsi
).ifUnresolved {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
import org.jetbrains.dokka.analysis.kotlin.sample.SampleAnalysisEnvironment
import org.jetbrains.dokka.analysis.kotlin.sample.SampleAnalysisEnvironmentCreator
import org.jetbrains.dokka.analysis.kotlin.sample.SampleSnippet
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.resolveKDocTextLinkSymbol
import org.jetbrains.dokka.analysis.kotlin.symbols.kdoc.resolveKDocTextLinkToSymbol
import org.jetbrains.dokka.analysis.kotlin.symbols.plugin.KotlinAnalysis
import org.jetbrains.dokka.analysis.kotlin.symbols.plugin.SamplesKotlinAnalysis
import org.jetbrains.dokka.analysis.kotlin.symbols.plugin.SymbolsAnalysisPlugin
Expand Down Expand Up @@ -83,7 +83,7 @@ private class SymbolSampleAnalysisEnvironment(
?: projectKotlinAnalysis.getModule(sourceSet)

return analyze(ktSourceModule) {
resolveKDocTextLinkSymbol(fqLink)
resolveKDocTextLinkToSymbol(fqLink)
?.sourcePsiSafe()
}
}
Expand Down

0 comments on commit 89afca3

Please sign in to comment.