package org.aspectj.ajdt.ajc;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.StringTokenizer;
-import org.aspectj.ajdt.internal.core.builder.*;
-import org.aspectj.bridge.*;
-import org.aspectj.util.*;
-import org.aspectj.weaver.Constants;
-import org.aspectj.weaver.Dump;
-import org.aspectj.weaver.WeaverMessages;
+import org.aspectj.ajdt.internal.core.builder.AjBuildConfig;
+import org.aspectj.bridge.CountingMessageHandler;
+import org.aspectj.bridge.IMessage;
+import org.aspectj.bridge.IMessageHandler;
+import org.aspectj.bridge.ISourceLocation;
+import org.aspectj.bridge.Message;
+import org.aspectj.bridge.MessageUtil;
+import org.aspectj.bridge.SourceLocation;
+import org.aspectj.bridge.Version;
import org.aspectj.org.eclipse.jdt.core.compiler.InvalidInputException;
import org.aspectj.org.eclipse.jdt.internal.compiler.batch.Main;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.aspectj.util.ConfigParser;
+import org.aspectj.util.FileUtil;
+import org.aspectj.util.LangUtil;
+import org.aspectj.weaver.Constants;
+import org.aspectj.weaver.Dump;
+import org.aspectj.weaver.WeaverMessages;
public class BuildArgParser extends Main {
} else {
showError("-Xajruntimetarget:<level> only supports a target level of 1.2 or 1.5");
}
+ } else if (arg.equals("-timers")) {
+ // swallow - it is dealt with in Main.runMain()
} else if (arg.equals("-1.5")) {
buildConfig.setBehaveInJava5Way(true);
unparsedArgs.add("-1.5");
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
-import java.util.List;
import java.util.Date;
+import java.util.List;
import org.aspectj.ajdt.internal.core.builder.AjBuildManager;
import org.aspectj.bridge.AbortException;
// Urk - default no check for AJDT, enabled here for Ant, command-line
AjBuildManager.enableRuntimeVersionCheck(this);
final boolean verbose = flagInArgs("-verbose", args);
+ final boolean timers = flagInArgs("-timers", args);
if (null == this.clientHolder) {
this.clientHolder = checkForCustomMessageHolder(args);
}
// try {Thread.sleep(5000); }catch(Exception e) {}
run(args, holder);
long etime = System.currentTimeMillis();
+ if (timers) {
+ System.out.println("Compiler took "+(etime-stime)+"ms");
+ }
holder.handleMessage(MessageUtil.info("Compiler took "+(etime-stime)+"ms"));
// uncomment next line to pause at end (keeps jconsole alive!)
// try { System.in.read(); } catch (Exception e) {}