diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-06-30 23:06:03 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-06 17:59:15 +0200 |
commit | b0e8622f374f6499058b0f083367b4a54512b702 (patch) | |
tree | 0fa641dc26bf1e7ed6497ee2340999e8ecc505ad /kotlin-analysis/src/main/kotlin/org | |
parent | b0b418334535adc60ee80c3df1b2293dfcaad071 (diff) | |
download | dokka-b0e8622f374f6499058b0f083367b4a54512b702.tar.gz dokka-b0e8622f374f6499058b0f083367b4a54512b702.tar.bz2 dokka-b0e8622f374f6499058b0f083367b4a54512b702.zip |
Enforce workspace unique SourceSetID
Diffstat (limited to 'kotlin-analysis/src/main/kotlin/org')
-rw-r--r-- | kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt index 426ffdde..e723768c 100644 --- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt +++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt @@ -3,6 +3,7 @@ package org.jetbrains.dokka.analysis import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet +import org.jetbrains.dokka.DokkaSourceSetID import org.jetbrains.dokka.model.SourceSetDependent import org.jetbrains.dokka.plugability.DokkaContext @@ -21,7 +22,7 @@ fun KotlinAnalysis(context: DokkaContext): KotlinAnalysis { interface KotlinAnalysis : SourceSetDependent<EnvironmentAndFacade> { override fun get(key: DokkaSourceSet): EnvironmentAndFacade - operator fun get(sourceSetID: String): EnvironmentAndFacade + operator fun get(sourceSetID: DokkaSourceSetID): EnvironmentAndFacade } internal class KotlinAnalysisImpl( @@ -32,7 +33,7 @@ internal class KotlinAnalysisImpl( return environments[key] ?: throw IllegalStateException("Missing EnvironmentAndFacade for sourceSet $key") } - override fun get(sourceSetID: String): EnvironmentAndFacade { + override fun get(sourceSetID: DokkaSourceSetID): EnvironmentAndFacade { return environments.entries.first { (sourceSet, _) -> sourceSet.sourceSetID == sourceSetID }.value } } |