import org.aspectj.weaver.WeaverMessages;
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.batch.Main.Logger;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
public class BuildArgParser extends Main {
private static boolean LOADED_BUNDLE = false;
static {
- bundle = ResourceBundle.getBundle(BUNDLE_NAME);
+ Main.bundleName = BUNDLE_NAME;
+ ResourceBundleFactory.getBundle(Locale.getDefault());
if (!LOADED_BUNDLE) {
LOADED_BUNDLE = true;
}
}
/** @return multi-line String usage for the compiler */
- public static String getUsage() {
- return Main.bind("misc.usage",Main.bind("compiler.name"));
+ public static String getUsage() {
+ return _bind("misc.usage",new String[]{_bind("compiler.name",(String[])null)});
}
public static String getXOptionUsage() {
- return Main.bind("xoption.usage",Main.bind("compiler.name"));
+ return _bind("xoption.usage",new String[]{_bind("compiler.name",(String[])null)});
}
/**
return buildConfig;
}
-
- // from super...
public void printVersion() {
- System.err.println("AspectJ Compiler " + Version.text + " built on " + Version.time_text); //$NON-NLS-1$
- System.err.flush();
+ final String version = bind("misc.version", //$NON-NLS-1$
+ new String[] {
+ bind("compiler.name"), //$NON-NLS-1$
+ Version.text+" - Built: "+Version.time_text,
+ bind("compiler.version"), //$NON-NLS-1$
+ bind("compiler.copyright") //$NON-NLS-1$
+ }
+ );
+ System.out.println(version);
}
public void printUsage() {
unparsedArgs.add("-1.5");
// this would enable the '-source 1.5' to do the same as '-1.5' but doesnt sound quite right as
// as an option right now as it doesnt mean we support 1.5 source code - people will get confused...
+ } else if (arg.equals("-1.6")) {
+ buildConfig.setBehaveInJava5Way(true);
+ unparsedArgs.add("-1.6");
} else if (arg.equals("-source")) {
if (args.size() > nextArgIndex) {
String level = ((ConfigParser.Arg)args.get(nextArgIndex)).getValue();
- if (level.equals("1.5") || level.equals("5")) {
+ if (level.equals("1.5") || level.equals("5") ||
+ level.equals("1.6") || level.equals("6")) {
buildConfig.setBehaveInJava5Way(true);
}
unparsedArgs.add("-source");
--Xlint:ignore,error,warning will set the level for all Xlint warnings. -Xlint, alone, is an abbreviation for
+#-Xlint:ignore,error,warning will set the level for all Xlint warnings. -Xlint, alone, is an abbreviation for
-Xlint:warning.
The -Xlintfile:lint.properties allows fine-grained control. In tools.jar, see
org/aspectj/weaver/XlintDefault.properties for the default behavior and a template to copy.
### AspectJ-specific messages
-compiler.name = AspectJ Compiler
+compiler.name = AspectJ Compiler 1.6.0
+compiler.version = Eclipse Compiler 0.785_R33x, 3.3
+compiler.copyright =
## this next one superceded by above...
## configure.version = AspectJ Compiler 1.1
\ -1.3 use 1.3 compliance level (implicit -source 1.3 -target 1.1)\n\
\ -1.4 + use 1.4 compliance level\n\
\ -1.5 use 1.5 compliance level\n\
-\ -source <version> set source level (1.3, 1.4 or 1.5)\n\
+\ -1.6 use 1.6 compliance level\n\
+\ -source <version> set source level (1.3, 1.4, 1.5 or 1.6)\n\
\ -target <version> set classfile target (1.1 to 1.4)\n\
\ \n\
\ Warning options:\n\
progress.compiling = Compiling
### compile
-compile.repetition = Repetition {0}/{1}
-compile.instantTime = Compiled {0} lines in {1} ms ({2} lines/s)
-compile.totalTime = Total compilation time: {0}
-compile.oneProblem = 1 problem
-compile.severalProblems = {0} problems
+compile.repetition = [repetition {0}/{1}]
+compile.instantTime = [compiled {0} lines in {1} ms: {2} lines/s]
+compile.averageTime = [average, excluding min-max {0} lines in {1} ms: {2} lines/s]
+compile.totalTime = [total compilation time: {0}]
+compile.oneProblem = 1 problem ({0})
+compile.severalProblemsErrorsOrWarnings = {0} problems ({1})
+compile.severalProblemsErrorsAndWarnings = {0} problems ({1}, {2})
compile.oneError = 1 error
compile.severalErrors = {0} errors
compile.oneWarning = 1 warning
compile.severalWarnings = {0} warnings
-compile.oneClassFileGenerated = 1 .class file generated
-compile.severalClassFilesGenerated = {0} .class files generated
+compile.oneClassFileGenerated = [1 .class file generated]
+compile.severalClassFilesGenerated = [{0} .class files generated]
+
+#compile.repetition = Repetition {0}/{1}
+#compile.instantTime = Compiled {0} lines in {1} ms ({2} lines/s)
+#compile.totalTime = Total compilation time: {0}
+#compile.oneProblem = 1 problem
+#compile.severalProblems = {0} problems
+#compile.oneError = 1 error
+#compile.severalErrors = {0} errors
+#compile.oneWarning = 1 warning
+#compile.severalWarnings = {0} warnings
+#compile.oneClassFileGenerated = 1 .class file generated
+#compile.severalClassFilesGenerated = {0} .class files generated
### configure
configure.requiresJDK1.2orAbove = Need to use a JVM >= 1.2
output.noClassFileCreated = No .class file created for file named {0} because of an IOException.
### miscellaneous
-misc.version = {compiler.name}
+misc.version = {0} ({1}) - {2} {3}