aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-06-01 21:42:34 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-06-04 15:25:24 +0300
commitdcd84d619665864b275591c93248f4637f6ee636 (patch)
tree6509e72e76e27d1ecad0b2498d5b82c2c733829b /core/src/main/kotlin
parent3a0421740a0ef90f32093a1e2f2d3e59279f0014 (diff)
downloaddokka-dcd84d619665864b275591c93248f4637f6ee636.tar.gz
dokka-dcd84d619665864b275591c93248f4637f6ee636.tar.bz2
dokka-dcd84d619665864b275591c93248f4637f6ee636.zip
Update bundled kotlin compiler to 1.2.60-dev-157
(cherry picked from commit efbcbd5)
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/Analysis/AnalysisEnvironment.kt64
1 files changed, 34 insertions, 30 deletions
diff --git a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
index 5522d4f0..b2e4b490 100644
--- a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
+++ b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt
@@ -131,32 +131,36 @@ class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable {
}
val resolverForProject = ResolverForProjectImpl(
- "Dokka",
- projectContext,
- listOf(library, module),
- { JvmAnalyzerFacade },
- {
- when (it) {
- library -> ModuleContent(emptyList(), GlobalSearchScope.notScope(sourcesScope))
- module -> ModuleContent(sourceFiles, sourcesScope)
- else -> throw IllegalArgumentException("Unexpected module info")
- }
- },
- JvmPlatformParameters {
- val file = (it as JavaClassImpl).psi.containingFile.virtualFile
- if (file in sourcesScope)
- module
- else
- library
- },
- CompilerEnvironment,
- packagePartProviderFactory = { info, content ->
- JvmPackagePartProvider(configuration.languageVersionSettings, content.moduleContentScope).apply {
- addRoots(javaRoots)
- }
- },
- builtIns = builtIns,
- modulePlatforms = { JvmPlatform.multiTargetPlatform }
+ "Dokka",
+ projectContext,
+ listOf(library, module),
+ {
+ when (it) {
+ library -> ModuleContent(it, emptyList(), GlobalSearchScope.notScope(sourcesScope))
+ module -> ModuleContent(it, emptyList(), sourcesScope)
+ else -> throw IllegalArgumentException("Unexpected module info")
+ }
+ },
+ {
+ JvmPlatform.multiTargetPlatform
+ },
+ LanguageSettingsProvider.Default /* TODO: Fix this */,
+ { JvmAnalyzerFacade },
+
+ JvmPlatformParameters {
+ val file = (it as JavaClassImpl).psi.containingFile.virtualFile
+ if (file in sourcesScope)
+ module
+ else
+ library
+ },
+ CompilerEnvironment,
+ packagePartProviderFactory = { content ->
+ JvmPackagePartProvider(configuration.languageVersionSettings, content.moduleContentScope).apply {
+ addRoots(javaRoots)
+ }
+ },
+ builtIns = builtIns
)
resolverForProject.resolverForModule(library) // Required before module to initialize library properly
@@ -241,6 +245,10 @@ fun contentRootFromPath(path: String): ContentRoot {
class DokkaResolutionFacade(override val project: Project,
override val moduleDescriptor: ModuleDescriptor,
val resolverForModule: ResolverForModule) : ResolutionFacade {
+ override fun analyzeWithAllCompilerChecks(elements: Collection<KtElement>): AnalysisResult {
+ throw UnsupportedOperationException()
+ }
+
override fun <T : Any> tryGetFrontendService(element: PsiElement, serviceClass: Class<T>): T? {
return null
}
@@ -295,10 +303,6 @@ class DokkaResolutionFacade(override val project: Project,
throw UnsupportedOperationException()
}
- override fun analyzeFullyAndGetResult(elements: Collection<KtElement>): AnalysisResult {
- throw UnsupportedOperationException()
- }
-
override fun <T : Any> getFrontendService(element: PsiElement, serviceClass: Class<T>): T {
throw UnsupportedOperationException()
}