Initial implementation of KT-6427 Completion to use Java name suggestion to complete function parameters

(+ filtered out synthetic Kotlin classes from completion)
This commit is contained in:
Valentin Kipyatkov
2015-06-17 17:55:51 +03:00
parent e0f1bde20a
commit 8210d3091f
31 changed files with 408 additions and 81 deletions
@@ -1,4 +0,0 @@
fun foo(i<caret>) { }
// INVOCATION_COUNT: 0
// NUMBER: 0
@@ -1,4 +0,0 @@
fun foo(@inlineOptions i<caret>) { }
// INVOCATION_COUNT: 0
// NUMBER: 0
@@ -0,0 +1,6 @@
import kotlin.properties.*
fun f(readOnlyProp<caret>)
// EXIST: { lookupString: "readOnlyProperty", itemText: "readOnlyProperty: ReadOnlyProperty", tailText: "<R, T> (kotlin.properties)" }
// NUMBER: 1
@@ -0,0 +1,6 @@
import java.io.*
fun f(printSt<caret>)
// EXIST_JAVA_ONLY: { lookupString: "printStream", itemText: "printStream: PrintStream", tailText: " (java.io)" }
// NUMBER_JAVA: 1
@@ -0,0 +1,3 @@
fun f(read<caret>)
// EXIST: { lookupString: "readOnlyProperty", itemText: "readOnlyProperty: ReadOnlyProperty", tailText: "<R, T> (kotlin.properties)" }
@@ -0,0 +1,3 @@
fun f(file<caret>)
// EXIST_JAVA_ONLY: { lookupString: "file", itemText: "file: File", tailText: " (java.io)" }
@@ -0,0 +1,11 @@
package pack
class FooBar
class Boo
fun f(b<caret>)
// EXIST: { lookupString: "bar", itemText: "bar: FooBar", tailText: " (pack)" }
// EXIST: { lookupString: "fooBar", itemText: "fooBar: FooBar", tailText: " (pack)" }
// EXIST: { lookupString: "boo", itemText: "boo: Boo", tailText: " (pack)" }