diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-16 15:24:34 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-08-21 15:53:47 +0400 |
commit | c86f6f5dac3aae2e4b26e911ad0d3b8e88c65375 (patch) | |
tree | c3d299c27acbd0ddc89e61775b1ecb21e26b6b7c /src/Analysis | |
parent | d25b896ec692aeb35a5465b624508851c96dfd1d (diff) | |
download | dokka-c86f6f5dac3aae2e4b26e911ad0d3b8e88c65375.tar.gz dokka-c86f6f5dac3aae2e4b26e911ad0d3b8e88c65375.tar.bz2 dokka-c86f6f5dac3aae2e4b26e911ad0d3b8e88c65375.zip |
Update to Kotlin API
Diffstat (limited to 'src/Analysis')
-rw-r--r-- | src/Analysis/CompilerAPI.kt | 18 |
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() = |