【发布时间】:2014-09-14 22:10:27
【问题描述】:
可以配置(或扩展)Java 的 Eclipse 格式化程序和/或代码清理以在函数/方法调用的右括号之前添加新行吗?到目前为止,我设法将代码格式化如下:
// some code here
foo.aVeryLongMethodNameWhichCausesLineWraps(
param1,
param2);
// and some other code here
但我想要的是以下内容:
// some code here
foo.aVeryLongMethodNameWhichCausesLineWraps(
param1,
param2
);
// and some other code here
对于嵌套调用,它应该如下所示:
// some code here
foo.bar(
nested(
param1,
param2
)
);
// and some other code here
这可能吗?如果没有,是否有机会扩展格式化程序以提供此类功能?
【问题讨论】:
-
近距离投票的评论者:这个问题是主题,因为“关于通用计算硬件和软件的问题对于 Stack Overflow 来说是题外话除非它们直接涉及主要用于编程的工具。" 这显然是这种情况。
标签: java eclipse code-formatting