You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Tim Kettler <ti...@udo.edu> on 2005/06/27 18:14:08 UTC

How to register a customn BuildListener

Hi,

I'm writing a few extensions to Ant to integrate it in our locale build 
environment. I have written a customn DataType and on the first 
instantiation of the type I want to register a customn BuildListener. 
Therefore I have to call the 'addBuildListener()' method of the Project 
class. But when trying to obtain a reference to that class by calling 
'this.getProject()' in the constructor of my type a null reference is 
returned.

Is this a bug? If not, how can I access the Project class? Is there an 
other way to register a BuildListener at that stage?

Thanks in advance
Tim Kettler

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


Re: How to register a customn BuildListener

Posted by Jeffrey E Care <ca...@us.ibm.com>.
Maybe override the "setProject" method on your DataType extensions and 
handle the registration there?

-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis




Tim Kettler <ti...@udo.edu> 
06/27/2005 12:14 PM
Please respond to
"Ant Users List"


To
user@ant.apache.org
cc

Subject
How to register a customn BuildListener






Hi,

I'm writing a few extensions to Ant to integrate it in our locale build 
environment. I have written a customn DataType and on the first 
instantiation of the type I want to register a customn BuildListener. 
Therefore I have to call the 'addBuildListener()' method of the Project 
class. But when trying to obtain a reference to that class by calling 
'this.getProject()' in the constructor of my type a null reference is 
returned.

Is this a bug? If not, how can I access the Project class? Is there an 
other way to register a BuildListener at that stage?

Thanks in advance
Tim Kettler

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