Formatter: support "catch on new line" and "finally on new line" options

This commit is contained in:
Pavel V. Talanov
2014-01-17 19:20:30 +04:00
parent 7dc7db04b3
commit 53d503e242
10 changed files with 88 additions and 51 deletions
@@ -0,0 +1,14 @@
fun f() {
try {
} catch (e: E) {
} finally {
}
try {
} catch (e: E) {
} finally {
}
}
// SET_TRUE: CATCH_ON_NEW_LINE
// SET_TRUE: FINALLY_ON_NEW_LINE
@@ -0,0 +1,18 @@
fun f() {
try {
}
catch (e: E) {
}
finally {
}
try {
}
catch (e: E) {
}
finally {
}
}
// SET_TRUE: CATCH_ON_NEW_LINE
// SET_TRUE: FINALLY_ON_NEW_LINE
@@ -0,0 +1,16 @@
fun f() {
try {
}
catch (e: E) {
}
finally {
}
try {
} catch (e: E) {
} finally {
}
}
// SET_TRUE: CATCH_ON_NEW_LINE
// SET_TRUE: FINALLY_ON_NEW_LINE
@@ -1,43 +1,35 @@
fun f() {
try {
}
catch (e: Exception) {
} catch (e: Exception) {
}
finally {
} finally {
}
try {
}
catch (e: Exception) {
} catch (e: Exception) {
}
finally {
} finally {
}
try {
}
catch (e: Exception) {
} catch (e: Exception) {
}
finally {
} finally {
}
try //eol comment
{
}
catch (e: Exception) //eol comment
} catch (e: Exception) //eol comment
{
}
finally //eol comment
} finally //eol comment
{
}
@@ -45,12 +37,10 @@ fun f() {
try //eol comment
{
}
catch (e: Exception) //eol comment
} catch (e: Exception) //eol comment
{
}
finally //eol comment
} finally //eol comment
{
}
@@ -3,12 +3,10 @@ fun f()
try
{
}
catch (e: Exception)
} catch (e: Exception)
{
}
finally
} finally
{
}
@@ -16,12 +14,10 @@ fun f()
try
{
}
catch (e: Exception)
} catch (e: Exception)
{
}
finally
} finally
{
}
@@ -29,12 +25,10 @@ fun f()
try
{
}
catch (e: Exception)
} catch (e: Exception)
{
}
finally
} finally
{
}
@@ -42,12 +36,10 @@ fun f()
try //eol comment
{
}
catch (e: Exception) //eol comment
} catch (e: Exception) //eol comment
{
}
finally //eol comment
} finally //eol comment
{
}
@@ -55,12 +47,10 @@ fun f()
try //eol comment
{
}
catch (e: Exception) //eol comment
} catch (e: Exception) //eol comment
{
}
finally //eol comment
} finally //eol comment
{
}