KT-1426 Implement "Optimize Imports" in plugin - tests and small fix for aliases.

This commit is contained in:
Nikolay Krasko
2012-03-16 19:41:44 +04:00
parent 76cc231cb2
commit fda2bc25dc
15 changed files with 219 additions and 23 deletions
@@ -0,0 +1,15 @@
package sometest
import java.io as JavaIO
import java.text.Annotation as TextAnnotation
import java.util.ArrayList
import java.util.HashSet
class Action {
fun test(hash : HashSet<Int>) {
val some : TextAnnotation? = null
val test : ArrayList<Int>? = null
JavaIO.File(StringBuilder().append("Hello").toString())
}
}
@@ -0,0 +1,15 @@
package sometest
import java.io as JavaIO
import java.text.Annotation as TextAnnotation
import java.util.ArrayList
import java.util.HashSet
class Action {
fun test(hash : HashSet<Int>) {
val some : TextAnnotation? = null
val test : ArrayList<Int>? = null
JavaIO.File(StringBuilder().append("Hello").toString())
}
}
@@ -0,0 +1,9 @@
import java.util.HashSet
import java.util.ArrayList
import java.util.*
class Action {
fun test(hash: HashSet<Int>) {
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,7 @@
import java.util.*
class Action {
fun test(hash: HashSet<Int>) {
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,10 @@
package sometest
import java.util.HashSet
import java.util.ArrayList
class Action {
fun test(hash: HashSet<Int>) {
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,11 @@
package sometest
import java.util.ArrayList
import java.util.HashSet
class Action {
fun test(hash: HashSet<Int>) {
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,13 @@
import com.sun.corba.se.impl.util.JDKBridge
import com.sun.org.apache.xpath.internal.operations.And
import java.lang.StringBuilder
import java.net.HttpRetryException
import java.util.ArrayList
import kotlin.util.measureTimeMillis
class Action {
fun test() {
measureTimeMillis({ println("Some")})
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,9 @@
import java.util.ArrayList
import kotlin.util.measureTimeMillis
class Action {
fun test() {
measureTimeMillis({ println("Some")})
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,10 @@
import java.util.ArrayList
import java.util.ArrayList as SomeThing
import java.io as JavaIO
import java.io.*
class Action {
fun test() {
val test : ArrayList<Int>? = null
}
}
@@ -0,0 +1,9 @@
import java.io as JavaIO
import java.util.ArrayList
import java.util.ArrayList as SomeThing
class Action {
fun test() {
val test : ArrayList<Int>? = null
}
}