From 9d33c1e59f81762293e3014012183a59fe479775 Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 26 Nov 2003 02:13:25 +0000 Subject: [PATCH] added date to output --- .../aspectj/internal/tools/build/SampleGatherer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/src/org/aspectj/internal/tools/build/SampleGatherer.java b/build/src/org/aspectj/internal/tools/build/SampleGatherer.java index 6a4017422..ea198d968 100644 --- a/build/src/org/aspectj/internal/tools/build/SampleGatherer.java +++ b/build/src/org/aspectj/internal/tools/build/SampleGatherer.java @@ -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("

Generated on "); + sink.append(DateFormat.getDateInstance().format(new Date())); + sink.append(" by SamplesGatherer"); + sink.append(EOL); sink.append("

Contents

"); sink.append(EOL); sink.append("