You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by peter reilly <pe...@corvil.com> on 2003/09/15 11:05:11 UTC

Re: cvs commit: ant/src/testcases/org/apache/tools/ant/types/sele ctors ModifiedSelectorTest.java BaseSelectorTest.java

On Sunday 14 September 2003 02:20, Dominique Devienne wrote:
> Why so many files modified? I thought that after Peter's modif to Ant Core,
> as long as a selector is typedef'd, there's no need any more to hard code
> stuff in SelectorContainer and AbstractFileSet??? Or maybe I misunderstood
> something?
>
> The old hard-coding of selectors must remain for BackCompat, but any new
> selector would just magically work, as long as it implements FileSelector,
> right?

Not quite,
A new selector would need to be typedefed in
   org/apache/tools/ant/types/defaults.properties
The problem is that the name "modified" (in this case) would
then be used up and could not be used for
example for a <modified> task, or (typedefed) condition/filter.

The solution to this namespace problem would
be to use roles.

I have (not synced up) code that adds a "role" attribute
to typedef which allows the context of the definition to
be limited to  add(Type x) and ant-type. This would have
the effect of allowing removing the hard-coding of the current selectors,
conditions, filters etc, placing the definitions in the antlib.xml for
ant.
However, I think it may be
better to wait for ant 1.7 to introduce another feature.

Peter.

>
> Maybe I'm just off base though, so please enlighten me. Thanks, --DD
>
> -----Original Message-----
> From: jhm@apache.org [mailto:jhm@apache.org]
> Sent: Saturday, September 13, 2003 11:36 AM
> To: ant-cvs@apache.org
> Subject: cvs commit: ant/src/testcases/org/apache/tools/ant/types/selectors
> ModifiedSelectorTest.java BaseSelectorTest.java
>
> jhm         2003/09/13 09:35:52
>
>   Modified:    .        WHATSNEW
>                docs/manual/CoreTypes selectors-program.html selectors.html
>                src/etc/testcases/types selectors.xml
>                src/main/org/apache/tools/ant/taskdefs Delete.java
>                         MatchingTask.java
>                src/main/org/apache/tools/ant/types AbstractFileSet.java
>                src/main/org/apache/tools/ant/types/selectors
>                         BaseSelectorContainer.java SelectorContainer.java
>                src/testcases/org/apache/tools/ant/types/selectors
>                         BaseSelectorTest.java
>
> ---------------------------------------------------------------------
> 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