Eclipse格式化程序在空注释行中添加空格 [英] Eclipse formatter adds space in empty comment lines

查看:589
本文介绍了Eclipse格式化程序在空注释行中添加空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

eclipse代码格式化程序在每个空的Javadoc注释行中添加一个尾随空格(见截图)。

The eclipse code formatter adds a trailing space in each empty Javadoc comment line (see screenshot).

同事的格式化程序总是删除那些空格(从而产生烦人的SVN差异)。他声称使用相同的格式化设置(XML文件)。然而,我尝试了格式化程序设置页面的评论选项卡中的所有选项 - 没有成功。

The formatter of a colleague is always removing those spaces (and thus producing annoying SVN diffs). He is claiming to use the same formatter settings (XML file). Nevertheless, I tried all the options in the comments tab of the formatter settings page - without success.

它可以是eclipse版本之间的区别吗? (我使用的是基于Helios的Springsource工具套件2.7.1,我相信)

Can it be a difference between eclipse versions? (I am using Springsource Tool Suite 2.7.1, which is based on Helios, I believe)

推荐答案

转到首选项 - > Java - >编辑器 - >保存操作,然后选择格式化已编辑的行

应用更改后,Javadoc中的所有尾随空格将被删除

After applying changes all trailing whitespaces in Javadoc will be removed

注意:附加操作 - >删除所有行上的尾随空格也必须启用。

Note: "Additional actions"->"Remove trailing white space on all lines" must also be enabled.

这篇关于Eclipse格式化程序在空注释行中添加空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆