Nico Seessle <[EMAIL PROTECTED]> wrote:

> How about extending the pattern of a Task to allow any task to
> become and element of a task if it allow it?

If we wanted to allow for something like this, I'd probably see it
along the lines of

public abstract class EnvelopeTask extends Task {

    //call project.createTask and do something clever with it
    public abstract Task createTask(String name);
}

and add a EnvelopeTaskHandler to ProjectHelper to support this.

This would allow people to write <if>, <switch>, <while> tasks with
all kinds of logic in them - and it still was inside a task, not
inside Ant.

I'd prefer a solution like this over extending control structures
internal to Ant, but I'm not really fond of it.

+0

is probably my best answer.

Stefan

Reply via email to