Static members completion works in smart completion + fixed incorrect finding of java method descriptor that caused duplicated items

This commit is contained in:
Valentin Kipyatkov
2015-11-05 23:02:28 +03:00
parent 1283f5f4e1
commit 3cda866af0
23 changed files with 272 additions and 42 deletions
@@ -0,0 +1,9 @@
package dependency1
import test.C
object O1 {
fun foo(): C = C()
fun bar(): C = C()
fun x(): String = ""
}
@@ -0,0 +1,7 @@
package dependency2
import test.C
object O2 {
fun foo(): C = C()
}
@@ -0,0 +1,15 @@
import test.C
public class JavaClass1 {
public static C f() {
return new C();
}
public static C g() {
return new C();
}
public static int h() {
return 0;
}
}
@@ -0,0 +1,11 @@
import test.C
public class JavaClass2 {
public static C f() {
return new C();
}
public static C g() {
return new C();
}
}
@@ -0,0 +1,24 @@
package test
import dependency1.O1.foo
import JavaClass1.f
class C
fun foo(): C {
return <caret>
}
// INVOCATION_COUNT: 1
// EXIST: { allLookupStrings: "bar", itemText: "O1.bar", tailText: "() (dependency1)", attributes: "" }
// EXIST: { itemText: "foo", tailText: "()", attributes: "" }
// ABSENT: { itemText: "O1.foo" }
// ABSENT: { itemText: "O2.foo" }
// EXIST: { allLookupStrings: "g", itemText: "JavaClass1.g", tailText: "() (<root>)", attributes: "" }
// EXIST: { itemText: "f", tailText: "()", attributes: "" }
// ABSENT: { itemText: "JavaClass1.f" }
// ABSENT: { itemText: "JavaClass1.h" }
// ABSENT: { itemText: "JavaClass2.f" }
// ABSENT: { itemText: "JavaClass2.g" }