Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何防止eclipse格式化程序删除;“对齐空间”;在块评论?_Java_Eclipse_Formatter - Fatal编程技术网

Java 如何防止eclipse格式化程序删除;“对齐空间”;在块评论?

Java 如何防止eclipse格式化程序删除;“对齐空间”;在块评论?,java,eclipse,formatter,Java,Eclipse,Formatter,我们使用的是google提供的“Java风格”的一个(略为采用)版本,只需在eclipse中导入相应的XML(从) 这很好地工作,但我们看到一个恼人的问题与块评论 我们的文件确实有一个生成的版权头,如下所示: /* some text followed by some spaces */ /* so that all lines are equally spaced */ 当使用google风格的xml时,上述内容会变成 /* some text followed by some

我们使用的是google提供的“Java风格”的一个(略为采用)版本,只需在eclipse中导入相应的XML(从)

这很好地工作,但我们看到一个恼人的问题与块评论

我们的文件确实有一个生成的版权头,如下所示:

/* 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[内置]
格式化程序格式化时,空格不会被删除

我仔细检查了google XML文件,发现了这一行:

<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" false="true"/>

但遗憾的是,将该行更改为使用
false
并不会改变任何东西


问:如何修改google风格的XML文件,使空格保留在块注释中?

Eclipse[内置]样式已关闭“启用标题注释格式”(XML中的
org.Eclipse.jdt.core.formatter.comment.format_标题值)。因此,它只保留标题注释。

正是我想要的!谢谢你的快速回归!我很高兴我能为您实现10万美元的目标做出贡献;-)