ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Oxspring" <roxspr...@yahoo.com>
Subject RE: Selector API - Syntax Change Proposal
Date Wed, 30 Jan 2002 20:40:15 GMT


> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Wednesday, January 30, 2002 8:11 AM
> To: Ant Developers List
> Subject: Re: Selector API - Syntax Change Proposal
> 
> 
> On Mon, 28 Jan 2002 05:04, Magesh Umasankar wrote:
> > Hi,
> > The currently voted upon syntax for Selectors is:
> >
> >  <include name="**/*.java">
> >    <selector type="permission" value="r"/>
> >
> >    <!-- could optionally be directory/or some other system specific
> > features -->
> >    <selector type="type" value="file"/>
> >    <selector type="modify-time"
> >              operation="greater-than"
> >              value="29th Feb 2003"/>
> >  </include>
> >
> > The following is a slight modification of the idea that Tim Dawson
> > had provided earlier
> > (http://marc.theaimsgroup.com/?t=101167322200012&r=1&w=2)
> >
> > <include name="**/*.java">
> >     <type equals="file"/>
> >     <modtime greaterthan="28-FEB-2001" negate="true"/>
> >     <permission equals="r"/>
> >     <modifytime lessthan="28-FEB-2003"/>
> > </include>
> >
> > The FIleSelector API would have setEquals, setGreaterThan,
> > setLessThan and setNegate(boolean) methods.  No other
> > operation is necessary - hence having a separate
> > operation attribute is not needed.
> >
> > Implementing the above syntax would depend on Conor's Polymorphic
> > Types (http://marc.theaimsgroup.com/?t=100591829400008&r=1&w=2)
> > proposal making its way in.
> >
> > What do you think?
> 
> Like the syntax heaps better but don't like the Polymorphic Types 
> dependency 
> ;)

The syntax is much clearer, and long term allows for the addition of all manner of selectors
(<cvs status="..."> is the first that springs to mind).  However if there is concern
about the implementation of polymorphic types in Ant1.1, then an interim solution could be
to implement it in filesets in the same mannar as conditions are dealt with in the ConditionBase.
 Presumably by the time we get Ant2 out the door some role="selector" type should fit in perfectly.

Rob
> 
> 
> -- 
> Cheers,
> 
> Pete
> 
> ---------------------------------------------------------------
> The difference between genius, and stupidity? Genius has limits
> ---------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
> 


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Mime
View raw message