Smaller availability range for RemoveBracesIntention + refactored it and AddBracesIntention

This commit is contained in:
Valentin Kipyatkov
2015-04-14 17:59:52 +03:00
parent dc6c6f13d5
commit 1268684ced
14 changed files with 92 additions and 117 deletions
@@ -3,7 +3,7 @@ fun doSomething<T>(a: T) {}
fun foo() {
if (true) {
doSomething("test")
} <caret>else {
} else <caret>{
doSomething("test2")
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
fun doSomething<T>(a: T) {}
fun foo() {
for<caret> (i in 1..4) {
for (i in 1..4) {<caret>
doSomething("test")
}
}
@@ -1,5 +1,5 @@
fun foo(a: List<Int>) {
for<caret> (x in a) {
for (x in a) <caret>{
val y = x
}
}
@@ -1,3 +1,3 @@
fun foo(a: List<Int>) {
for<caret> (x in a) val y = x
for (x in a) <caret>val y = x
}
+2 -2
View File
@@ -1,7 +1,7 @@
fun doSomething<T>(a: T) {}
fun foo() {
<caret>if (true) {
if (true) {
doSomething("test")
}
}<caret>
}
@@ -1,7 +1,7 @@
fun doSomething<T>(a: T) {}
fun foo() {
<caret>if (true) {
if (true) <caret>{
//comment
doSomething("test")
}
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
fun foo() {
if (true) { }
if (true) <caret>{ }
}
@@ -1,7 +1,7 @@
fun doSomething<T>(a: T) {}
fun foo() {
<caret>if (true) {
if (true) {
doSomething("test");
}
<caret>}
}
@@ -5,5 +5,5 @@ fun foo() {
if (true) {
doSomething("test")
doSomething("test2")
<caret>}
<caret>}
}
@@ -5,5 +5,5 @@ fun foo() {
while (true) {
doSomething("test")
doSomething("test2")
<caret>}
<caret>}
}