如何设置 IntelliJ IDEA 以防止在自动重新格式化 (CTRL+ALT+L) 期间将在一行上声明的匿名类拆分为多行?
例如,为了防止 split
x = foo(new Boo() {});
分为两行:
x = foo(new Boo() {
});
最佳答案
"File" [menu]/"Settings"/"Code Style"/"Alignment and Braces":
==> "Keep when Reformatting" Field Set:
Check: "Simple methods in one line"
Check: "Simple blocks in one line"
关于intellij-idea - 单行匿名类的 IntelliJ IDEA 包装设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3364757/