ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Custom selector how-to...
Date Tue, 09 Dec 2003 10:38:29 GMT
I know that I had done something :-)

The archive on [1] contains two graphics which could contain
some valuable infos for you.

- cacheselector-classdiagram.png
  UML-Classdiagram: 
  How are selectors pluged into filesets; interaction between tasks 
  (copy) and selectors.
  Made during development of the <modified> selector (earlier name
  cache selector)
- cacheselector-sequencediagram.png
  UML Sequence Diagram
  How are selectors initialized
  (same: made during dev of modified)


Jan

[1] http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=6671



BTW: you have used the old email adress of the list :-)



> -----Original Message-----
> From: Peter Reilly [mailto:peter.reilly@corvil.com]
> Sent: Tuesday, December 09, 2003 11:10 AM
> To: Ant Developers List
> Subject: Re: Custom selector how-to...
> 
> 
> Dominique Devienne wrote:
> 
> >I have two apparently simple question about custom selectors:
> >
> >1) How can I access the Project associated to a selector?
> >
> >   I can see no obvious way to access it, as unlike ProjectComponent
> >   deriving classes that can use getProject(), there's no such thing
> >   in BaseExtendSelector...
> >  
> >
> BaseExtendSelector extends BaseSelector extends DataType extends 
> ProjectComponent.....
> 
> >   I need to create a Path from a string for pre-Ant 1.6 
> parametrization,
> >   and also create a DirectoryScanner, which also requires a Project.
> >  
> >
> There has been issues with ant core not setting the project 
> for custom 
> selectors early
> enough to be useful. This has been fixed for ant 1.6, but 
> could be a problem
> for ant 1.5. (Actually for any object that has got a public 
> setProject(Project), ant 1.6
> will attempt to call setProject(Project) on it as soon as possible).
> 
> >2) Can selectors be id'd/refid'd like tasks/types?
> >
> >   I must write a selector with an expensive up-front config phase
> >   (remember the DirectoryScanner above?) that I want to use in
> >   several different <fileset>s, so I'd rather avoid doing 
> the expensive
> >   up-front config N times...
> >  
> >
> See:
> http://ant.apache.org/manual/CoreTypes/selectors.html#selectorselect
> 
> Peter
> 
> >Unless there are some ways I missed to do what I need as 
> described above,
> >I fear I'll have to revert to writing a task instead of a selector...
> >
> >Sounds like deficiencies of the selector mechanism to me. Or am I
> >just pushing the selector envelope too far?
> >
> >Thanks, --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
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message