问题
Eclipse Version: Indigo Service Release 2
I can't get my XML formatter to do the job right.
When I apply formatter to this
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
i get this
<execution>
<id>
compile
</id>
<phase>
compile
</phase>
<goals>
<goal>
compile
</goal>
</goals>
</execution>
I want it to format like this:
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
I tried different options in XML -> XML Files -> Editor
but none seems to work.
Thank you.
回答1:
The problem was in Android Editor, that was the default XML editor for me.
Two options to resolve this issue:
- Use Eclipse XML editor
Open With -> XML Editor
- Disable "Standard Android XML style" in
Android -> Editors
来源:https://stackoverflow.com/questions/12106037/eclipse-xml-formatter-inserts-unneeded-line-breaks