There is a way to turn off Eclipse formatting(of Java code) selectively (see here).
Is there a equivalent for formatting of XML files?
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 .
<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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With