aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin')
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt5
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt5
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 4695dac5..17cd493a 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -21,6 +21,7 @@ import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.query
import org.jetbrains.dokka.plugability.querySingle
+import org.jetbrains.dokka.transformers.sources.AsyncSourceToDocumentableTranslator
import org.jetbrains.dokka.transformers.sources.SourceToDocumentableTranslator
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.kotlin.builtins.functions.FunctionClassDescriptor
@@ -65,11 +66,11 @@ import org.jetbrains.kotlin.resolve.constants.KClassValue as ConstantsKtClassVal
class DefaultDescriptorToDocumentableTranslator(
context: DokkaContext
-) : SourceToDocumentableTranslator {
+) : AsyncSourceToDocumentableTranslator {
private val kotlinAnalysis: KotlinAnalysis = context.plugin<DokkaBase>().querySingle { kotlinAnalysis }
- override suspend fun invoke(sourceSet: DokkaSourceSet, context: DokkaContext): DModule {
+ override suspend fun invokeSuspending(sourceSet: DokkaSourceSet, context: DokkaContext): DModule {
val (environment, facade) = kotlinAnalysis[sourceSet]
val packageFragments = environment.getSourceFiles().asSequence()
.map { it.packageFqName }
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index 15ef24bb..bf7fbe7d 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -27,6 +27,7 @@ import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.querySingle
+import org.jetbrains.dokka.transformers.sources.AsyncSourceToDocumentableTranslator
import org.jetbrains.dokka.transformers.sources.SourceToDocumentableTranslator
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.dokka.utilities.parallelForEach
@@ -52,11 +53,11 @@ import java.io.File
class DefaultPsiToDocumentableTranslator(
context: DokkaContext
-) : SourceToDocumentableTranslator {
+) : AsyncSourceToDocumentableTranslator {
private val kotlinAnalysis: KotlinAnalysis = context.plugin<DokkaBase>().querySingle { kotlinAnalysis }
- override suspend fun invoke(sourceSet: DokkaSourceSet, context: DokkaContext): DModule {
+ override suspend fun invokeSuspending(sourceSet: DokkaSourceSet, context: DokkaContext): DModule {
return coroutineScope {
fun isFileInSourceRoots(file: File): Boolean =
sourceSet.sourceRoots.any { root -> file.startsWith(root) }