ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant ProjectHelper.java
Date Fri, 01 Dec 2000 07:40:46 GMT
bodewig     00/11/30 23:40:45

  Modified:    src/main/org/apache/tools/ant ProjectHelper.java
  Log:
  Finally make <taskdef>s with nested classpath elements work wherever
  they are.
  
  Revision  Changes    Path
  1.39      +10 -7     jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- ProjectHelper.java	2000/11/30 17:40:19	1.38
  +++ ProjectHelper.java	2000/12/01 07:40:44	1.39
  @@ -170,8 +170,15 @@
               }
           }
   
  +        /**
  +         * Called when this element and all elements nested into it have been
  +         * handeled.
  +         */
  +        protected void finished() {}
  +
           public void endElement(String name) throws SAXException {
   
  +            finished();
               // Let parent resume handling SAX events
               parser.setDocumentHandler(parentHandler);
           }
  @@ -291,15 +298,11 @@
           }
   
           private void handleTaskdef(String name, AttributeList attrs) throws SAXParseException
{
  -            TaskHandler childHandler = new TaskHandler(this, null);
  -            childHandler.init(name, attrs);
  -            childHandler.finished();
  +            (new TaskHandler(this, null)).init(name, attrs);
           }
   
           private void handleProperty(String name, AttributeList attrs) throws SAXParseException
{
  -            TaskHandler childHandler = new TaskHandler(this, null);
  -            childHandler.init(name, attrs);
  -            childHandler.finished();
  +            (new TaskHandler(this, null)).init(name, attrs);
           }
   
           private void handleTarget(String tag, AttributeList attrs) throws SAXParseException
{
  @@ -424,7 +427,7 @@
               }
           }
   
  -        public void finished() {
  +        protected void finished() {
               if (task != null && target == null) {
                   task.execute();
               }
  
  
  

Mime
View raw message