When formatting
class Formatting {
StringBuilder m1() {
return new StringBuilder();
}
StringBuilder m2(String p1, StringBuilder p2) {
return new StringBuilder();
}
def main(args) {
println(m1().
append("a").
append("b").
append("c").
append(m2(
"x",
m1().
append("aa").
append("ab"))))
}
}
I expected something at least as what IDEA produces:
class Formatting {
StringBuilder m1() {
return new StringBuilder();
}
StringBuilder m2(String p1, StringBuilder p2) {
return new StringBuilder();
}
def main(args) {
println(m1().
append("a").
append("b").
append("c").
append(m2(
"x",
m1().
append("aa").
append("ab"))))
}
}
so the nesting of the expressions gets respected.
I develop a groovy DSL and proper indentation of the expressions is a must to avoid nesting errors.
If you provide a hint to the relevant code I may actually be able to help.
When formatting
I expected something at least as what IDEA produces:
so the nesting of the expressions gets respected.
I develop a groovy DSL and proper indentation of the expressions is a must to avoid nesting errors.
If you provide a hint to the relevant code I may actually be able to help.