ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Implicit element for macrodef
Date Tue, 25 May 2004 12:15:49 GMT
I am looking into an implementation of implicit nested elements for
macrodef:

http://issues.apache.org/bugzilla/show_bug.cgi?id=25633
and
http://issues.apache.org/bugzilla/show_bug.cgi?id=27569

The useage is like this;

    <macrodef name="showfiles">
      <attribute name="property"/>
      <element name="files" implicit="yes"/>
      <sequential>
        <pathconvert property="@{property}" pathsep=":">
          <path>
            <files/>
          </path>
        </pathconvert>
        <echo message="${@{property}}"/>
      </sequential>
    </macrodef>
   
    <showfiles property="x">
      <fileset dir="." includes="*.xml"/>
    </showfiles>
  </target>

The implementation does however involve a small Backward Incompatible 
change to the
implementation of MacroInstance.
It would affect java code that used MacroInstance.createDynamicElement().

The implementation involves splitting DynamicConfiguator interface into 
two interfaces,
DymanicAttribute and DynamicElement.

MacroInstance then implements DynamicAttribute and TaskContainer.

The implemention is not complete yet (needs doc's and unit-tests).

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message