Now we're getting somewhere!  :))

I'm still thinking the syntax and such is not quite ideal, but certainly
there are constraints that you need to work within to get it into the Ant1.x
API.  This is where I think the API needs refactoring, so that its the API
that supports these concepts directly, and the syntax on top is just icing.

Thanks Nicola... nice stuff.

    Erik

----- Original Message -----
From: "Nicola Ken Barozzi" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 9:56 AM
Subject: New import tag update


> I've modified the import tag to be able to override targets, and I'm
> writing the part in which it can call a "super" target, ie the version
> it's redefining.
>
> I was thinking of something like this:
>
> Suppose this target:
>
> <target name="mytarget" depends="a,b,c">...</target>
>
> in an xsl-like syntax it would be like:
>
> <target name="mytarget">
>    <dostuff1/>
>    <apply-import/>
>    <dostuff2/>
> </target>
>
> but I was thinking of reusing antcall and do:
>
> <target name="mytarget">
>    <dostuff1/>
>    <antcall target="super.mytarget"/>
>    <dostuff2/>
> </target>
>
>
> Apart from the fact that a naming rule is good or not, I had to look in
> CallTarget.java, and I find this:
>
>      public void execute() throws BuildException {
>
>          ...
>
>          callee.setDir(getProject().getBaseDir());
>          callee.setAntfile(getProject().getProperty("ant.file"));
>          callee.setTarget(subTarget);
>          callee.setInheritAll(inheritAll);
>          callee.setInheritRefs(inheritRefs);
>          callee.execute();
>      }
>
> I'm creating a new Project just to run a target?
> Why? Is it really necessary?
>
> Can't I just do
>
>   subTarget.execute();
>
> ?
>
> --
> Nicola Ken Barozzi                   [EMAIL PROTECTED]
>              - verba volant, scripta manent -
>     (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to