Eclipse 格式化程序拆分长字符串
Eclipse formatter split long String
有没有办法告诉 Eclipse 格式化程序,当字符串太长时,它应该用 +
拆分它以适应最大行宽 自动?
例如,如果我的最大线宽是 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";
没有。这将意味着更改您的源代码,而不仅仅是白色 space.
有没有办法告诉 Eclipse 格式化程序,当字符串太长时,它应该用 +
拆分它以适应最大行宽 自动?
例如,如果我的最大线宽是 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";
没有。这将意味着更改您的源代码,而不仅仅是白色 space.