KT-13298 Suggest names for overridden properties / functions in completion

#KT-13298 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-08-15 19:17:33 +03:00
parent 7ebf001d25
commit 7f07890f6a
20 changed files with 319 additions and 33 deletions
@@ -0,0 +1,9 @@
interface I {
fun foo(p: Int)
}
class A : I {
override fun f<caret>
}
// ELEMENT_TEXT: "override fun foo(p: Int) {...}"
@@ -0,0 +1,11 @@
interface I {
fun foo(p: Int)
}
class A : I {
override fun foo(p: Int) {
<caret><selection>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
}
}
// ELEMENT_TEXT: "override fun foo(p: Int) {...}"
@@ -0,0 +1,6 @@
class A {
@Deprecated("") // it is deprecated
public override fun e<caret>
}
// ELEMENT_TEXT: "override operator fun equals(other: Any?): Boolean {...}"
@@ -0,0 +1,8 @@
class A {
@Deprecated("") // it is deprecated
public override fun equals(other: Any?): Boolean {
<caret><selection>return super.equals(other)</selection>
}
}
// ELEMENT_TEXT: "override operator fun equals(other: Any?): Boolean {...}"
@@ -0,0 +1,9 @@
interface I {
val someVal: String?
}
class A : I {
override val <caret>
}
// ELEMENT_TEXT: "override val someVal: String?"
@@ -0,0 +1,10 @@
interface I {
val someVal: String?
}
class A : I {
override val someVal: String?
get() = <caret><selection>throw UnsupportedOperationException()</selection>
}
// ELEMENT_TEXT: "override val someVal: String?"
@@ -0,0 +1,8 @@
interface I {
val someVal: java.io.File?
}
class A(override val s<caret>) : I {
}
// ELEMENT_TEXT: "override val someVal: File?"
@@ -0,0 +1,10 @@
import java.io.File
interface I {
val someVal: java.io.File?
}
class A(override val someVal: File?<caret>) : I {
}
// ELEMENT_TEXT: "override val someVal: File?"
@@ -4,7 +4,7 @@ interface I {
class A : I {
override fun foo(p: Int) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
<caret><selection>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
}
}