ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: ant/src/etc/testcases/core/containersrc/test SpecialSeq.java
Date Sun, 06 Apr 2003 09:30:56 GMT
conor       2003/04/06 01:30:56

  Modified:    src/etc/testcases/core/containersrc/test SpecialSeq.java
  Log:
  Fix up handling of TaskContainer configuration.
  
  Revision  Changes    Path
  1.3       +12 -0     ant/src/etc/testcases/core/containersrc/test/SpecialSeq.java
  
  Index: SpecialSeq.java
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/core/containersrc/test/SpecialSeq.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -u -r1.2 -r1.3
  --- SpecialSeq.java	4 Apr 2003 14:04:43 -0000	1.2
  +++ SpecialSeq.java	6 Apr 2003 09:30:56 -0000	1.3
  @@ -57,6 +57,7 @@
   import org.apache.tools.ant.TaskContainer;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.taskdefs.Echo;
   import java.util.*;
   
   public class SpecialSeq extends Task implements TaskContainer {
  @@ -65,6 +66,8 @@
   
       private FileSet fileset;
       
  +    private Echo nestedEcho;
  +    
       /**
        * Add a nested task.
        * <p>
  @@ -79,13 +82,22 @@
        * Execute all nestedTasks.
        */
       public void execute() throws BuildException {
  +        if (fileset == null || fileset.getDir(getProject()) == null) {
  +            throw new BuildException("Fileset was not configured");
  +        }
           for (Enumeration e = nestedTasks.elements(); e.hasMoreElements();) {
               Task nestedTask = (Task) e.nextElement();
               nestedTask.perform();
           }
  +        nestedEcho.reconfigure();
  +        nestedEcho.perform();
       }
   
       public void addFileset(FileSet fileset) {
           this.fileset = fileset;
  +    }
  +    
  +    public void addNested(Echo nestedEcho) {
  +        this.nestedEcho = nestedEcho;
       }
   }
  
  
  

Mime
View raw message