aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Analysis/JavaResolveExtension.kt2
-rw-r--r--core/src/main/kotlin/Formats/JavaLayoutHtmlFormat.kt3
-rw-r--r--core/src/main/kotlin/Generation/DokkaGenerator.kt1
-rw-r--r--core/src/main/kotlin/Kotlin/KotlinLanguageService.kt1
-rw-r--r--core/src/main/kotlin/Model/DocumentationNode.kt7
5 files changed, 8 insertions, 6 deletions
diff --git a/core/src/main/kotlin/Analysis/JavaResolveExtension.kt b/core/src/main/kotlin/Analysis/JavaResolveExtension.kt
index f8992d45..4dc6b366 100644
--- a/core/src/main/kotlin/Analysis/JavaResolveExtension.kt
+++ b/core/src/main/kotlin/Analysis/JavaResolveExtension.kt
@@ -128,4 +128,4 @@ private fun <T : DeclarationDescriptorWithSource> Collection<T>.findByJavaElemen
}
fun PsiElement.javaResolutionFacade() =
- KotlinCacheService.getInstance(project).getResolutionFacadeByFile(this.originalElement.containingFile, JvmPlatform)
+ KotlinCacheService.getInstance(project).getResolutionFacadeByFile(this.originalElement.containingFile, JvmPlatform)!!
diff --git a/core/src/main/kotlin/Formats/JavaLayoutHtmlFormat.kt b/core/src/main/kotlin/Formats/JavaLayoutHtmlFormat.kt
index f73cd23e..885cdf6c 100644
--- a/core/src/main/kotlin/Formats/JavaLayoutHtmlFormat.kt
+++ b/core/src/main/kotlin/Formats/JavaLayoutHtmlFormat.kt
@@ -6,7 +6,6 @@ import kotlinx.html.li
import kotlinx.html.stream.appendHTML
import kotlinx.html.ul
import org.jetbrains.dokka.*
-import org.jetbrains.dokka.Kotlin.KotlinDescriptorSignatureProvider
import org.jetbrains.dokka.Samples.DefaultSampleProcessingService
import org.jetbrains.dokka.Utilities.bind
import org.jetbrains.dokka.Utilities.toType
@@ -17,7 +16,7 @@ class JavaLayoutHtmlFormatDescriptor : FormatDescriptor, DefaultAnalysisComponen
override val packageDocumentationBuilderClass = KotlinPackageDocumentationBuilder::class
override val javaDocumentationBuilderClass = KotlinJavaDocumentationBuilder::class
override val sampleProcessingService = DefaultSampleProcessingService::class
- override val descriptorSignatureProvider = KotlinDescriptorSignatureProvider::class
+ override val elementSignatureProvider = KotlinElementSignatureProvider::class
override fun configureOutput(binder: Binder): Unit = with(binder) {
bind<Generator>() toType generatorServiceClass
diff --git a/core/src/main/kotlin/Generation/DokkaGenerator.kt b/core/src/main/kotlin/Generation/DokkaGenerator.kt
index 91471849..46fdaf0a 100644
--- a/core/src/main/kotlin/Generation/DokkaGenerator.kt
+++ b/core/src/main/kotlin/Generation/DokkaGenerator.kt
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.config.JVMConfigurationKeys
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer
import org.jetbrains.kotlin.resolve.TopDownAnalysisMode
+import org.jetbrains.kotlin.utils.PathUtil
import java.io.File
import kotlin.system.measureTimeMillis
diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
index 237fa9b9..6088d3a5 100644
--- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
+++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
@@ -1,6 +1,5 @@
package org.jetbrains.dokka
-import org.jetbrains.dokka.Formats.classNodeNameWithOuterClass
import org.jetbrains.dokka.LanguageService.RenderMode
/**
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt
index a89f5080..a3388031 100644
--- a/core/src/main/kotlin/Model/DocumentationNode.kt
+++ b/core/src/main/kotlin/Model/DocumentationNode.kt
@@ -1,7 +1,5 @@
package org.jetbrains.dokka
-import org.jetbrains.dokka.Formats.constantValue
-import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
import java.util.*
enum class NodeKind {
@@ -242,4 +240,9 @@ private fun DocumentationNode.isSuperclassFor(node: DocumentationNode): Boolean
NodeKind.Exception -> kind == NodeKind.Class || kind == NodeKind.Exception
else -> false
}
+}
+
+fun DocumentationNode.classNodeNameWithOuterClass(): String {
+ assert(kind in NodeKind.classLike)
+ return path.dropWhile { it.kind == NodeKind.Package || it.kind == NodeKind.Module }.joinToString(separator = ".") { it.name }
} \ No newline at end of file