aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src/main
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-07-02 13:21:00 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-13 14:47:37 +0200
commitb67f44943bc80dedd70c4a9e120b9c6aec78ca72 (patch)
tree349a417b0ed67e1220b4d7c3c82800a7d3a956bd /plugins/javadoc/src/main
parentf042de920724f6e2ae4ccbcb21baed6b490290ab (diff)
downloaddokka-b67f44943bc80dedd70c4a9e120b9c6aec78ca72.tar.gz
dokka-b67f44943bc80dedd70c4a9e120b9c6aec78ca72.tar.bz2
dokka-b67f44943bc80dedd70c4a9e120b9c6aec78ca72.zip
Draft for showing only first level of inheritance
Diffstat (limited to 'plugins/javadoc/src/main')
-rw-r--r--plugins/javadoc/src/main/kotlin/javadoc/signatures/JavadocSignatureProvider.kt9
-rw-r--r--plugins/javadoc/src/main/resources/views/class.korte2
2 files changed, 8 insertions, 3 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>