Shorten references inserts imports for global functions and properties too
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package to
|
||||
|
||||
import a.with
|
||||
import a.Outer
|
||||
import a.with
|
||||
|
||||
fun f(p1: Outer.Nested.NN, p2: Outer.Nested.NI, p3: Outer.Inner.II) {
|
||||
Outer.Nested.NN2()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package to
|
||||
|
||||
import d.g
|
||||
import d.c
|
||||
import d.ext
|
||||
import d.A
|
||||
import d.T
|
||||
import d.Outer
|
||||
import d.c
|
||||
import d.g
|
||||
import d.O1
|
||||
import d.O2
|
||||
import d.E
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package to
|
||||
|
||||
import d.g
|
||||
import d.c
|
||||
import d.ext
|
||||
import d.A
|
||||
import d.T
|
||||
import d.Outer
|
||||
import d.c
|
||||
import d.g
|
||||
import d.O1
|
||||
import d.O2
|
||||
import d.E
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package to
|
||||
|
||||
import a.f
|
||||
import a.ext
|
||||
import a.f
|
||||
|
||||
fun g() {
|
||||
f {
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package source
|
||||
|
||||
import target.A
|
||||
import target.test
|
||||
|
||||
fun test1() = target.test(A())
|
||||
fun test1() = test(A())
|
||||
+5
-3
@@ -1,10 +1,12 @@
|
||||
package c
|
||||
|
||||
import b.Test
|
||||
import b.test
|
||||
import b.TEST
|
||||
|
||||
fun bar() {
|
||||
val t: Test = Test()
|
||||
b.test()
|
||||
println(b.TEST)
|
||||
b.TEST = ""
|
||||
test()
|
||||
println(TEST)
|
||||
TEST = ""
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
class Test {
|
||||
fun foo() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package c
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package c
|
||||
|
||||
import a.*
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
class Test {
|
||||
fun foo() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
package c
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package c
|
||||
|
||||
import a.*
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
class Test {
|
||||
fun foo() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
package c
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
package c
|
||||
|
||||
import a.*
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
class Test {
|
||||
fun foo() {
|
||||
b.test()
|
||||
test()
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,8 @@
|
||||
package c
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
package c
|
||||
|
||||
import a.*
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
b.test = ""
|
||||
println(b.test)
|
||||
test = ""
|
||||
println(test)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package p
|
||||
|
||||
fun globalFun(p: Int) {}
|
||||
val globalVal: Int = 1
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
<selection>p.globalFun(p.globalVal)</selection>
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import p.globalVal
|
||||
import p.globalFun
|
||||
|
||||
fun foo() {
|
||||
globalFun(globalVal)
|
||||
}
|
||||
Reference in New Issue
Block a user