Implement 'Surround expression with if' surrounder

#KT-3363 Fixed
This commit is contained in:
Denis Zharkov
2016-05-24 16:34:17 +03:00
committed by Nikolay Krasko
parent f18b9cceb3
commit 09266b222b
13 changed files with 150 additions and 5 deletions
@@ -0,0 +1,3 @@
fun foo(x: Boolean, y: Boolean) {
<selection>x || y && x</selection>
}
@@ -0,0 +1,6 @@
fun foo(x: Boolean, y: Boolean) {
if (x || y && x) {
<caret>
} else {
}
}
@@ -0,0 +1,3 @@
fun foo(x: Boolean) {
<caret>x
}
@@ -0,0 +1,6 @@
fun foo(x: Boolean) {
if (x) {
<caret>
} else {
}
}
@@ -0,0 +1,3 @@
fun foo(x: Boolean, y: Boolean) {
<selection>x || y && x</selection>
}
@@ -0,0 +1,5 @@
fun foo(x: Boolean, y: Boolean) {
if (x || y && x) {
<caret>
}
}
@@ -0,0 +1,3 @@
fun foo(x: Boolean) {
<caret>x
}
@@ -0,0 +1,5 @@
fun foo(x: Boolean) {
if (x) {
<caret>
}
}