问题
我希望带有右大括号/括号/括号的行与带有匹配的左大括号/括号/括号的行具有完全相同的缩进。
经过一番搜索,我猜我的需求很奇特,但也许我只是错过了一些东西。是否可以将 Eclipse 自动格式化程序配置为以这种方式运行?(我花了几个小时来切换复选框,但到目前为止还不能让它表现得这样。)
例子
换句话说,我会用 Eclipse 来格式化:
public String concatenate(String a,
String b) {
...
}
这样:
public String concatenate(
String a, String b
) {
...
}
// The same, but with some extra comments:
public String concatenate( // the line with "(" has no indent
String a, String b
) { // so, the line with the matching ")" also should not
...
} // same goes for {} and []