iTake
iTake

Reputation: 4200

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.

Upvotes: 3

Views: 840

Answers (1)

iTake
iTake

Reputation: 4200

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

Upvotes: 3

Related Questions