ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: cvs commit: ant/docs/manual/CoreTasks macrodef.html
Date Fri, 09 Jan 2004 12:41:03 GMT
Jose Alberto Fernandez wrote:

>Peter,
>
>An additional enhacement that would be very very nice,
>is to allow having a body-element. So I can write
>something like this:
>
>  <macrodef name="x" body="y">
>    <sequential>
>      <javac ...>
>       <y/>
>      </javac>
>    </sequential>
>  </macrodef>
>
>And use it like:
>
> <x>
>  <fileset..../>
>  <classpath .../>
> </x>
>
>instead of
>
> <x>
>  <y>
>   <fileset..../>
>   <classpath .../>
>  </y>
> </x>
>
>For many macros, those that wrap some group of tasks
>for example, it looks very odd to have to have an element
>that covers all the tasks inside.
>
>How dificult would be to achieve that?
>  
>
Not too easy.
MacroInstance is a DynamicConfigurable and MacroInstance#Element is
a TaskContainer. These two interfaces cannot be implemented at the moment
by the same object, and DymanicConfigable#createDynamicElement does
not have enough information to create a proper namespaced UnknownElement
since the changes from 1.6beta3 to 1.6.0.

Peter

>Jose Alberto
>
>  
>
>>-----Original Message-----
>>From: Peter Reilly [mailto:peter.reilly@corvil.com] 
>>Sent: 08 January 2004 17:42
>>To: Ant Developers List
>>Subject: Re: cvs commit: ant/docs/manual/CoreTasks macrodef.html
>>
>>
>>description attributes are allowed on tasks and targets, so 
>>it is a logical extension to have them for the nested 
>>elements - esp for macrodef 
>>attributes/elements.
>>Peter
>>Dominique Devienne wrote:
>>
>>    
>>
>>>>From: peterreilly@apache.org [mailto:peterreilly@apache.org]
>>>> Log:
>>>> Add description attributes for elements and attributes of macrodef
>>>> PR: 24711
>>>> Obtained from: gudnabrsam at yahoo dot com and Yuji Yamano
>>>>   
>>>>
>>>>        
>>>>
>>>How about a addText(String) so that any text within the 
>>>      
>>>
>>attribute could 
>>    
>>
>>>be appended or replace the description attribute?
>>>
>>>Or allow a nested <description> element? Wait, isn't there this some 
>>>rule that any <description> element is part of the build element or 
>>>something!?!?
>>>
>>>I allows feel that XML attributes are unsuitable to hold 
>>>      
>>>
>>sometimes long 
>>    
>>
>>>text such as descriptions!
>>>
>>>--DD
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>>For additional commands, e-mail: dev-help@ant.apache.org
>>>
>>>
>>>
>>> 
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>For additional commands, e-mail: dev-help@ant.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


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


Mime
View raw message