Rewritten KDoc-link resolve and completion to work more reasonably

This commit is contained in:
Valentin Kipyatkov
2017-08-08 09:57:47 +03:00
parent 998814b1a1
commit e52c3b4c81
19 changed files with 333 additions and 143 deletions
@@ -0,0 +1,8 @@
import kotlin.text.capitalize as xxx
/**
* [String.x<caret>]
*/
fun foo(){}
// EXIST: { lookupString: "xxx", itemText: "xxx" }
@@ -0,0 +1,7 @@
/**
* [kotlin.<caret>]
*/
fun foo(){}
// EXIST: io
// EXIST: Int
+16 -3
View File
@@ -1,6 +1,10 @@
package a
class B {
interface I
class A : I
class B : I {
/**
* [a.B.<caret>]
*/
@@ -10,11 +14,20 @@ class B {
}
fun B.ext() {
}
val B.extVal: String
get() = ""
fun A.wrongExt(){}
val A.wrongExtVal: String
get() = ""
fun I.extForSuper(){}
// EXIST: ext
// EXIST: extVal
// EXIST: extVal
// ABSENT: wrongExt
// ABSENT: wrongExtVal
// EXIST: extForSuper
+8 -8
View File
@@ -1,19 +1,19 @@
package z
/**
* [<caret>]
* [a<caret>]
*/
fun f(xyzzy: String) {
fun az(ap: String) {
}
fun bar() {
fun aaa() {
}
class Z
class aZ
// EXIST: z
// EXIST: Z
// EXIST: xyzzy
// EXIST: bar
// EXIST: az
// EXIST: aZ
// EXIST: ap
// EXIST: aaa
+5 -4
View File
@@ -1,8 +1,8 @@
class Foo {
/**
* [<caret>]
* [b<caret>]
*/
fun xyzzy() {
fun baz() {
}
@@ -11,8 +11,9 @@ class Foo {
}
}
fun Foo.quux() {
fun Foo.boo() {
}
// EXIST: bar
// EXIST: quux
// EXIST: baz
// EXIST: boo
@@ -0,0 +1,10 @@
class Foo
fun Foo.ext() = ""
/**
* [Foo.ext.<caret>]
*/
fun test() {}
// NOTHING_ELSE
@@ -0,0 +1,9 @@
class Foo
/**
* [Foo.<caret>]
*/
fun test() {}
// ABSENT: test