Implement intentions to add/remove braces to/from when entries #KT-12043 Fixed

This commit is contained in:
Kirill
2016-08-15 00:20:34 +03:00
committed by Mikhail Glukhikh
parent d68a681db5
commit 223fd9fad0
21 changed files with 239 additions and 0 deletions
@@ -0,0 +1,5 @@
when (a) {
1 -> <spot>{
b()
}</spot>
}
@@ -0,0 +1,3 @@
when (a) {
1 -> b()
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention adds braces to 'when' entries without braces.
</body>
</html>
@@ -0,0 +1,3 @@
when (a) {
1 -> <spot>b()</spot>
}
@@ -0,0 +1,5 @@
when (a) {
1 -> {
b()
}
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention removes braces from 'when' entries with only a single expression.
</body>
</html>