findDecompiledDeclaration: narrow decompiled declaration search scope

Search scope of library that descriptor originated from
Introduce API that matches binaries and its' sources via IdeaModuleInfos
This commit is contained in:
Pavel V. Talanov
2017-03-18 19:19:02 +03:00
parent 569e7ac593
commit 4c94d931fa
3 changed files with 59 additions and 26 deletions
@@ -127,7 +127,7 @@ interface ModuleInfo {
fun modulesWhoseInternalsAreVisible(): Collection<ModuleInfo> = listOf()
fun dependencyOnBuiltIns(): DependencyOnBuiltIns = DependenciesOnBuiltIns.LAST
val capabilities: Map<ModuleDescriptor.Capability<*>, Any?>
get() = emptyMap()
get() = mapOf(Capability to this)
//TODO: (module refactoring) provide dependency on builtins after runtime in IDEA
interface DependencyOnBuiltIns {
@@ -146,6 +146,10 @@ interface ModuleInfo {
}
};
}
companion object {
val Capability = ModuleDescriptor.Capability<ModuleInfo>("ModuleInfo")
}
}
abstract class AnalyzerFacade<in P : PlatformAnalysisParameters> {
@@ -271,4 +275,4 @@ interface LanguageSettingsProvider {
companion object {
fun getInstance(project: Project) = ServiceManager.getService(project, LanguageSettingsProvider::class.java) ?: Default
}
}
}