如何防止 Eclipse 格式化程序在块注释中删除 "alignment spaces"?
How to prevent eclipse formatter from removing "alignment spaces" in block comments?
我们正在使用来自 google 的 "Java style" 的(略微采用的)版本,只需在 eclipse(来自 here)中导入相应的 XML。
效果很好,但我们发现块注释存在一个恼人的问题。
我们的文件确实有生成的版权 header,看起来像:
/* some text followed by some spaces */
/* so that all lines are equally spaced */
当使用google样式xml时,上面变成
/* some text followed by some spaces */
/* so that all lines are equally spaced */
使用 Eclipse [built-in]
格式化程序格式化时,不会删除空格!
仔细查看了googleXML文件,运行进入这一行:
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" false="true"/>
但是,遗憾的是,将该行更改为使用 false
并没有改变任何东西。
问:如何修改 google 风格的 XML 文件,使空格保留在块注释中?
Eclipse [built-in] 样式已 'Enable header comment formatting' 关闭(XML 中的 org.eclipse.jdt.core.formatter.comment.format_header
值)。所以它单独留下 header 评论。
我们正在使用来自 google 的 "Java style" 的(略微采用的)版本,只需在 eclipse(来自 here)中导入相应的 XML。
效果很好,但我们发现块注释存在一个恼人的问题。
我们的文件确实有生成的版权 header,看起来像:
/* some text followed by some spaces */
/* so that all lines are equally spaced */
当使用google样式xml时,上面变成
/* some text followed by some spaces */
/* so that all lines are equally spaced */
使用 Eclipse [built-in]
格式化程序格式化时,不会删除空格!
仔细查看了googleXML文件,运行进入这一行:
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" false="true"/>
但是,遗憾的是,将该行更改为使用 false
并没有改变任何东西。
问:如何修改 google 风格的 XML 文件,使空格保留在块注释中?
Eclipse [built-in] 样式已 'Enable header comment formatting' 关闭(XML 中的 org.eclipse.jdt.core.formatter.comment.format_header
值)。所以它单独留下 header 评论。