Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse XML formatter inserts unneeded line breaks

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.

like image 672
iTake Avatar asked Mar 24 '26 00:03

iTake


1 Answers

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
like image 98
iTake Avatar answered Mar 25 '26 17:03

iTake



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!