Extract platform-independent default imports to TargetPlatform.Default.defaultImports

This is needed because SourceNavigationHelper uses default platform and it
needs default imports to be able to resolve references (otherwise
NavigateToLibrarySourceTestGenerated breaks)
This commit is contained in:
Alexander Udalov
2016-10-21 10:39:35 +03:00
parent 9ec781e859
commit 56e2173b3c
11 changed files with 56 additions and 58 deletions
@@ -27,15 +27,11 @@ import java.util.*
object JvmPlatform : TargetPlatform("JVM") {
override val defaultImports: List<ImportPath> = ArrayList<ImportPath>().apply {
addAll(Default.defaultImports)
add(ImportPath("java.lang.*"))
add(ImportPath("kotlin.*"))
add(ImportPath("kotlin.annotation.*"))
add(ImportPath("kotlin.jvm.*"))
add(ImportPath("kotlin.collections.*"))
add(ImportPath("kotlin.coroutines.*"))
add(ImportPath("kotlin.ranges.*"))
add(ImportPath("kotlin.sequences.*"))
add(ImportPath("kotlin.text.*"))
add(ImportPath("kotlin.io.*"))
fun addAllClassifiersFromScope(scope: MemberScope) {