> Where we have numerous patterns for things like
> 
> addX
> createX
> addConfiguredX
> setX
> 
> we could have probably gotten away with just
> 
> addX
> setX
> 
> or even just
> 
> setX 
> 

Good idea (for Ant 2, at least).  The current distinction between attributes 
and elements on the task interface is kinda artifical.  As far as the task is 
concerned, they're all just parameters.  Maybe they get constructed from an 
attribute, maybe assembled from a nested element, maybe referenced from 
somewhere else, maybe entered at a prompt or selected in a list box - the task 
doesn't know or care.

Doing away with the distinction would give the container flexibility to do 
things like provide consistent build file shortcuts for data types that can be 
constructed from a string, and for references.

For example, both the following cases would be handled by the container; the 
<javac> task would have a single setClassPath(Path cp) method:

<javac classpath="...">

<javac>
   <classpath> ... </classpath>
</javac>

The container would also handle references, and call the same setClassPath() 
method.

<javac classpath-ref="some-path">

<javac>
    <classpath-ref id="some-path"/>
</javac>


Adam


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to