aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-25 13:56:01 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-25 13:56:01 +0100
commit74fa763533b0d7db3344ed1add945e72c3a462bc (patch)
treefc8479157aed26bcf0c4c845197e5cb0764b03d7 /core/src/main/kotlin
parentdecb439ec77d53b317dc14ba2e07dc4cd9b188db (diff)
downloaddokka-74fa763533b0d7db3344ed1add945e72c3a462bc.tar.gz
dokka-74fa763533b0d7db3344ed1add945e72c3a462bc.tar.bz2
dokka-74fa763533b0d7db3344ed1add945e72c3a462bc.zip
update Dokka to internal RC: remove usages of kotlin.test
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/Analysis/AnalysisEnvironment.kt5
-rw-r--r--core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt6
-rw-r--r--core/src/main/kotlin/Kotlin/ContentBuilder.kt2
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt6
4 files changed, 11 insertions, 8 deletions
diff --git a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
index 82a2eb2a..f315ba99 100644
--- a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
+++ b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.analyzer.AnalysisResult
import org.jetbrains.kotlin.analyzer.ModuleContent
import org.jetbrains.kotlin.analyzer.ModuleInfo
import org.jetbrains.kotlin.analyzer.ResolverForModule
+import org.jetbrains.kotlin.caches.resolve.KotlinCacheService
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
@@ -28,7 +29,7 @@ import org.jetbrains.kotlin.container.getService
import org.jetbrains.kotlin.context.ProjectContext
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
-import org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheService
+import org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheServiceImpl
import org.jetbrains.kotlin.idea.caches.resolve.KotlinOutOfBlockCompletionModificationTracker
import org.jetbrains.kotlin.idea.caches.resolve.LibraryModificationTracker
import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
@@ -83,7 +84,7 @@ class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable {
projectComponentManager.registerService(LibraryModificationTracker::class.java,
LibraryModificationTracker(environment.project))
projectComponentManager.registerService(KotlinCacheService::class.java,
- KotlinCacheService(environment.project))
+ KotlinCacheServiceImpl(environment.project))
projectComponentManager.registerService(KotlinOutOfBlockCompletionModificationTracker::class.java,
KotlinOutOfBlockCompletionModificationTracker())
return environment
diff --git a/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt b/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt
index a1362fde..b01fe746 100644
--- a/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt
+++ b/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt
@@ -30,7 +30,7 @@ import java.io.File
* Workaround for the lack of ability to create a ProjectFileIndex implementation using only
* classes from projectModel-{api,impl}.
*/
-class CoreProjectFileIndex(val project: Project, contentRoots: List<ContentRoot>) : ProjectFileIndex, ModuleFileIndex {
+class CoreProjectFileIndex(private val project: Project, contentRoots: List<ContentRoot>) : ProjectFileIndex, ModuleFileIndex {
val sourceRoots = contentRoots.filter { it !is JvmClasspathRoot }
val classpathRoots = contentRoots.filterIsInstance<JvmClasspathRoot>()
@@ -77,7 +77,7 @@ class CoreProjectFileIndex(val project: Project, contentRoots: List<ContentRoot>
throw UnsupportedOperationException()
}
- override fun getProject(): Project = project
+ override fun getProject(): Project = this@CoreProjectFileIndex.project
override fun getModuleContentWithDependenciesScope(): GlobalSearchScope {
throw UnsupportedOperationException()
@@ -349,7 +349,7 @@ class CoreProjectFileIndex(val project: Project, contentRoots: List<ContentRoot>
throw UnsupportedOperationException()
}
- override fun getModule(): Module = module
+ override fun getModule(): Module = this@CoreProjectFileIndex.module
override fun isSdkInherited(): Boolean {
throw UnsupportedOperationException()
diff --git a/core/src/main/kotlin/Kotlin/ContentBuilder.kt b/core/src/main/kotlin/Kotlin/ContentBuilder.kt
index ea07acbc..496c886b 100644
--- a/core/src/main/kotlin/Kotlin/ContentBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/ContentBuilder.kt
@@ -79,7 +79,7 @@ fun buildContentTo(tree: MarkdownNode, target: ContentBlock, linkResolver: (Stri
}
}
- MarkdownTokenTypes.CODE -> {
+ MarkdownTokenTypes.CODE_LINE -> {
val block = ContentBlockCode()
block.append(ContentText(node.text))
parent.append(block)
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 1b4dafd4..937b8f17 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -5,11 +5,12 @@ import com.intellij.openapi.util.text.StringUtil
import com.intellij.psi.PsiJavaFile
import org.jetbrains.dokka.Kotlin.DescriptorDocumentationParser
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
+import org.jetbrains.kotlin.caches.resolve.KotlinCacheService
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.descriptors.annotations.Annotated
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
import org.jetbrains.kotlin.descriptors.impl.EnumEntrySyntheticClassDescriptor
-import org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheService
+import org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheServiceImpl
import org.jetbrains.kotlin.idea.caches.resolve.getModuleInfo
import org.jetbrains.kotlin.idea.kdoc.KDocFinder
import org.jetbrains.kotlin.kdoc.psi.impl.KDocSection
@@ -654,7 +655,8 @@ class KotlinJavaDocumentationBuilder
val packageNode = module.findOrCreatePackageNode(file.packageName, packageContent)
file.classes.forEach {
- val javaDescriptorResolver = KotlinCacheService.getInstance(file.project).getProjectService(JvmPlatform,
+ val kotlinCacheService = KotlinCacheService.getInstance(file.project) as KotlinCacheServiceImpl
+ val javaDescriptorResolver = kotlinCacheService.getProjectService(JvmPlatform,
it.getModuleInfo(), JavaDescriptorResolver::class.java)
val descriptor = javaDescriptorResolver.resolveClass(JavaClassImpl(it))