From c3b911f286186a790be607e9b803e3ed63c77289 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Wed, 22 Jan 2020 11:40:47 +0100 Subject: Patch Java analysis --- .../transformers/psi/DefaultPsiToDocumentationTranslator.kt | 13 ++++++++++++- .../kotlin/transformers/psi/PsiToDocumentationTranslator.kt | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'core/src/main/kotlin/transformers') diff --git a/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt index d3ad4526..d8595ad3 100644 --- a/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt +++ b/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt @@ -13,12 +13,13 @@ import org.jetbrains.dokka.utilities.DokkaLogger object DefaultPsiToDocumentationTranslator : PsiToDocumentationTranslator { override fun invoke( + moduleName: String, psiFiles: List, platformData: PlatformData, context: DokkaContext ): Module { val docParser = DokkaPsiParser(platformData, context.logger) - return Module( "JavaModule", + return Module(moduleName, psiFiles.map { psiFile -> val dri = DRI(packageName = psiFile.packageName) Package( @@ -145,6 +146,16 @@ class JavaTypeWrapper( if (it is PsiClassReferenceType) JavaTypeWrapper(it) else null } dri = fromPsi(type) + } else if (type is PsiEllipsisType) { + constructorFqName = type.canonicalText + constructorNamePathSegments = listOf(type.canonicalText) // TODO + arguments = emptyList() + dri = DRI("java.lang", "Object") // TODO + } else if (type is PsiArrayType) { + constructorFqName = type.canonicalText + constructorNamePathSegments = listOf(type.canonicalText) + arguments = emptyList() + dri = (type as? PsiClassReferenceType)?.let { fromPsi(it) } // TODO } else { type as PsiPrimitiveType constructorFqName = type.name diff --git a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt index 5a1209b1..41290ef8 100644 --- a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt +++ b/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt @@ -7,6 +7,7 @@ import org.jetbrains.dokka.plugability.DokkaContext interface PsiToDocumentationTranslator { fun invoke( + moduleName: String, psiFiles: List, platformData: PlatformData, context: DokkaContext -- cgit