xml - 选择性地关闭 XML 文件的 Eclipse 格式

有一种方法可以选择性地关闭(Java 代码的)Eclipse 格式化(参见 here)。

XML 文件的格式是否有等价物?

最佳答案

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

在 Eclispe 上,我在 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>

https://stackoverflow.com/questions/6778795/

相关文章:

c# - 单元格值的条件格式

c++ - 使用 BOOST_FOREACH 时如何使 Eclipse CDT 自动缩进?

formatting - 在 Redmine wiki 页面中插入特殊字符

python - 避免在字符串中指定相同值的最pythonic方法是什么

latex - 如何在 LaTeX 中的空格后设置制表位?

javascript - Highcharts y轴千位分隔符

python - 我怎样才能产生一个很好的 numpy 矩阵输出?

android - 如何在 Android 上将持续时间格式化为具有本地化时间单位的字符串?

iphone - 时间跨度的智能格式化

c# - 为什么只有一个语句的方法需要大括号?