From b67f44943bc80dedd70c4a9e120b9c6aec78ca72 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 2 Jul 2020 13:21:00 +0200 Subject: Draft for showing only first level of inheritance --- core/src/main/kotlin/links/DRI.kt | 5 +++++ core/src/main/kotlin/model/Documentable.kt | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt index 3f6d886f..3892fc00 100644 --- a/core/src/main/kotlin/links/DRI.kt +++ b/core/src/main/kotlin/links/DRI.kt @@ -1,5 +1,9 @@ package org.jetbrains.dokka.links +import org.jetbrains.dokka.model.ClassKind +import org.jetbrains.dokka.model.Documentable +import org.jetbrains.dokka.model.WithSupertypes + /** * [DRI] stands for DokkaResourceIdentifier */ @@ -100,3 +104,4 @@ fun DriTarget.nextTarget(): DriTarget = when (this) { else -> this } +data class DriWithKind(val dri: DRI, val kind: ClassKind) diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt index 21660f86..2c3e1323 100644 --- a/core/src/main/kotlin/model/Documentable.kt +++ b/core/src/main/kotlin/model/Documentable.kt @@ -2,6 +2,7 @@ package org.jetbrains.dokka.model import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.links.DriWithKind import org.jetbrains.dokka.model.doc.DocumentationNode import org.jetbrains.dokka.model.properties.PropertyContainer import org.jetbrains.dokka.model.properties.WithExtraProperties @@ -75,7 +76,7 @@ interface WithGenerics { } interface WithSupertypes { - val supertypes: SourceSetDependent> + val supertypes: SourceSetDependent> } interface Callable : WithVisibility, WithType, WithAbstraction, WithExpectActual { @@ -128,7 +129,7 @@ data class DClass( override val visibility: SourceSetDependent, override val companion: DObject?, override val generics: List, - override val supertypes: SourceSetDependent>, + override val supertypes: SourceSetDependent>, override val documentation: SourceSetDependent, override val expectPresentInSet: DokkaSourceSet?, override val modifier: SourceSetDependent, @@ -156,7 +157,7 @@ data class DEnum( override val visibility: SourceSetDependent, override val companion: DObject?, override val constructors: List, - override val supertypes: SourceSetDependent>, + override val supertypes: SourceSetDependent>, override val sourceSets: Set, override val extra: PropertyContainer = PropertyContainer.empty() ) : DClasslike(), WithCompanion, WithConstructors, WithSupertypes, WithExtraProperties { @@ -217,7 +218,7 @@ data class DInterface( override val visibility: SourceSetDependent, override val companion: DObject?, override val generics: List, - override val supertypes: SourceSetDependent>, + override val supertypes: SourceSetDependent>, override val sourceSets: Set, override val extra: PropertyContainer = PropertyContainer.empty() ) : DClasslike(), WithCompanion, WithGenerics, WithSupertypes, WithExtraProperties { @@ -237,7 +238,7 @@ data class DObject( override val properties: List, override val classlikes: List, override val visibility: SourceSetDependent, - override val supertypes: SourceSetDependent>, + override val supertypes: SourceSetDependent>, override val sourceSets: Set, override val extra: PropertyContainer = PropertyContainer.empty() ) : DClasslike(), WithSupertypes, WithExtraProperties { -- cgit