在完成编码后,我倾向于使用 Alt + Ctrl + L 重新格式化我的代码,但我不想在写语句彼此相邻。
这应该保持原样。
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar(); assert actionBar != null;
但这应该换行。
{ foo();
有选择吗?
答案 0 :(得分:1)
找到了!
Settings
Editor
Code Style
Java
Wrapping and Braces
Keep when reformatting
Multiple expressions in one line <= tick this