ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Seeking feedback on possible macrodef augmentation
Date Tue, 26 Sep 2006 22:02:48 GMT
Peter: as you are the father of macrodef your opinion
was one I was very interested in getting.  I'm not
sure I understood your example below.  Could you
clarify, and maybe elaborate on any ideas you have of
what we might try to make macrodef more generic (I
assume you mean so that it would just "work"
regardless of its "body" contents.  Worth mentioning
is the fact that macrodef's nested "sequential"
appears to be a convention only; an actual Sequential
object is not used; I'm thinking this is a good thing.

Thanks,
Matt

--- Peter Reilly <peter.kitt.reilly@gmail.com> wrote:

> +1,
> It would however be nicer to make macrodef
> more generic. To inject the UEs into the macro
> instance.
> 
> Like:
> <macrodef name="engine">
>    <attribute name="impl">
>    <dom>
>         <service
> type="javax.script.ScriptEngineFactory"
> provider="@{impl}"/>
>    </dom>
>  </macrodef>
> 
> <jar jarfile="x.jar">
>     <fileset dir="classes"/>
>      <engine impl="org.me.SimpleLang"/>
>  </jar>
> 
> Do not know if it is possible.
> Peter
> 
> On 9/26/06, Alexey Solofnenko <trelony@gmail.com>
> wrote:
> >
> > +1 Good idea, Matt.
> >
> > - Alexey.
> >
> > On 9/26/06, Matt Benson <gudnabrsam@yahoo.com>
> wrote:
> > >
> > > It strikes me that we don't have a utility to
> > > declaratively build custom conditions from
> others;
> > > macrodef would seem the obvious choice for,
> e.g.:
> > >
> > > <macrodef name="isEmptyFile">
> > >   <attribute name="file" />
> > >   <sequential>
> > >     <and>
> > >       <available file="@{file}" type="file" />
> > >       <length file="@{file}" length="0" />
> > >     </and>
> > >   </sequential>
> > > </macrodef>
> > >
> > > But the result amounts to a Task: executable,
> but
> > > unavailable for use where conditions would be
> > > available.
> > >
> > > Would it make sense to allow this by allowing a
> nested
> > > <condition> as an alternative to <sequential>? 
> Then
> > > cloning the MacroInstance class to
> MacroCondition
> > > implements Condition, for use when <condition>
> is
> > > specified?  Cloning the entire
> MacroDef/MacroInstance
> > > family to have an entirely new task feels a
> little
> > > extreme to me here...
> > >
> > > Alternative suggestions?
> > >
> > > TIA,
> > > Matt
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > > http://mail.yahoo.com
> > >
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> > > For additional commands, e-mail:
> dev-help@ant.apache.org
> > >
> > >
> >
> >
> > --
> > Alexey N. Solofnenko trelony at gmail.com
> > home: http://trelony.cjb.net/
> > Pleasant Hill, CA (GMT-8 hours usually)
> >
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message