diff options
Diffstat (limited to 'plugins/javadoc')
3 files changed, 10 insertions, 4 deletions
diff --git a/plugins/javadoc/src/main/kotlin/javadoc/signatures/JavadocSignatureProvider.kt b/plugins/javadoc/src/main/kotlin/javadoc/signatures/JavadocSignatureProvider.kt index 11db9fe1..c2483cc2 100644 --- a/plugins/javadoc/src/main/kotlin/javadoc/signatures/JavadocSignatureProvider.kt +++ b/plugins/javadoc/src/main/kotlin/javadoc/signatures/JavadocSignatureProvider.kt @@ -8,6 +8,7 @@ import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentCon import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder import org.jetbrains.dokka.kotlinAsJava.signatures.JavaSignatureUtils import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.links.sureClassNames import org.jetbrains.dokka.model.* import org.jetbrains.dokka.model.properties.PropertyContainer import org.jetbrains.dokka.pages.ContentKind @@ -68,8 +69,12 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo supertypes { if (c is WithSupertypes) { c.supertypes.map { (p, dris) -> - list(dris, sourceSets = setOf(p)) { - link(it.fqName(), it, sourceSets = setOf(p)) + val (classes, interfaces) = dris.partition { it.kind == JavaClassKindTypes.CLASS } + list(classes, prefix = " extends ", sourceSets = setOf(p)) { + link(it.dri.sureClassNames, it.dri, sourceSets = setOf(p)) + } + list(interfaces, prefix = " implements ", sourceSets = setOf(p)){ + link(it.dri.sureClassNames, it.dri, sourceSets = setOf(p)) } } } diff --git a/plugins/javadoc/src/main/resources/views/class.korte b/plugins/javadoc/src/main/resources/views/class.korte index 22793d69..62d90f7d 100644 --- a/plugins/javadoc/src/main/resources/views/class.korte +++ b/plugins/javadoc/src/main/resources/views/class.korte @@ -35,7 +35,7 @@ <pre> {% if signature.annotations != null %}{{ signature.annotations|raw }} {% endif %} {{ signature.modifiers }} <span class="typeNameLabel">{{ signature.signatureWithoutModifiers|raw }}</span> -{% if signature.supertypes != null %}extends {{signature.supertypes|raw}} {% endif %} +{% if signature.supertypes != null %}{{signature.supertypes|raw}} {% endif %} </pre> <div class="block">{{ classlikeDocumentation|raw }}</div> </li> diff --git a/plugins/javadoc/src/test/kotlin/javadoc/location/JavadocLocationTest.kt b/plugins/javadoc/src/test/kotlin/javadoc/location/JavadocLocationTest.kt index 92620f78..d60e1070 100644 --- a/plugins/javadoc/src/test/kotlin/javadoc/location/JavadocLocationTest.kt +++ b/plugins/javadoc/src/test/kotlin/javadoc/location/JavadocLocationTest.kt @@ -39,6 +39,7 @@ class JavadocTest : AbstractCoreTest() { """ |/jvmSrc/javadoc/Test.kt |package javadoc + |import java.io.Serializable |class Test() : Serializable, Cloneable """.trimIndent(), config, @@ -54,7 +55,7 @@ class JavadocTest : AbstractCoreTest() { val testClass = rootPageNode.firstChildOfType<JavadocPackagePageNode>() .firstChildOfType<JavadocClasslikePageNode>() assert( - "<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html>java.lang.Cloneable</a>" + " implements <a href=https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html>Serializable</a>, <a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html>Cloneable</a>" == transformer.htmlForContentNode(testClass.signature.supertypes!!, null) ) } |