From: aclement Date: Wed, 16 Jan 2008 23:46:33 +0000 (+0000) Subject: AspectJ6: usage text and options processing updated to cope with 1.6 X-Git-Tag: V1_6_0M1~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=53e5bb5938412a4c6488b59a2b129ec354678329;p=aspectj.git AspectJ6: usage text and options processing updated to cope with 1.6 --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java index 9db0feb3d..4591a0b7f 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java @@ -25,6 +25,7 @@ import org.aspectj.weaver.Dump; 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 { @@ -33,7 +34,8 @@ 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; } @@ -49,12 +51,12 @@ public class BuildArgParser extends Main { } /** @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)}); } /** @@ -230,11 +232,16 @@ public class BuildArgParser extends Main { 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() { @@ -658,10 +665,14 @@ public class BuildArgParser extends Main { 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"); diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties index bc63c5440..588a4a8c8 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties @@ -1,10 +1,12 @@ --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 @@ -59,7 +61,8 @@ Standard Eclipse compiler options:\n\ \ -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 set source level (1.3, 1.4 or 1.5)\n\ +\ -1.6 use 1.6 compliance level\n\ +\ -source set source level (1.3, 1.4, 1.5 or 1.6)\n\ \ -target set classfile target (1.1 to 1.4)\n\ \ \n\ \ Warning options:\n\ @@ -168,17 +171,31 @@ scanning.start = Collecting source files inside {0} 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 @@ -223,4 +240,4 @@ unit.missing = File {0} is missing 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}