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
@@ -95,3 +95,13 @@ public fun <T : Any> constant(calculator: () -> T): T {
}
private val constantMap = ConcurrentHashMap<Function0<*>, Any>()
public fun String.indexOfOrNull(char: Char, startIndex: Int = 0, ignoreCase: Boolean = false): Int? {
val index = indexOf(char, startIndex, ignoreCase)
return if (index >= 0) index else null
}
public fun String.lastIndexOfOrNull(char: Char, startIndex: Int = 0, ignoreCase: Boolean = false): Int? {
val index = lastIndexOf(char, startIndex, ignoreCase)
return if (index >= 0) index else null
}