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/taskdefs/optional NetRexxC.java
Date Thu, 21 Sep 2000 07:42:49 GMT
bodewig     00/09/21 00:42:49

  Modified:    src/main/org/apache/tools/ant DefaultLogger.java
                        XmlLogger.java
               src/main/org/apache/tools/ant/taskdefs Copydir.java
                        Delete.java Javac.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        NetRexxC.java
  Log:
  Cosmetic changes.
  
  Revision  Changes    Path
  1.9       +6 -2      jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java
  
  Index: DefaultLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultLogger.java	2000/09/20 14:54:56	1.8
  +++ DefaultLogger.java	2000/09/21 07:42:47	1.9
  @@ -191,10 +191,14 @@
   
   
           if (minutes > 0) {
  -            return Long.toString(minutes) + " minutes " + Long.toString(seconds%60) + "
seconds";
  +            return Long.toString(minutes) + " minute"
  +                + (minutes == 1 ? " " : "s ")
  +                + Long.toString(seconds%60) + " second"
  +                + (seconds%60 == 1 ? "" : "s");
           }
           else {
  -            return Long.toString(seconds) + " seconds";
  +            return Long.toString(seconds) + " second"
  +                + (seconds%60 == 1 ? "" : "s");
           }
   
       }
  
  
  
  1.4       +3 -17     jakarta-ant/src/main/org/apache/tools/ant/XmlLogger.java
  
  Index: XmlLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/XmlLogger.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XmlLogger.java	2000/07/21 11:44:34	1.3
  +++ XmlLogger.java	2000/09/21 07:42:47	1.4
  @@ -118,7 +118,7 @@
   
       public void buildFinished(BuildEvent event) {
           long totalTime = System.currentTimeMillis() - buildStartTime;
  -        buildElement.setAttribute(TIME_ATTR, formatTime(totalTime));
  +        buildElement.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime));
   
           if (event.getException() != null) {
               buildElement.setAttribute(ERROR_ATTR, event.getException().toString());
  @@ -156,7 +156,7 @@
   
       public void targetFinished(BuildEvent event) {
           long totalTime = System.currentTimeMillis() - targetStartTime;
  -        targetElement.setAttribute(TIME_ATTR, formatTime(totalTime));
  +        targetElement.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime));
           if (taskElement == null) {
               buildElement.appendChild(targetElement);
           } else {
  @@ -192,7 +192,7 @@
   
       public void taskFinished(BuildEvent event) {
           long totalTime = System.currentTimeMillis() - taskStartTime;
  -        taskElement.setAttribute(TIME_ATTR, formatTime(totalTime));
  +        taskElement.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime));
           targetElement.appendChild(taskElement);
   
           taskElement = null;
  @@ -286,19 +286,5 @@
           out.write("</");
           out.write(element.getTagName());
           out.write(">\n");
  -    }
  -
  -    private static String formatTime(long millis) {
  -        long seconds = millis / 1000;
  -        long minutes = seconds / 60;
  -
  -
  -        if (minutes > 0) {
  -            return Long.toString(minutes) + " minutes " + Long.toString(seconds%60) + "
seconds";
  -        }
  -        else {
  -            return Long.toString(seconds) + " seconds";
  -        }
  -
       }
   }
  
  
  
  1.14      +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java
  
  Index: Copydir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Copydir.java	2000/09/18 07:54:59	1.13
  +++ Copydir.java	2000/09/21 07:42:48	1.14
  @@ -118,8 +118,9 @@
           String[] files = ds.getIncludedFiles();
           scanDir(srcDir, destDir, files);
           if (filecopyList.size() > 0) {
  -            log("Copying " + filecopyList.size() + " files to "
  -                + destDir.getAbsolutePath());
  +            log("Copying " + filecopyList.size() + " file"
  +                + (filecopyList.size() == 1 ? "" : "s")
  +                + " to " + destDir.getAbsolutePath());
               Enumeration enum = filecopyList.keys();
               while (enum.hasMoreElements()) {
                   String fromFile = (String) enum.nextElement();
  
  
  
  1.7       +3 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Delete.java	2000/07/06 16:48:14	1.6
  +++ Delete.java	2000/09/21 07:42:48	1.7
  @@ -136,7 +136,9 @@
           String[] files = ds.getIncludedFiles();
   
           if (files.length > 0) {
  -            log("Deleting " + files.length + " files from " + delDir.getAbsolutePath());
  +            log("Deleting " + files.length + " file"
  +                + (files.length == 1 ? "" : "s")
  +                + " from " + delDir.getAbsolutePath());
   
               for (int i = 0; i < files.length; i++) {
                   File f = new File(delDir, files[i]);
  
  
  
  1.43      +12 -7     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Javac.java	2000/09/20 11:56:46	1.42
  +++ Javac.java	2000/09/21 07:42:48	1.43
  @@ -84,9 +84,7 @@
    * <p>
    * When this task executes, it will recursively scan the sourcedir and
    * destdir looking for Java source files to compile. This task makes its
  - * compile decision based on timestamp. Any other file in the
  - * sourcedir will be copied to the destdir allowing support files to be
  - * located properly in the classpath.
  + * compile decision based on timestamp. 
    *
    * @author James Davidson <a href="mailto:duncan@x180.com">duncan@x180.com</a>
    * @author Robin Green <a href="mailto:greenrd@hotmail.com">greenrd@hotmail.com</a>
  @@ -325,7 +323,9 @@
   
           if (compileList.size() > 0) {
               log("Compiling " + compileList.size() + 
  -                " source files to " + destDir);
  +                " source file"
  +                + (compileList.size() == 1 ? "" : "s")
  +                + " to " + destDir);
   
               if (compiler.equalsIgnoreCase("classic")) {
                   doClassicCompile();
  @@ -372,11 +372,11 @@
                   if (!classFile.exists() || srcFile.lastModified() > classFile.lastModified())
{
                       if (!classFile.exists()) {
                           log("Compiling " + srcFile.getPath() + " because class file " 
  -                                + classFile.getPath() + " does not exist", Project.MSG_VERBOSE);
  +                                + classFile.getPath() + " does not exist", Project.MSG_DEBUG);
                       }
                       else {
                           log("Compiling " + srcFile.getPath() + " because it is out of date
with respect to " 
  -                                + classFile.getPath(), Project.MSG_VERBOSE);
  +                                + classFile.getPath(), Project.MSG_DEBUG);
                       }                                                        
                       compileList.addElement(srcFile.getAbsolutePath());
                   }
  @@ -567,7 +567,12 @@
           log("Compilation args: " + cmd.toString(),
               Project.MSG_VERBOSE);
   
  -        StringBuffer niceSourceList = new StringBuffer("Files to be compiled:");
  +        StringBuffer niceSourceList = new StringBuffer("File");
  +        if (compileList.size() != 1) {
  +            niceSourceList.append("s");
  +        }
  +        niceSourceList.append(" to be compiled:");
  +
           niceSourceList.append(lSep);
   
           Enumeration enum = compileList.elements();
  
  
  
  1.5       +6 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
  
  Index: NetRexxC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NetRexxC.java	2000/07/06 16:48:26	1.4
  +++ NetRexxC.java	2000/09/21 07:42:48	1.5
  @@ -442,7 +442,9 @@
   
           // compile the source files
           if (compileList.size() > 0) {
  -            log("Compiling " + compileList.size() + " source files to " + destDir);
  +            log("Compiling " + compileList.size() + " source file"
  +                + (compileList.size() == 1 ? "" : "s")
  +                + " to " + destDir);
               doNetRexxCompile();
           }
       }
  @@ -479,7 +481,9 @@
        */
       private void copyFilesToDestination() {
           if (filecopyList.size() > 0) {
  -            log("Copying " + filecopyList.size() + " files to " + destDir.getAbsolutePath());
  +            log("Copying " + filecopyList.size() + " file"
  +                + (filecopyList.size() == 1 ? "" : "s")
  +                + " to " + destDir.getAbsolutePath());
               Enumeration enum = filecopyList.keys();
               while (enum.hasMoreElements()) {
                   String fromFile = (String)enum.nextElement();
  
  
  

Mime
View raw message