Allow to shorten class member references

This commit is contained in:
Alexey Sedunov
2014-02-11 20:16:20 +04:00
parent f244cb05eb
commit d2e6aa2aa5
34 changed files with 259 additions and 15 deletions
@@ -0,0 +1,7 @@
class A {
static class B {
static void foo() {
}
}
}
@@ -0,0 +1,5 @@
import A.*
fun bar() {
<selection>A.B.foo()</selection>
}
@@ -0,0 +1,5 @@
import A.*
fun bar() {
B.foo()
}
@@ -0,0 +1,7 @@
class A {
public class B {
public B(String s) {
}
}
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
<selection>val t: A.B = A().B(s)</selection>
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
val t: A.B = A().B(s)
}
@@ -0,0 +1,7 @@
class A {
public class B {
public B(String s) {
}
}
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
<selection>val t: A.B = A().B(s)</selection>
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
val t: B = A().B(s)
}
@@ -0,0 +1,7 @@
class A {
public static class B {
public B(String s) {
}
}
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
<selection>val t: A.B = A.B(s)</selection>
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
val t: A.B = A.B(s)
}
@@ -0,0 +1,7 @@
class A {
public static class B {
public B(String s) {
}
}
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
<selection>val t: A.B = A.B(s)</selection>
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
val t: B = B(s)
}
@@ -0,0 +1,3 @@
class A {
public static int X = 10;
}
@@ -0,0 +1,3 @@
fun bar() {
<selection>A.X = 100</selection>
}
@@ -0,0 +1,3 @@
fun bar() {
A.X = 100
}
@@ -0,0 +1,3 @@
class A {
public static int X = 10;
}
@@ -0,0 +1,5 @@
import A.*
fun bar() {
<selection>A.X = 100</selection>
}
@@ -0,0 +1,5 @@
import A.*
fun bar() {
X = 100
}
@@ -0,0 +1,5 @@
class A {
public static void foo(String s) {
}
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
<selection>A.foo(s)</selection>
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
A.foo(s)
}
@@ -0,0 +1,5 @@
class A {
public static void foo(String s) {
}
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
<selection>A.foo(s)</selection>
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
foo(s)
}
@@ -0,0 +1 @@
class A : <selection>java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock</selection>
@@ -0,0 +1,3 @@
import java.util.concurrent.locks.ReentrantReadWriteLock
class A : ReentrantReadWriteLock.WriteLock
@@ -0,0 +1,9 @@
package test
open class A {
}
class B: <selection>test.A()</selection> {
}
@@ -0,0 +1,9 @@
package test
open class A {
}
class B: A() {
}