On 2009/11/11 21:47:25, felix8a wrote:
On 2009/11/11 21:27:10, MikeSamuel wrote:
> http://codereview.appspot.com/153054/diff/1003/5
> File src/com/google/caja/tools/AbstractCajaAntTask.java (right):
>
> http://codereview.appspot.com/153054/diff/1003/5#newcode238
> src/com/google/caja/tools/AbstractCajaAntTask.java:238: List<File>
getFiles()
{
> On 2009/11/11 21:13:57, felix8a wrote:
> >
> > this is going to put all <file>s before all <fileset>s
> > so it's going to be hard to do something like
> > <file file="header"/>
> > <fileset>...</fileset>
> > <file file="footer"/>
>
> I think
> <include file=".../header.html"/>
> <include>
> <fileset dir="...">
> <include name="*.html"/>
> <exclude name="header.html"/>
> <exclude name="footer.html"/>
> </fileset>
> </include>
> <include file=".../footer.html"/>
> should do it.
ah, ok.
> Now that I think about it, having <include> nesting with different
> meaning probably is confusing so I should probably rename <include>
to
> <input> to be symmetric with <output>.
ok.
> > I think you need to expand the fileset at the time it's declared.
>
> Ant doesn't work that way. It calls the create method to create an
object
based
> on a tag, and then fills it with recursive calls to create* methods
and set*
> methods based on inner tags and attributes respectively.
I thought you could use an addConfiguredFoo method to catch a
directive after
it's been constructed rather than before?
I did not know that. I now see that
http://ant.apache.org/manual/develop.html#nested-elements says
===========
The difference between 2 and 3 is what Ant has done to the object before
it passes it to the method. addInner will receive an object directly
after the constructor has been called, while addConfiguredInner gets the
object after the attributes and nested children for this new object have
been handled.
===========
It looks like FileSet is eligible since it has a public zero arg ctor.
Would you like me to do that?
http://codereview.appspot.com/153054