在格式化代码时保持语句彼此相邻
keep statements next to each other while formatting the code
我倾向于使用 Alt+Ctrl+L 来重新格式化我的代码完成编码,但我不想在我写的语句彼此相邻的地方换行。
这应该保持原样。
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar(); assert actionBar != null;
但这应该打破界限。
{ foo();
有那个选项吗?
找到了!
Settings
Editor
Code Style
Java
Wrapping and Braces
Keep when reformatting
Multiple expressions in one line <= tick this
我倾向于使用 Alt+Ctrl+L 来重新格式化我的代码完成编码,但我不想在我写的语句彼此相邻的地方换行。
这应该保持原样。
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar(); assert actionBar != null;
但这应该打破界限。
{ foo();
有那个选项吗?
找到了!
Settings
Editor
Code Style
Java
Wrapping and Braces
Keep when reformatting
Multiple expressions in one line <= tick this