本文介绍了Eclipse 3.6(Helios)格式化程序弄乱了XML注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的项目在XML文件中有数百条注释。其中一些只是这样的分隔符:

Our project has hundreds of comments within XML files. Some of these are just dividers like this:

<!--
    ==============================================================================================
    Entity Manager Bean
    ==============================================================================================
-->

我们广泛使用XML自动格式化程序,它始终将行分隔开,同时自动换行其他冗长的评论。现在在Helios中,我们得到以下信息:

We use the XML autoformatter extensively and it always kept lines seperated, while at the same time word wrapping other lengthy comments. Now in Helios, we get this:

<!--============================================================================================== Entity
    Manager Bean ============================================================================================== -->

除非我们取消选中首选项-> xml-> xml文件->下的新联接线功能编辑。但这意味着我们失去了换行功能。

Unless we uncheck the new "Join Lines" feature under preferences->xml->xml files->editor. But doing this means we lose the line wrapping feature.

这是向后退了一大步还是我缺少了什么?

Is this a big step backwards or am I missing something?

推荐答案

这很可能是的结果


  • 防止在根元素之前格式化XML注释

  • 允许完全禁用注释格式并即使线没有超过线宽限制也不会连接。

因此,如果不连接线是不实际的,目前所有操作都将是禁用XML注释格式,这并不理想...

So if the "not join the lines" isn't practical, all there is for now would be disabling XML comment formatting, which is not ideal...

这篇关于Eclipse 3.6(Helios)格式化程序弄乱了XML注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 10:12