Better sorting: current package is preferred

This commit is contained in:
Valentin Kipyatkov
2015-08-21 14:20:23 +03:00
parent b4e71364a3
commit 68c0c83879
3 changed files with 27 additions and 16 deletions
@@ -0,0 +1,3 @@
package test
fun fooFromSamePackage() = 12
@@ -1,12 +1,19 @@
package test
import some.fooImported
val fooVar = 12
fun fooLocal() = 12
fun fooCurentFile() = 12
val some = foo<caret>
// "foo" is before other elements because of exact prefix match
// ORDER: foo, fooVar, fooLocal, fooImported, fooNotImported
// ORDER: foo
// ORDER: fooVar
// ORDER: fooCurentFile
// ORDER: fooFromSamePackage
// ORDER: fooImported
// ORDER: fooNotImported
// INVOCATION_COUNT: 2
// SELECTED: 0