diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Analysis/CompilerAPI.kt | 18 | ||||
-rw-r--r-- | src/Model/DocumentationBuildingVisitor.kt | 4 |
2 files changed, 10 insertions, 12 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() = diff --git a/src/Model/DocumentationBuildingVisitor.kt b/src/Model/DocumentationBuildingVisitor.kt index b544b42b..6118b0f5 100644 --- a/src/Model/DocumentationBuildingVisitor.kt +++ b/src/Model/DocumentationBuildingVisitor.kt @@ -82,8 +82,8 @@ class DocumentationBuildingVisitor(val context: BindingContext, return node } - public override fun visitModuleDeclaration(descriptor: ModuleDescriptor?, data: DocumentationNode?): DocumentationNode? { - val node = createDocumentation(descriptor!!, data!!) + public override fun visitModuleDeclaration(descriptor: ModuleDescriptor, data: DocumentationNode): DocumentationNode { + val node = createDocumentation(descriptor, data) visitChild(descriptor.getPackage(FqName.ROOT), node) return node } |