ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: LoadFile task
Date Tue, 12 Feb 2002 01:24:24 GMT
From: "Steve Loughran" <steve_l@iseran.com>

> > 1) I would like to be able to filter out comment, so would it be
> acceptable
> > to add a property that sets comment line characteristics:
> >
> > <loadfile comments="#,--"/>
>
> ask the group on that one; I dont see too much objection. Maybe the attr
> should be 'lineComments' to enable someone
> else to filter out /* */, (* *) and the like, which is a much harder
> proposition.

How about using nested Filter elements instead -
the user could then decide whatever type of
filtering that needs to be done while the file
is loaded.

<loadfile srcFile="blah">
    <filter stream="my.custom.LineCommentFilterIS"/>
    <filter stream="my.custom.CTypeCOmmentFilterIS"/>
</loadfile>

>
> > 2) Could I add a property that would add a delimiter to use when the
lines
> > are joined?
>
> yup. But you have to not add two copies of the delimiter on a CRLF pair.
>
> >
> > 3) How would I use the property as a refid so that I could use it in a
> > classpath?
>
> properties arent refids
>
>     <loadfile property="loaded" srcFile="file.txt"/>
>     <classpath id="loaded.classpath">
>       <pathelement path="${loaded}"/>
>     </classpath>
>

Cheers,
Magesh



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