AA: drop ProjectStructureProvider#getKtBinaryModules
Instead, provide an option to register PSI declaration provider inside Analysis API session builder where we can retrieve all necessary pieces, including CoreJarFileSystem, PackagePartProvider, and binary modules from internal project structure provider.
This commit is contained in:
committed by
Ilya Kirillov
parent
2a864b3685
commit
1b79ee89ba
+1
-6
@@ -7,11 +7,10 @@ package org.jetbrains.kotlin.analysis.api.standalone.base.project.structure
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.analysis.project.structure.*
|
||||
import org.jetbrains.kotlin.platform.TargetPlatform
|
||||
import org.jetbrains.kotlin.psi.psiUtil.contains
|
||||
|
||||
class KtStaticModuleProvider(
|
||||
private val projectStructure: KtModuleProjectStructure,
|
||||
val projectStructure: KtModuleProjectStructure,
|
||||
) : ProjectStructureProvider() {
|
||||
override fun getKtModuleForKtElement(element: PsiElement): KtModule {
|
||||
return projectStructure.mainModules
|
||||
@@ -19,8 +18,4 @@ class KtStaticModuleProvider(
|
||||
module.ktModule.contentScope.contains(element)
|
||||
}.ktModule
|
||||
}
|
||||
|
||||
override fun getKtBinaryModules(): Collection<KtBinaryModule> {
|
||||
return projectStructure.allKtModules().filterIsInstance<KtBinaryModule>()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user