aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-09-02 00:08:26 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-09-30 13:43:08 +0200
commitf8e1428a3235dae9fca9faaa4837313693d6456f (patch)
treec3819df25d9a6e759c899800c24502d390ff909c /plugins/javadoc/src/main/kotlin/org/jetbrains/dokka
parentadf99ba137bc6e40c3add9df70f906a16f9199a4 (diff)
downloaddokka-f8e1428a3235dae9fca9faaa4837313693d6456f.tar.gz
dokka-f8e1428a3235dae9fca9faaa4837313693d6456f.tar.bz2
dokka-f8e1428a3235dae9fca9faaa4837313693d6456f.zip
Implement more reliable PackageListService
Diffstat (limited to 'plugins/javadoc/src/main/kotlin/org/jetbrains/dokka')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt
index 38258fc6..b9828e9b 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt
@@ -2,12 +2,11 @@ package org.jetbrains.dokka.javadoc.location
import org.jetbrains.dokka.base.resolvers.local.DefaultLocationProvider
import org.jetbrains.dokka.javadoc.pages.*
-import org.jetbrains.dokka.links.*
+import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.links.Nullable
-import org.jetbrains.dokka.model.*
-import org.jetbrains.dokka.pages.ContentPage
+import org.jetbrains.dokka.links.PointingToDeclaration
import org.jetbrains.dokka.model.DisplaySourceSet
-import org.jetbrains.dokka.model.TypeConstructor
+import org.jetbrains.dokka.pages.ContentPage
import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext
@@ -128,4 +127,13 @@ class JavadocLocationProvider(pageRoot: RootPageNode, dokkaContext: DokkaContext
override fun ancestors(node: PageNode): List<PageNode> {
TODO("Not yet implemented")
}
+
+ override fun expectedLocationForDri(dri: DRI): String {
+ if (dri.packageName?.isNotEmpty() == true && dri.classNames == null)
+ return (dri.packageName?.split(".").orEmpty() + "package-summary").joinToString("/")
+
+ return (dri.packageName?.split(".").orEmpty() +
+ dri.classNames?.split(".").orEmpty() // Top-level methods will always be relocated which is fine
+ ).joinToString("/")
+ }
}