aboutsummaryrefslogtreecommitdiff
path: root/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-31 14:01:49 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-31 17:54:04 +0200
commit582db8d659877cd2c482d485e0ba19913dba3a6a (patch)
tree5ae22618194e11535f094a6712020054a398648a /kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis
parent292b3fbf0b86f8370f23c8e631e37b735393226d (diff)
downloaddokka-582db8d659877cd2c482d485e0ba19913dba3a6a.tar.gz
dokka-582db8d659877cd2c482d485e0ba19913dba3a6a.tar.bz2
dokka-582db8d659877cd2c482d485e0ba19913dba3a6a.zip
Re/de-shadow kotlin-compiler artifact
Diffstat (limited to 'kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis')
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt12
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt36
2 files changed, 39 insertions, 9 deletions
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
index c8b324a0..e70be408 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
@@ -285,12 +285,11 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
Platform.common -> createCommonResolverForProject(
projectContext,
module,
- library,
modulesContent,
environment
)
- Platform.js -> createJsResolverForProject(projectContext, module, library, modulesContent)
- Platform.native -> createNativeResolverForProject(projectContext, module, library, modulesContent)
+ Platform.js -> createJsResolverForProject(projectContext, module, modulesContent)
+ Platform.native -> createNativeResolverForProject(projectContext, module, modulesContent)
}
val libraryModuleDescriptor = resolverForProject.descriptorForModule(library)
@@ -355,14 +354,13 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
private fun createCommonResolverForProject(
projectContext: ProjectContext,
module: ModuleInfo,
- library: LibraryModuleInfo,
modulesContent: (ModuleInfo) -> ModuleContent<ModuleInfo>,
environment: KotlinCoreEnvironment
): ResolverForProject<ModuleInfo> {
return object : AbstractResolverForProject<ModuleInfo>(
"Dokka",
projectContext,
- modules = listOf(module, library)
+ modules = module.dependencies()
) {
override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null
@@ -394,13 +392,12 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
private fun createJsResolverForProject(
projectContext: ProjectContext,
module: ModuleInfo,
- library: LibraryModuleInfo,
modulesContent: (ModuleInfo) -> ModuleContent<ModuleInfo>
): ResolverForProject<ModuleInfo> {
return object : AbstractResolverForProject<ModuleInfo>(
"Dokka",
projectContext,
- modules = listOf(module, library)
+ modules = module.dependencies()
) {
override fun modulesContent(module: ModuleInfo): ModuleContent<ModuleInfo> = modulesContent(module)
override fun createResolverForModule(
@@ -425,7 +422,6 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
private fun createNativeResolverForProject(
projectContext: ProjectContext,
module: ModuleInfo,
- library: LibraryModuleInfo,
modulesContent: (ModuleInfo) -> ModuleContent<ModuleInfo>
): ResolverForProject<ModuleInfo> {
return object : AbstractResolverForProject<ModuleInfo>(
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt
index d0e0bb4f..346a305e 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt
@@ -1,7 +1,6 @@
package org.jetbrains.dokka.analysis
import com.intellij.openapi.Disposable
-import com.intellij.openapi.components.BaseComponent
import com.intellij.openapi.extensions.ExtensionPointName
import com.intellij.openapi.module.Module
import com.intellij.openapi.project.Project
@@ -54,6 +53,17 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
}
override fun getName(): String = "<Dokka module>"
+ override fun isLoaded(): Boolean {
+ throw UnsupportedOperationException()
+ }
+
+ override fun setOption(p0: String, p1: String?) {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getOptionValue(p0: String): String? {
+ throw UnsupportedOperationException()
+ }
override fun getModuleWithLibrariesScope(): GlobalSearchScope {
throw UnsupportedOperationException()
@@ -67,6 +77,14 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
throw UnsupportedOperationException()
}
+ override fun getModuleContentScope(): GlobalSearchScope {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getModuleContentWithDependenciesScope(): GlobalSearchScope {
+ throw UnsupportedOperationException()
+ }
+
override fun getModuleWithDependenciesAndLibrariesScope(p0: Boolean): GlobalSearchScope {
throw UnsupportedOperationException()
}
@@ -79,6 +97,10 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
throw UnsupportedOperationException()
}
+ override fun getModuleScope(p0: Boolean): GlobalSearchScope {
+ throw UnsupportedOperationException()
+ }
+
override fun getModuleRuntimeScope(p0: Boolean): GlobalSearchScope {
throw UnsupportedOperationException()
}
@@ -98,6 +120,18 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
throw UnsupportedOperationException()
}
+ override fun getModuleFile(): VirtualFile? {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getModuleFilePath(): String {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getProject(): Project {
+ throw UnsupportedOperationException()
+ }
+
override fun getPicoContainer(): PicoContainer {
throw UnsupportedOperationException()
}