Override/Implement: Use function body template when generating functions with default body

#KT-11807 Fixed
This commit is contained in:
Alexey Sedunov
2016-04-18 16:33:17 +03:00
parent df07554764
commit 1635018fe7
60 changed files with 165 additions and 116 deletions
@@ -4,7 +4,7 @@ interface I {
class A : I {
override fun foo(p: Int) {
<caret><selection>throw UnsupportedOperationException()</selection>
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,7 +1,7 @@
fun<T> f(){
JavaClass<T>(object: Comparator<T> {
override fun compare(var1: T, var2: T): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
})
}
@@ -1,6 +1,6 @@
var r : Runnable = object: Runnable {
override fun run() {
<caret><selection>throw UnsupportedOperationException()</selection>
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -2,7 +2,7 @@ import java.io.Closeable
val c: java.io.Closeable = object: Closeable {
override fun close() {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -3,7 +3,7 @@ fun registerHandler(handler: Handler<out Message>) {}
fun test() {
registerHandler(object: Handler<Message> {
override fun handle(e: Message) {
<caret><selection>throw UnsupportedOperationException()</selection>
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
})
}