Eclipse 3.6 (Helios) formatter messing up XML comments?

雨燕双飞 提交于 2019-12-08 06:49:30

问题


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

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

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 ============================================================================================== -->

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?


回答1:


That could very well be the result of bug 260282, which

  • prevents formatting XML comment before the root element
  • allows for comment formatting to be completely disabled and for lines to not be joined even if they don't exceed the line width limit.

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...



来源:https://stackoverflow.com/questions/4231180/eclipse-3-6-helios-formatter-messing-up-xml-comments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!