有没有办法告诉Eclipse格式化程序,当String太长时,它应该用+
拆分以适应最大线宽自动?
例如,如果我的最大线宽为80,我会这样:
String s = "This is a very very very very very very very very very very very very very very very very very very very long String";
成为这样的东西:
String s = "This is a very very very very very very very very very very very"
+ " very very very very very very very very long String";
答案 0 :(得分:1)
No. This would mean changing your source code, not just white space.