在方法调用中间没有中断的java IntLIJ思想行包装
IDEA中是否有一个选项可以阻止代码格式化程序(对于Java代码)在不适当的位置断开长行,特别是我发现它会将断行放在方法调用和开始括号之间,例如
Collection<Thing> things = Arrays.asList(Something.getThings("Foo", foo.bar()), x, y, z);
变成:
Collection<Thing> things = Arrays.asList(Something.getThings("Foo", foo.bar
()), x, y, z);
如果它恰好穿过线长度边界
我知道我可以重构这个特定的代码示例,使方法调用不内联,但作为一个更一般的问题,IDEA是否可以配置为更聪明地放置换行符?理想情况下,我宁愿将其拆分为:
Collection<Thing> things = Arrays.asList(Something.getThings("Foo",
foo.bar()), x, y, z);
共 (0) 个答案