ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant UnknownElement.java
Date Mon, 23 Sep 2002 11:08:03 GMT
bodewig     2002/09/23 04:08:03

  Modified:    src/main/org/apache/tools/ant Tag: ANT_15_BRANCH
                        UnknownElement.java
  Log:
  delay configuration of "unknown" TaskContainers.  Merge from HEAD.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.26.2.2  +7 -11     jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.java
  
  Index: UnknownElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.java,v
  retrieving revision 1.26.2.1
  retrieving revision 1.26.2.2
  diff -u -r1.26.2.1 -r1.26.2.2
  --- UnknownElement.java	9 Jun 2002 10:04:07 -0000	1.26.2.1
  +++ UnknownElement.java	23 Sep 2002 11:08:03 -0000	1.26.2.2
  @@ -121,7 +121,7 @@
   
           handleChildren(realThing, wrapper);
   
  -        wrapper.maybeConfigure(project);
  +        wrapper.maybeConfigure(getProject());
       }
   
       /**
  @@ -159,7 +159,7 @@
               // plain impossible to get here, maybeConfigure should
               // have thrown an exception.
               throw new BuildException("Could not create task of type: "
  -                                     + elementName, location);
  +                                     + elementName, getLocation());
           }
   
           if (realThing instanceof Task) {
  @@ -209,7 +209,7 @@
                   realChild = makeTask(child, childWrapper, false);
                   ((TaskContainer) parent).addTask((Task) realChild);
               } else {
  -                realChild = ih.createElement(project, parent, child.getTag());
  +                realChild = ih.createElement(getProject(), parent, child.getTag());
               }
   
               childWrapper.setProxy(realChild);
  @@ -218,10 +218,6 @@
               }
   
               child.handleChildren(realChild, childWrapper);
  -
  -            if (parent instanceof TaskContainer) {
  -                ((Task) realChild).maybeConfigure();
  -            }
           }
       }
   
  @@ -238,7 +234,7 @@
       protected Object makeObject(UnknownElement ue, RuntimeConfigurable w) {
           Object o = makeTask(ue, w, true);
           if (o == null) {
  -            o = project.createDataType(ue.getTag());
  +            o = getProject().createDataType(ue.getTag());
           }
           if (o == null) {
               throw getNotFoundException("task or type", ue.getTag());
  @@ -263,7 +259,7 @@
        */
       protected Task makeTask(UnknownElement ue, RuntimeConfigurable w,
                               boolean onTopLevel) {
  -        Task task = project.createTask(ue.getTag());
  +        Task task = getProject().createTask(ue.getTag());
           if (task == null && !onTopLevel) {
               throw getNotFoundException("task", ue.getTag());
           }
  @@ -271,7 +267,7 @@
           if (task != null) {
               task.setLocation(getLocation());
               // UnknownElement always has an associated target
  -            task.setOwningTarget(target);
  +            task.setOwningTarget(getOwningTarget());
               task.init();
           }
           return task;
  @@ -325,7 +321,7 @@
               + "as this is not an Ant bug.";
   
   
  -        return new BuildException(msg, location);
  +        return new BuildException(msg, getLocation());
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message