ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject RE: DataType life cycle
Date Mon, 26 Mar 2007 13:38:52 GMT
I have also found an other approach: use a task that looks like a type.  I
add an id attribute, and the execute method of the task can do the
validation, have a location, can add the properties he want to add, and just
have to add himself as a reference into the project.


By the way, when you class extends Task, is there a difference to declare it
in the antlib xml as a task or as datatype ?

Gilles


> -----Original Message-----
> From: Steve Loughran [mailto:stevel@apache.org]
> Sent: lundi 26 mars 2007 14:37
> To: Ant Users List
> Subject: Re: DataType life cycle
> 
> Gilles Scokart wrote:
> > What is the life cycle of a datatype?
> >
> > More precisely, I'm writting a dataype and I would like:
> >
> > 1. To be able to validate its attribute and content as soon as
> > possible (and if possible report the Location of the error)
> > 2. To launch some process to modify the Project as soon as the
> > datatype is defined (actually, I want to add some properties in it).
> >
> > Currently, I validate the content only when the datatype is used by a
> > task (and I can't report the location).  And I have overwritten the
> > setProject for the second point.
> >
> > Is it the best aproach?
> >
> > Thanks,
> >
> 
> This is something we were discussing on dev@ant last week. Right now
> there is no lifecycle; no methods called after configuration is complete
> yet before first use.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message