aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-11-04 14:09:53 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-11-04 14:09:53 +0100
commit3655b706ea22ab9d7ee02a8d5074aa583e848018 (patch)
tree461aa43e4dc1aa31b02b0bfd4ecfeeb23351a88f /src/Kotlin/DocumentationBuilder.kt
parent21dcc4a472f88dd3ce1a1e7d8406905552896d3c (diff)
downloaddokka-3655b706ea22ab9d7ee02a8d5074aa583e848018.tar.gz
dokka-3655b706ea22ab9d7ee02a8d5074aa583e848018.tar.bz2
dokka-3655b706ea22ab9d7ee02a8d5074aa583e848018.zip
streamline setup code
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index c48f1495..31c2d3e1 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.descriptors.impl.EnumEntrySyntheticClassDescriptor
import org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheService
import org.jetbrains.kotlin.idea.caches.resolve.getModuleInfo
import org.jetbrains.kotlin.idea.kdoc.KDocFinder
-import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
import org.jetbrains.kotlin.kdoc.psi.impl.KDocSection
import org.jetbrains.kotlin.kdoc.psi.impl.KDocTag
@@ -33,7 +32,6 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
import org.jetbrains.kotlin.resolve.descriptorUtil.isDocumentedAnnotation
import org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
-import org.jetbrains.kotlin.resolve.lazy.ResolveSession
import org.jetbrains.kotlin.resolve.source.PsiSourceElement
import org.jetbrains.kotlin.resolve.source.getPsi
import org.jetbrains.kotlin.types.ErrorUtils
@@ -59,8 +57,7 @@ interface PackageDocumentationBuilder {
declarations: List<DeclarationDescriptor>)
}
-class DocumentationBuilder(val resolutionFacade: ResolutionFacade,
- val session: ResolveSession,
+class DocumentationBuilder(val resolutionFacade: DokkaResolutionFacade,
val linkResolver: DeclarationLinkResolver,
val options: DocumentationOptions,
val refGraph: NodeReferenceGraph,
@@ -134,8 +131,8 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade,
deepestDescriptor = deepestDescriptor.overriddenDescriptors.first()
}
if (DescriptorUtils.getFqName(deepestDescriptor.containingDeclaration).asString() == "kotlin.Any") {
- val anyClassDescriptors = session.getTopLevelClassDescriptors(FqName.fromSegments(listOf("kotlin", "Any")),
- NoLookupLocation.UNSORTED)
+ val anyClassDescriptors = resolutionFacade.resolveSession.getTopLevelClassDescriptors(
+ FqName.fromSegments(listOf("kotlin", "Any")), NoLookupLocation.UNSORTED)
anyClassDescriptors.forEach {
val anyMethod = it.getMemberScope(listOf()).getFunctions(descriptor.name, NoLookupLocation.UNSORTED).single()
val kdoc = KDocFinder.findKDoc(anyMethod)