Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selectively turning off Eclipse formatting of XML files

There is a way to turn off Eclipse formatting(of Java code) selectively (see here).

Is there a equivalent for formatting of XML files?

like image 651
Benevolent Engineer Avatar asked Jul 21 '11 15:07

Benevolent Engineer


People also ask

How do I turn off save action in Eclipse?

You could disable you Save actions if you have any. Go to Window > Preferences and follow Java > Editor > Save actions . Then uncheck the tick for Perform the selected actions on save .


1 Answers

<token><![CDATA[..... Your line ....]]></token>

On Eclispe, I use this solution in a pom.xml

<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
    <version>1.5.3</version>
    <executions>
        <execution>
            <phase>compile</phase>
            <goals>
                <goal>replace</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
    <basedir>${basedir}</basedir>
    <unescape>true</unescape>
    <includes>
        <include>src/test/resources/steps/scenarios/xxxxxx.feature</include>
    </includes>
    <token><![CDATA[Then home page is displayed[\\s\\S]*Then go to PRODUCTION]]></token>
    <value><![CDATA[Then home page is displayed\n\n    ##patch for IC\n    Then I change CP\n    ##end patch for IC\n\n    Then go to PRODUCTION]]></value>
    </configuration>
</plugin>
like image 126
Stéphane GRILLON Avatar answered Nov 15 '22 17:11

Stéphane GRILLON