aboutsummaryrefslogtreecommitdiff
path: root/src/Analysis/CompilerAPI.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Analysis/CompilerAPI.kt')
-rw-r--r--src/Analysis/CompilerAPI.kt18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/Analysis/CompilerAPI.kt b/src/Analysis/CompilerAPI.kt
index b729d93f..36ccb2f9 100644
--- a/src/Analysis/CompilerAPI.kt
+++ b/src/Analysis/CompilerAPI.kt
@@ -32,13 +32,13 @@ fun JetCoreEnvironment.analyze2(messageCollector: MessageCollector): AnalyzeExha
val sourceFiles = getSourceFiles()
val support = CliLightClassGenerationSupport.getInstanceForCli(project)!!
val sharedTrace = support.getTrace()
- val sharedModule = support.getModule()
- val compilerConfiguration = getConfiguration()!!
+ val sharedModule = support.newModule()
+ val compilerConfiguration = getConfiguration()
val exhaust = AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(project, sourceFiles, sharedTrace,
Predicates.alwaysFalse<PsiFile>(),
sharedModule,
- compilerConfiguration.get(JVMConfigurationKeys.MODULE_IDS),
- compilerConfiguration.get(JVMConfigurationKeys.INCREMENTAL_CACHE_BASE_DIR))
+ null,
+ null)
return exhaust
}
@@ -52,13 +52,13 @@ fun JetCoreEnvironment.analyze(messageCollector: MessageCollector): AnalyzeExhau
analyzerWithCompilerReport.analyzeAndReport(sourceFiles) {
val support = CliLightClassGenerationSupport.getInstanceForCli(project)!!
val sharedTrace = support.getTrace()
- val sharedModule = support.getModule()
- val compilerConfiguration = getConfiguration()!!
+ val sharedModule = support.newModule()
+ val compilerConfiguration = getConfiguration()
AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(project, sourceFiles, sharedTrace,
Predicates.alwaysFalse<PsiFile>(),
sharedModule,
- compilerConfiguration.get(JVMConfigurationKeys.MODULE_IDS),
- compilerConfiguration.get(JVMConfigurationKeys.INCREMENTAL_CACHE_BASE_DIR))
+ null,
+ null)
}
val exhaust = analyzerWithCompilerReport.getAnalyzeExhaust()
@@ -67,8 +67,6 @@ fun JetCoreEnvironment.analyze(messageCollector: MessageCollector): AnalyzeExhau
return exhaust!!
}
-fun AnalyzerWithCompilerReport.analyzeAndReport(files: List<JetFile>, analyser: () -> AnalyzeExhaust) = analyzeAndReport(analyser, files)
-
fun BindingContext.getPackageFragment(file: JetFile): PackageFragmentDescriptor? = get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, file)
fun DeclarationDescriptor.isUserCode() =