]> source.dussan.org Git - aspectj.git/commitdiff
added date to output
authorwisberg <wisberg>
Wed, 26 Nov 2003 02:13:25 +0000 (02:13 +0000)
committerwisberg <wisberg>
Wed, 26 Nov 2003 02:13:25 +0000 (02:13 +0000)
build/src/org/aspectj/internal/tools/build/SampleGatherer.java

index 6a4017422a44cb8c178bcae8b14d36ae0e674832..ea198d968dc6c6c5c0cfda9f3456ec44abda094e 100644 (file)
@@ -20,6 +20,7 @@
 package org.aspectj.internal.tools.build;
 
 import java.io.*;
+import java.text.DateFormat;
 import java.util.*;
 
 /**
@@ -69,6 +70,11 @@ public class SampleGatherer {
      * @throws IOException if unable to read a source file
      */
     public static void main(String[] args) throws IOException {
+        if ((null == args) || (0 == args.length)) {
+            String cname = SampleGatherer.class.getName();
+            System.err.println("java " + cname + " [dir|file]");
+            return;
+        }
         Samples result = new Samples();
         for (int i = 0; i < args.length; i++) {
             result = gather(new File(args[i]), result);
@@ -651,6 +657,10 @@ class HTMLSamplesRenderer extends SamplesRenderer {
         sink.append(EOL);
         sink.append(COPYRIGHT);
         sink.append(EOL);
+        sink.append("<p><small>Generated on ");
+        sink.append(DateFormat.getDateInstance().format(new Date()));
+        sink.append(" by SamplesGatherer</small>");
+        sink.append(EOL);
         sink.append("    <h2>Contents</h2>");
         sink.append(EOL);
         sink.append("    <ul>");