diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-16 19:46:31 +0100 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-27 03:15:02 +0100 |
commit | 076a5f421c5e4621539efd814be612f43fef33f5 (patch) | |
tree | 90b399c459cccbd1e3010778320d49b7b806b1fb /core/src/main/kotlin/plugability/DokkaContext.kt | |
parent | c203be9fb65ee221875b4e1c865bcd289a85e69c (diff) | |
download | dokka-076a5f421c5e4621539efd814be612f43fef33f5.tar.gz dokka-076a5f421c5e4621539efd814be612f43fef33f5.tar.bz2 dokka-076a5f421c5e4621539efd814be612f43fef33f5.zip |
Adding inter-module link resolving template strategy for Gfm
Diffstat (limited to 'core/src/main/kotlin/plugability/DokkaContext.kt')
-rw-r--r-- | core/src/main/kotlin/plugability/DokkaContext.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt index ee3215cc..9c9e6978 100644 --- a/core/src/main/kotlin/plugability/DokkaContext.kt +++ b/core/src/main/kotlin/plugability/DokkaContext.kt @@ -1,6 +1,5 @@ package org.jetbrains.dokka.plugability -import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.utilities.DokkaLogger import java.io.File @@ -9,7 +8,6 @@ import java.util.* import kotlin.reflect.KClass import kotlin.reflect.full.createInstance - interface DokkaContext { fun <T : DokkaPlugin> plugin(kclass: KClass<T>): T? @@ -22,7 +20,6 @@ interface DokkaContext { val configuration: DokkaConfiguration val unusedPoints: Collection<ExtensionPoint<*>> - companion object { fun create( configuration: DokkaConfiguration, @@ -192,6 +189,9 @@ private class DokkaContextConfigurationImpl( } if (extension.override is OverrideKind.Present) { + fun root(ext: Extension<*, *, *>): List<Extension<*, *, *>> = if (ext.override is OverrideKind.Present) ext.override.overriden.flatMap(::root) else listOf(ext) + if (extension.override.overriden.size > 1 && root(extension).distinct().size > 1) + throw IllegalStateException("Extension $extension overrides extensions without common root") extension.override.overriden.forEach { overriden -> suppressedExtensions.listFor(overriden) += Suppression.ByExtension(extension) } |