aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src
diff options
context:
space:
mode:
authorbomberaya <bomberaya@users.noreply.github.com>2022-11-09 15:09:48 +0100
committerGitHub <noreply@github.com>2022-11-09 15:09:48 +0100
commit631934363a02e06b5f7dcb7a8141223c6363f2bb (patch)
treebb124577c48445927e464dbfbd48b05a7e4ad3df /plugins/javadoc/src
parentfaca33f69872cfd3abe84e3b7e1d4a9e309d7abc (diff)
downloaddokka-631934363a02e06b5f7dcb7a8141223c6363f2bb.tar.gz
dokka-631934363a02e06b5f7dcb7a8141223c6363f2bb.tar.bz2
dokka-631934363a02e06b5f7dcb7a8141223c6363f2bb.zip
Fix missing package name in Javadoc format (#2734)
Diffstat (limited to 'plugins/javadoc/src')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt2
-rw-r--r--plugins/javadoc/src/main/resources/views/class.korte2
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt2
3 files changed, 3 insertions, 3 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt
index 2b3005ab..de6193a7 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/utils.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.model.*
internal fun JavadocFunctionNode.getAnchor(): String =
"$name(${parameters.joinToString(",") {
when (val bound = if (it.typeBound is Nullable) it.typeBound.inner else it.typeBound) {
- is TypeConstructor -> bound.dri.classNames.orEmpty()
+ is TypeConstructor -> listOf(bound.dri.packageName, bound.dri.classNames).joinToString(".")
is TypeParameter -> bound.name
is PrimitiveJavaType -> bound.name
is UnresolvedBound -> bound.name
diff --git a/plugins/javadoc/src/main/resources/views/class.korte b/plugins/javadoc/src/main/resources/views/class.korte
index c9b1d7ef..84e302fb 100644
--- a/plugins/javadoc/src/main/resources/views/class.korte
+++ b/plugins/javadoc/src/main/resources/views/class.korte
@@ -3,7 +3,7 @@
<main role="main">
<div class="header">
- <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">{{ package }}</a></div>
+ <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">{{ packageName }}</a></div>
<h2 title="{{ kind|capitalize }} {{ name }}" class="title">{{ kind|capitalize }} {{ name }}</h2>
</div>
<div class="contentContainer">
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt
index 94af07af..fe944794 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt
@@ -95,7 +95,7 @@ class JavadocLocationTest : BaseAbstractTest() {
.firstChildOfType<JavadocClasslikePageNode> { it.name == "Test" }
val testFunctionNode = testClassNode.methods.first { it.name == "test2" }
assertEquals(
- """<a href=Test.html#test2(String)>test2</a>(<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a> s)""",
+ """<a href=Test.html#test2(java.lang.String)>test2</a>(<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a> s)""",
transformer.htmlForContentNode(
testFunctionNode.signature.signatureWithoutModifiers,
testClassNode