如何在Eclipse中忽略换行?

3
我仍然使用Eclipse的换行功能来格式化我的Java代码。我不希望Eclipse自动连接已经换行的行,所以我勾选了“从不连接已经换行的行”,但是当我格式化我的代码时,它仍然会连接已经换行的行。
示例:
return ((this.isVertical == aLine.isVertical) &&
        (Math.abs(this.a - aLine.a) <= EPSILON) &&
        (Math.abs(this.b - aLine.b) <= EPSILON));

格式化的代码:

return ((this.isVertical == aLine.isVertical) &&
        (Math.abs(this.a - aLine.a) <= EPSILON) && (Math.abs(this.b - aLine.b) <= EPSILON));

请告诉我如何修复它。谢谢!

你能否导出并包含你的格式化设置? - Maarten Bodewes
1个回答

3

在工作区->首选项-Java->代码风格->格式化器中,编辑配置文件并选择换行选项卡,然后选择表达式。有很多选项可供选择。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接