ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Main.java
Date Sun, 09 Jun 2002 08:50:52 GMT
conor       2002/06/09 01:50:52

  Modified:    src/main/org/apache/tools/ant Tag: ANT_15_BRANCH Main.java
  Log:
  Use log methods rather than System.out in Main
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.65.2.3  +14 -12    jakarta-ant/src/main/org/apache/tools/ant/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
  retrieving revision 1.65.2.2
  retrieving revision 1.65.2.3
  diff -u -w -u -r1.65.2.2 -r1.65.2.3
  --- Main.java	6 Jun 2002 06:28:34 -0000	1.65.2.2
  +++ Main.java	9 Jun 2002 08:50:52 -0000	1.65.2.3
  @@ -809,7 +809,7 @@
         */
       private static void printDescription(Project project) {
          if (project.getDescription() != null) {
  -          System.out.println(project.getDescription());
  +          project.log(project.getDescription());
          }
       }
   
  @@ -853,20 +853,21 @@
               }
           }
   
  -        printTargets(topNames, topDescriptions, "Main targets:", maxLength);
  +        printTargets(project, topNames, topDescriptions, "Main targets:",
  +                     maxLength);
           //if there were no main targets, we list all subtargets
           //as it means nothing has a description
           if(topNames.size()==0) {
               printSubTargets=true;
           }
           if (printSubTargets) {
  -            printTargets(subNames, null, "Subtargets:", 0);
  +            printTargets(project, subNames, null, "Subtargets:", 0);
           }
   
           String defaultTarget = project.getDefaultTarget();
           if (defaultTarget != null && !"".equals(defaultTarget)) {
               // shouldn't need to check but...
  -            System.out.println("Default target: " + defaultTarget);
  +            project.log("Default target: " + defaultTarget);
           }
       }
   
  @@ -908,8 +909,9 @@
        *               position so they line up (so long as the names really
        *               <i>are</i> shorter than this).
        */
  -    private static void printTargets(Vector names, Vector descriptions,
  -                                     String heading, int maxlen) {
  +    private static void printTargets(Project project,Vector names,
  +                                     Vector descriptions,String heading,
  +                                     int maxlen) {
           // now, start printing the targets and their descriptions
           String lSep = System.getProperty("line.separator");
           // got a bit annoyed that I couldn't find a pad function
  @@ -928,6 +930,6 @@
               }
               msg.append(lSep);
           }
  -        System.out.println(msg.toString());
  +        project.log(msg.toString());
       }
   }
  
  
  

--
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