ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <br...@callenish.com>
Subject Re: Selectors (was cullers)
Date Thu, 28 Feb 2002 21:30:55 GMT
At 10:59 AM 2/28/2002 -0500, Magesh Umasankar <umagesh@apache.org> wrote:
>From: "Stefan Bodewig" <bodewig@apache.org>
>
> > I agree with Bruce that placing the (de)selection actions directly
> > into <fileset> rather than nesting them into patterns looks and feels
> > more natural.
>
>Yep.  I am looking forward to his modified
>stuff with extendculler, <and>, <or>, <not>,
>etc.

I hope to be able to get something ready this on the weekend (I only have 
time to work on this stuff on weekends). Among the changes (some of which 
may not make it):

   1) Renaming all the classes (see below)
   2) References
   3) Selector containers (<and>, <or>, and <not> at least)
   4) Test <extendselect> to make sure it actually works as designed
   5) A few more selectors implemented, including <filenameselect>. This 
means users can choose not to use <include> or <exclude> at all, if they wish.
   6) ba dum, ba dum, and whatever the hell else you want to see in there

> >
> > Rob's syntax idea is intriguing.
> >
>
>Yep, I had asked Bruce to include and, or, not
>too. ( The last few lines of
>http://marc.theaimsgroup.com/?l=ant-dev&m=101468510019951&w=2 )
>Rob has nailed it with his superb syntax
>proposal.

I agree. Not only is it clean, it eliminates my objection to the term 
"Selector". Using his syntax, it is clear that we really are selecting 
things. I'll be doing a global replace on my code to reflect this.

Clarifications I think that the documentation will require are:

   a) think of <include> or <exclude> as <filenameselect/> and 
<not><filenameselect/></not> repsectively
   b) All selectors under <patternset> and <fileset> are implicitly <and>ed

together. All filesets under a task are implicitly <or>ed together. Note 
that this addresses the issue I raised last week about the forced 
combination of patterns in a fileset. If you don't want that to happen, 
just write <fileset><or>...</or></fileset>.

This raises an interesting question, though. Should Selector containers 
accept <patternset>s as elements and internally convert the <include>s and 
<exclude>s into equivalent selectors? If so, does it make sense to use 
references for individual Selector containers, or should references be 
based on <patternset>s which are collections of selectors? No harm in both, 
perhaps.

Another question is whether I should still include the "inverted" 
attribute, given the existence of <not>? Also, what is the behaviour of 
multiple selectors within a <not>, are they treated as <and>ed together or 
<or>ed?

>Bruce's argument is it is confusing (and unnecessary)
>if it does both.

Yes, no need to drop selectors in under both <include> and <exclude>. The 
reason I didn't like <selector> was that it looked like it could pick up 
files from the file system, when in fact it could only work with <include>d 
files. Using Rob's syntax, they really can select files independent of 
<include>s if that is what you want to do. So Selectors it is.



--
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