Dnia 10-05-2007, czw o godzinie 16:24 +0200, Xavier Hanin napisał(a):
> On 5/10/07, Gilles Scokart <[EMAIL PROTECTED]> wrote:
> >
> > Personally I prefer the abstract doExecute and the final execute because
> > it
> > make it clear which code is executed before and after the task.  I fear
> > that
> > an event handler registered to the project will not be so clear.
> 
> 
> I agree it is more clear, but I was looking for some kind of life cycle
> already handled by Ant, and found only these events. But maybe using our own
> life cycle of execute makes more sense.
> 
> Any other opinion?
I think that You are talking about BuildListener. I don't like the idea
of controlling the reference stack with generic listeners. First - do
they control only subclasses of IvyTask ? 

I would suggest that we make a different thing:
IvyTask{
        final execute(){
                try{
                        prepareTask();
                        doExecute();
                } finally {
                        finalizeTask();
                }
        }
        public void prepareTask(){
                stackAdd
        }
        public void finalizeTask(){
                stackRemove
        }
}
                
Then it would be clear that if you want to take advantage of default Ivy
mechanisms you have to follow the 3 step task management. 

As for top against peek - I didn't thought of Stack interface - feel
free to correct that. I can modify the sources according to the above
and change top into peek.

--jw

-- 
Jaroslaw Wypychowski
Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego UW
[EMAIL PROTECTED]

Attachment: signature.asc
Description: To jest część listu podpisana cyfrowo

Reply via email to