From eadb73c9f8a22234e25d73a206371ec50a0c3e15 Mon Sep 17 00:00:00 2001 From: Jack Zhou Date: Wed, 1 May 2013 17:34:20 -0400 Subject: [PATCH] Create from usage: Using UnsupportedOperationException for the file template instead. --- idea/resources/fileTemplates/code/New Kotlin Method Body.kt.ft | 2 +- .../createFromUsage/component/afterCreateComponentFromUsage1.kt | 2 +- .../createFromUsage/component/afterCreateComponentFromUsage2.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage1.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage10.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage11.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage12.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage13.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage2.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage3.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage4.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage5.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage6.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage7.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage8.kt | 2 +- .../quickfix/createFromUsage/get/afterCreateGetFromUsage9.kt | 2 +- .../createFromUsage/hasNext/afterCreateHasNextFromUsage1.kt | 2 +- .../createFromUsage/hasNext/afterCreateHasNextFromUsage2.kt | 2 +- .../createFromUsage/iterator/afterCreateIteratorFromUsage1.kt | 2 +- .../createFromUsage/iterator/afterCreateIteratorFromUsage2.kt | 2 +- .../quickfix/createFromUsage/next/afterCreateNextFromUsage1.kt | 2 +- .../quickfix/createFromUsage/next/afterCreateNextFromUsage2.kt | 2 +- .../quickfix/createFromUsage/set/afterCreateSetFromUsage1.kt | 2 +- .../quickfix/createFromUsage/set/afterCreateSetFromUsage2.kt | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/idea/resources/fileTemplates/code/New Kotlin Method Body.kt.ft b/idea/resources/fileTemplates/code/New Kotlin Method Body.kt.ft index 69d16fa46b5..e5364a5698f 100644 --- a/idea/resources/fileTemplates/code/New Kotlin Method Body.kt.ft +++ b/idea/resources/fileTemplates/code/New Kotlin Method Body.kt.ft @@ -1 +1 @@ -throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. \ No newline at end of file +throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage1.kt b/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage1.kt index 4a730095803..07f9a9c89cc 100644 --- a/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage1.kt +++ b/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage1.kt @@ -3,7 +3,7 @@ class Foo { fun component1(): Int { return 0 } fun component2(): Int { return 0 } fun component3(): Any { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } fun foo() { diff --git a/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage2.kt b/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage2.kt index 4e30704925d..a0b58ed7311 100644 --- a/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage2.kt +++ b/idea/testData/quickfix/createFromUsage/component/afterCreateComponentFromUsage2.kt @@ -3,7 +3,7 @@ class Foo { fun component1(): Int { return 0 } fun component2(): Int { return 0 } fun component3(): String { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } fun foo() { diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage1.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage1.kt index 8cf409481af..2743d727be0 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage1.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage1.kt @@ -4,6 +4,6 @@ class Foo { val z: Iterable = y[""] } fun get(s: String): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage10.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage10.kt index f16da937ee3..dca15cbc5c5 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage10.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage10.kt @@ -4,6 +4,6 @@ class Foo { val z: Iterable = y["", w] } fun get(s: String, w: T): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage11.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage11.kt index 8686065e93f..0427e0f0ff2 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage11.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage11.kt @@ -1,7 +1,7 @@ // "Create method 'get' from usage" "true" class Foo { fun get(s: String, w: T): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } fun x (y: Foo>, w: java.util.ArrayList) { diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage12.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage12.kt index d3d25c27abc..cdcba5fb1ff 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage12.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage12.kt @@ -1,7 +1,7 @@ // "Create method 'get' from usage" "true" class Foo { fun get(s: String, w: T): Any { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } fun x (y: Foo>, w: java.util.ArrayList) { diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage13.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage13.kt index f23bb7f2fd2..025bce56aa3 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage13.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage13.kt @@ -8,6 +8,6 @@ class Foo { bar(z) } fun get(s: String, w: ArrayList): String { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage2.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage2.kt index dffa092c6ed..6a383097550 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage2.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage2.kt @@ -3,5 +3,5 @@ fun x (y: Any) { val z: Any = y[""] } fun Any.get(s: String): Any { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage3.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage3.kt index 04315facefd..932974dafdb 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage3.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage3.kt @@ -4,6 +4,6 @@ class Foo { val z: Iterable = y[""] } fun get(s: String): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage4.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage4.kt index a95fd697bc5..896f28e678e 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage4.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage4.kt @@ -4,6 +4,6 @@ class Foo> { val z: U = y[""] } fun get(s: String): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage5.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage5.kt index 09289a73dc1..c3870922212 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage5.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage5.kt @@ -4,6 +4,6 @@ class Foo { val z: Iterable = y["", w] } fun get(s: String, w: Iterable): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage6.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage6.kt index dc50306d47b..5302f028434 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage6.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage6.kt @@ -7,5 +7,5 @@ class Foo { } } fun ArrayList.get(s: String, w: ArrayList): Boolean { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage7.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage7.kt index b32be62c6c1..6f52661137a 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage7.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage7.kt @@ -6,6 +6,6 @@ class Foo { val z: Iterable = y["", w] } fun get(s: String, w: ArrayList): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage8.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage8.kt index caa960c3eae..0c87aa0374d 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage8.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage8.kt @@ -6,6 +6,6 @@ class Foo { val z: Iterable = y["", w] } fun get(s: String, w: T): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage9.kt b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage9.kt index 8cf0aea7d04..ed68a3b30d8 100644 --- a/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage9.kt +++ b/idea/testData/quickfix/createFromUsage/get/afterCreateGetFromUsage9.kt @@ -6,6 +6,6 @@ class Foo { val z: Iterable = y["", w] } fun get(s: String, w: S): S { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage1.kt b/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage1.kt index 32d44370b25..f88d808c6e3 100644 --- a/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage1.kt +++ b/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage1.kt @@ -4,7 +4,7 @@ class FooIterator { throw Exception("not implemented") } fun hasNext(): Boolean { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } class Foo { diff --git a/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage2.kt b/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage2.kt index 4a6fc9ef0d5..d9e4dff154f 100644 --- a/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage2.kt +++ b/idea/testData/quickfix/createFromUsage/hasNext/afterCreateHasNextFromUsage2.kt @@ -4,7 +4,7 @@ class FooIterator { throw Exception("not implemented") } fun hasNext(): Boolean { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } class Foo { diff --git a/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage1.kt b/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage1.kt index a405af8df81..c3392c5e2ef 100644 --- a/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage1.kt +++ b/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage1.kt @@ -1,7 +1,7 @@ // "Create method 'iterator' from usage" "true" class Foo { fun iterator(): Iterator { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } fun foo() { diff --git a/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage2.kt b/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage2.kt index a5d765d5791..48e3b81e83f 100644 --- a/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage2.kt +++ b/idea/testData/quickfix/createFromUsage/iterator/afterCreateIteratorFromUsage2.kt @@ -1,7 +1,7 @@ // "Create method 'iterator' from usage" "true" class Foo { fun iterator(): Iterator { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } fun foo() { diff --git a/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage1.kt b/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage1.kt index 91cd86a1e88..84973737408 100644 --- a/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage1.kt +++ b/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage1.kt @@ -2,7 +2,7 @@ class FooIterator { fun hasNext(): Boolean { return false } fun next(): Int { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } class Foo { diff --git a/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage2.kt b/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage2.kt index f16aa88f96d..65fd4e50922 100644 --- a/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage2.kt +++ b/idea/testData/quickfix/createFromUsage/next/afterCreateNextFromUsage2.kt @@ -2,7 +2,7 @@ class FooIterator { fun hasNext(): Boolean { return false } fun next(): T { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } class Foo { diff --git a/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage1.kt b/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage1.kt index 234cb8f6c77..24563965899 100644 --- a/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage1.kt +++ b/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage1.kt @@ -4,6 +4,6 @@ class Foo { y["", w] = w } fun set(s: String, w: T, value: T) { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } } diff --git a/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage2.kt b/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage2.kt index 1fe75ddfe34..9312ab89375 100644 --- a/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage2.kt +++ b/idea/testData/quickfix/createFromUsage/set/afterCreateSetFromUsage2.kt @@ -7,5 +7,5 @@ class Foo { } } fun Any.set(s: String, w: ArrayList, value: ArrayList) { - throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates. } \ No newline at end of file