More sophisticated import setting supported: *-import when more than N names used (default set to 5)

This commit is contained in:
Valentin Kipyatkov
2015-02-18 19:43:09 +03:00
parent c58536f1d9
commit a137503ee9
29 changed files with 157 additions and 92 deletions
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.HashMap
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.sql.Date
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.HashMap
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.sql.*
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.ArrayList
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.*
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.HashSet
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.*
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.sql.Array
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.sql.*
@@ -0,0 +1,4 @@
package dependency
fun String.extFun() {}
fun String.extFun(p: Int) {}
@@ -0,0 +1,14 @@
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
package ppp
import java.util.HashMap
import java.util.ArrayList
import java.io.File
import java.io.PrintStream
import dependency.*
fun foo(c: C) {
val v = HashMap<File, ArrayList<Int>>()
"".extFun()
"".extFun(1)
}
@@ -0,0 +1,12 @@
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
package ppp
import dependency.extFun
import java.io.File
import java.util.*
fun foo(c: C) {
val v = HashMap<File, ArrayList<Int>>()
"".extFun()
"".extFun(1)
}
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.util.HashMap
@@ -1,4 +1,4 @@
// ALL_UNDER_IMPORTS: true
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
import java.io.*