FIR IDE: Add simple shortening for qualified calls and properties

This commit is contained in:
Roman Golyshev
2020-12-25 12:19:35 +03:00
committed by Space
parent f03ca5ea57
commit 534f4a66ad
20 changed files with 288 additions and 12 deletions
+6
View File
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test
class A
fun usage(a: <selection>test.A</selection>) {}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test
class A
fun usage(a: A) {}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
fun foo() {}
fun usage() {
<selection>test.foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
fun foo() {}
fun usage() {
foo()
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test.test2
fun foo() {}
fun usage() {
<selection>test.test2.foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test.test2
fun foo() {}
fun usage() {
foo()
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test.test2
val foo = 1
fun usage() {
<selection>test.test2.foo.toString()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test.test2
val foo = 1
fun usage() {
foo.toString()
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
val foo = 1
fun usage() {
<selection>test.foo</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
val foo = 1
fun usage() {
foo
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test.test2
val foo = 1
fun usage() {
<selection>test.test2.foo</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test.test2
val foo = 1
fun usage() {
foo
}
+8
View File
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
fun test() {}
fun usage() {
<selection>_root_ide_package_.test.test()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
fun test() {}
fun usage() {
test()
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
fun test() {}
fun usage() {
fun test() {}
<selection>_root_ide_package_.test.test()</selection>
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
fun test() {}
fun usage() {
fun test() {}
test.test()
}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test.test1
fun foo() {
<selection>test.test1.foo()</selection>
}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test.test1
fun foo() {
foo()
}