Ant Property Colours

At the moment the Ant highlighting looks a bit like this:
    <property name="war.filename" value="Peace"/>
    <property name="build.dir" value="build/${war.filename}"/>


I thought it might be clearer to highlight the property usages like constants in Java classes so you got something like this:
    <property name="war.filename" value="Peace"/>
    <property name="build.dir" value="build/${war.filename}"/>


Is that better or worse?

A larger snippet might give a better perspective.

2 comments
Comment actions Permalink

I have also noticed that the variables are not highlighted when they are in a CDATA block.
E.g. the following echo is shown like this

     <target name="appXML">

        <echo file="D:/SVN/application.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
    <display-name>${displayName}</display-name>
    <module>
        <web>
            <web-uri>${war.filename}</web-uri>
            <context-root>${contextroot}</context-root>
        </web>
    </module>
</application
>]]></echo>
         
    </target>


The target does expand the properties, so the highlighting probably should be:

     <target name="appXML">

        <echo file="D:/SVN/application.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
    <display-name>${displayName}</display-name>
    <module>
        <web>
            <web-uri>${war.filename}</web-uri>
            <context-root>${contextroot}</context-root>
        </web>
    </module>
</application
>]]></echo>
         
    </target>

0
Comment actions Permalink

Raising bugs for all my unaswered questions today :)
http://youtrack.jetbrains.net/issue/IDEA-59042

0

Please sign in to leave a comment.