diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-19 13:37:54 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-19 13:37:54 +0700 |
commit | f0cc6138f97014bd578c8edc6cb052409abb66a5 (patch) | |
tree | ba3891b5fde8eea8ead76dd45bfbf1be9b59285c | |
parent | 263d25ac28052dd2e7723c0275c05da8cd2e2c40 (diff) | |
download | aspectj-f0cc6138f97014bd578c8edc6cb052409abb66a5.tar.gz aspectj-f0cc6138f97014bd578c8edc6cb052409abb66a5.zip |
Strip down compiler messages to AspectJ-specific ones
Delete all properties from messages_aspectj.properties which were just
copied from Eclipse and basically the same. This not only gets rid of
duplicates but also eliminates differences found between upstream and
AspectJ strings which were just cause by errors or oversights during
manual upgrade.
TODO:
- Find a way to print the '-X' options as info instead of yielding
'abort', making it seem as if compilation failed and print the usage
message to stdErr instead of stdOut.
- Eclipse also has misc.usage.warn, not just misc.usage, i.e. usage
info specifically for warning options. Make sure that AspectJ uses
it consistently.
- Find a way to merge AspectJ-specific options into the standard
Eclipse usage text instead of completely replacing it, further
reducing the need to merge and copy upstream content.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 files changed, 27 insertions, 277 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java index 7377b99ee..c120e0293 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java @@ -21,7 +21,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; -import java.util.Locale; import java.util.StringTokenizer; import org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceLocation; @@ -276,11 +275,15 @@ public class BuildArgParser extends Main { @Override public void printVersion() { - final String version = bind("misc.version", //$NON-NLS-1$ - new String[] { bind("compiler.name"), //$NON-NLS-1$ - Version.getText() + " - Built: " + Version.getTimeText(), bind("compiler.version"), //$NON-NLS-1$ + final String version = bind( + "misc.version", //$NON-NLS-1$ + new String[] { + bind("compiler.name"), //$NON-NLS-1$ + Version.getText() + " - Built: " + Version.getTimeText(), + bind("compiler.version"), //$NON-NLS-1$ bind("compiler.copyright") //$NON-NLS-1$ - }); + } + ); System.out.println(version); } diff --git a/org.aspectj.ajdt.core/src/main/resources/org/aspectj/org/eclipse/jdt/internal/compiler/batch/messages_aspectj.properties b/org.aspectj.ajdt.core/src/main/resources/org/aspectj/org/eclipse/jdt/internal/compiler/batch/messages_aspectj.properties index 7d9219d5f..3e15c9560 100644 --- a/org.aspectj.ajdt.core/src/main/resources/org/aspectj/org/eclipse/jdt/internal/compiler/batch/messages_aspectj.properties +++ b/org.aspectj.ajdt.core/src/main/resources/org/aspectj/org/eclipse/jdt/internal/compiler/batch/messages_aspectj.properties @@ -1,161 +1,9 @@ -# -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. - -# TODO: This file contains many duplicates overwriting each other (last defined one supersedes previously defined ones, -# e.g. 'configure.source' where the shorter message wins against the longer one explaining more) and generally looks -# chaotic. Hence, duplicates should be removed and always the more desirable message chosen. Caveat: Tests might expect -# compiler messages, parsing Ajc output. So do not break them or fix them after changes. Also consider that build -# plugins for Maven, Gradle etc. and users in their own projects might parse the output too. - -### AspectJ-specific messages compiler.name = AspectJ Compiler compiler.version = Eclipse Compiler a00b62fa3572b0 (17Mar2021) - Java16 compiler.copyright = +misc.version = {0} {1} - {2} {3} -## this next one superceded by above... -## configure.version = AspectJ Compiler 1.1 - -configure.directoryNotExist = invalid option: {0} - -### compile -compile.repetition = [repetition {0}/{1}] -compile.instantTime = [compiled {0} lines in {1} ms: {2} lines/s] -compile.detailedTime = [parse: {0} ms ({1}%), resolve: {2} ms ({3}%), analyze: {4} ms ({5}%), generate: {6} ms ({7}%) ] -compile.ioTime = [i/o: read: {0} ms ({1}%), write: {2} ms ({3}%)] -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.severalProblems = {0} problems ({1}, {2}, {3}) -compile.oneError = 1 error -compile.severalErrors = {0} errors -compile.oneWarning = 1 warning -compile.severalWarnings = {0} warnings -compile.oneInfo = 1 info -compile.severalInfos = {0} info -compile.oneClassFileGenerated = [1 .class file generated] -compile.severalClassFilesGenerated = [{0} .class files generated] - -### configure -configure.requiresJDK1.2orAbove = Need to use a JVM >= 1.2 -configure.duplicateLog = duplicate log specification: {0} -configure.duplicateRepeat = duplicate repeat specification: {0} -configure.duplicateMaxProblems = duplicate max problems specification: {0} -configure.duplicateCompliance = duplicate compliance setting specification: {0} -configure.duplicateSource = duplicate source compliance setting specification: {0} -configure.duplicateTarget = duplicate target compliance setting specification: {0} -configure.unsupportedReleaseOption = option --release is supported only when run with JDK 9 or above -configure.unsupportedWithRelease = option {0} is not supported when --release is used -configure.unsupportedReleaseVersion = release version {0} is not supported -configure.source = source level should be in ''1.1''...''1.8'',''9''...''15'' (or ''5.0''..''15.0''): {0} -configure.invalidSystem = invalid location for system libraries: {0} -configure.unsupportedOption = option {0} not supported at compliance level 9 and above -configure.duplicateOutputPath = duplicate output path specification: {0} -configure.duplicateModulePath = duplicate module path specification: {0} -configure.duplicateModuleSourcepath = duplicate source module path specification: {0} -configure.invalidModuleDescriptor = cannot open the module descriptor from {0} -configure.invalidModuleOption = incorrectly formatted option: {0} -configure.duplicateExport = can specify a package in a module only once with --add-export -configure.OneOfModuleOrSourcePath = cannot specify both -source-path and --module-source-path -configure.duplicateBootClasspath = duplicate bootclasspath specification: {0} -configure.duplicateExtDirs = duplicate extdirs specification: {0} -configure.duplicateSourcepath = duplicate sourcepath specification: {0} -configure.invalidDebugOption = invalid debug option: {0} -configure.invalidWarningConfiguration = invalid warning configuration: ''{0}'' -configure.invalidWarning = invalid warning token: ''{0}''. Ignoring warning and compiling -configure.invalidWarningOption = invalid warning option: ''{0}''. Must specify a warning token -configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''15'': {0} -configure.incompatibleTargetForSource = Target level ''{0}'' is incompatible with source level ''{1}''. A target level ''{1}'' or better is required -configure.incompatibleTargetForGenericSource = Target level ''{0}'' is incompatible with source level ''{1}''. A source level ''1.5'' or better is required -configure.incompatibleComplianceForSource = Compliance level ''{0}'' is incompatible with source level ''{1}''. A compliance level ''{1}'' or better is required -configure.incompatibleComplianceForTarget = Compliance level ''{0}'' is incompatible with target level ''{1}''. A compliance level ''{1}'' or better is required -configure.repetition = repetition must be a positive integer: {0} -configure.maxProblems = max problems must be a positive integer: {0} -configure.invalidNowarnOption = invalid syntax for nowarn option: {0} -configure.unsupportedPreview = Preview of features is supported only at the latest source level - -configure.invalidErrorConfiguration = invalid error configuration: ''{0}'' -configure.invalidError = invalid error token: ''{0}''. Ignoring this error token and compiling -configure.invalidErrorOption = invalid error option: ''{0}''. Must specify an error token - -configure.invalidInfoConfiguration = invalid info configuration: ''{0}'' -configure.invalidInfo = invalid info token: ''{0}''. Ignoring this info token and compiling -configure.invalidInfoOption = invalid info option: ''{0}''. Must specify an info token -configure.notOnModuleSourcePath = ''{0}'' does not belong to a module on the module source path - -configure.directoryNotExist = directory does not exist: {0} -configure.IOError = i/o error : unable to retrieve .JAVA files in directory: {0} -configure.unrecognizedOption = Unrecognized option : {0} -configure.noClasspath = no classpath defined, using default directory instead -configure.incorrectClasspath = incorrect classpath: {0} -configure.invalidexpansionargumentname = expansion argument file {0} does not exist or cannot be read -configure.cannotOpenLog = cannot open .log file: {0} -configure.cannotOpenLogInvalidEncoding = cannot open .log file: {0}; because UTF-8 is not supported -configure.unexpectedCustomEncoding = unexpected custom encoding specification: {0}[{1}] -configure.unsupportedEncoding = unsupported encoding format: {0} -configure.duplicateDefaultEncoding = duplicate default encoding format specification: {0} -configure.invalidTaskTag ={0} is an invalid task tag -configure.incorrectExtDirsEntry = incorrect ext dir entry; {0} must be a directory -configure.incorrectEndorsedDirsEntry = incorrect endorsed dir entry; {0} must be a directory -configure.duplicateEndorsedDirs = duplicate endorseddirs specification: {0} -configure.missingDestinationPath = destination path must be provided with module source path -configure.incorrectDestinationPathEntry = incorrect destination path entry: {0} -configure.unexpectedBracket = unexpected bracket: {0} -configure.unexpectedDestinationPathEntry = unexpected destination path entry in {0} option -configure.unexpectedDestinationPathEntryFile = unexpected destination path entry for file: {0} -configure.accessRuleAfterDestinationPath = access rules cannot follow destination path entries: {0} -configure.duplicateDestinationPathEntry = duplicate destination path entry in {0} option -configure.invalidClassName = invalid class name: {0} -configure.invalidModuleName = invalid module name: {0} -configure.packageConflict = The package {0} is accessible from more than one module: {1}, {2} -configure.unavailableAPT = Unable to load annotation processing manager {0} from classpath. -configure.incorrectVMVersionforAPT = Annotation processing got disabled, since it requires a 1.6 compliant JVM -configure.incompatibleSourceForCldcTarget=Target level ''{0}'' is incompatible with source level ''{1}''. A source level ''1.3'' or lower is required -configure.incompatibleComplianceForCldcTarget=Target level ''{0}'' is incompatible with compliance level ''{1}''. A compliance level ''1.4''or lower is required -configure.invalidClasspathSection = invalid Class-Path header in manifest of jar file: {0} -configure.multipleClasspathSections = multiple Class-Path headers in manifest of jar file: {0} -configure.missingwarningspropertiesfile=properties file {0} does not exist -configure.ioexceptionwarningspropertiesfile=An IOException occurred while reading the properties file {0} -configure.multipleencodings=Multiple encoding specified: {1}. The default encoding has been set to {0} -configure.differentencodings=Found encoding {0}. Different encodings were specified: {1} -configure.differentencoding=Found encoding {0}. A different encoding was specified: {1} - -configure.invalidModuleName = invalid module name: {0} -### null annotations -configure.invalidNullAnnot = Token {0} is not in the expected format "nullAnnot(<non null annotation name> | <nullable annotation name> | <non-null by default annotation name>)" -configure.missingAnnotationPath = Missing argument to -annotationpath at ''{0}'' - -### requestor -requestor.error = {0}. ERROR in {1} -requestor.warning = {0}. WARNING in {1} -requestor.info = {0}. INFO in {1} -requestor.extraerror = {0}. ERROR: -requestor.extrawarning = {0}. WARNING: -requestor.extrainfo = {0}. INFO: -requestor.notRetrieveErrorMessage = Cannot retrieve the error message for {0} -requestor.noFileNameSpecified = (original file name is not available) - -### EMACS STYLE -output.emacs.error=error -output.emacs.warning=warning -output.emacs.info=info - -### unit -unit.more = File {0} is specified more than once -unit.missing = File {0} is missing - -### output -output.noClassFileCreated = No .class file created for file {1} in {0} because of an IOException: {2} - -### miscellaneous -misc.version = {0} {1}, {2} - -### miscellaneous misc.usage = {0}\n\ \n\ \tUsage: <options> <source file | @argfile>..\n\ @@ -375,122 +223,21 @@ Standard Eclipse compiler options:\n\ \ -v -version print compiler version\n\ \ -showversion print compiler version and continue\n +# This property only exists in AspectJ. Options not documented below (see org.aspectj.ajdt.ajc.BuildArgParser): +# -XincrementalFile, -XjavadocsInModel, -Xset:, -Xdev:NoAtAspectJProcessing, -Xdev:Pinpoint xoption.usage = {0} non-standard options:\n\ -\n\ -\t-XnoInline don't inline advice\n\ -\t-XlazyTjp create thisJoinPoint objects lazily\n\ -\t-Xreweavable create class files that can be subsequently rewoven\n\ -\t by AspectJ. Deprecated, this is now on by default.\n\ -\t-Xreweavable:compress deprecated, reweavable is now default.\n\ -\t-XnotReweavable create class files that can't be subsequently rewoven\n\ -\t by AspectJ.\n\ -\t-XserializableAspects allows aspects to implement serializable\n\ -\t-XterminateAfterCompilation compile classes then terminate before weaving\n\ -\t-XaddSerialVersionUID calculates and adds the serialVersionUID to any\n\ -\t serializable type woven by an aspect\n\ -\t-Xajruntimetarget:<level> allows code to be generated that targets\n\ -\t a 1.2 or a 1.5 level AspectJ runtime (default 1.5)\n\ -\t-XhasMember allow hasmethod() and hasfield type patterns in\n\ -\t declare parents and declare @type\n\ -\t-Xjoinpoints: supply a comma separated list of new joinpoints\n\ -\t that can be identified by pointcuts. Values are:\n\ -\t arrayconstruction, synchronization\n -## options not documented above (per ..ajdt.ajc.BuildArgParser.java): -# -XincrementalFile, -XjavadocsInModel - -############################################################################### -# Copyright (c) 2000, 2004 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -### JavaBatchCompiler messages. - -### compiler -#compiler.name = Eclipse Java Compiler -#compiler.version = 0.396 -#compiler.copyright = Copyright IBM Corp 2000, 2003. All rights reserved. - -### scanning -scanning.start = Collecting source files inside {0} - -### progress -progress.compiling = Compiling - -### compile -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.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 -configure.duplicateLog = duplicate log specification: {0} -configure.duplicateRepeat = duplicate repeat specification: {0} -configure.duplicateCompliance = duplicate compliance setting specification: {0} -configure.source = invalid source option: {0} -configure.duplicateOutputPath = duplicate output path specification: {0} -configure.duplicateBootClasspath = duplicate bootclasspath specification: {0} -configure.invalidDebugOption = invalid debug option: {0} -configure.invalidWarningConfiguration = invalid warning configuration: {0} -configure.invalidWarning = invalid warning: {0} -configure.invalidWarningOption = invalid warning option: {0} -configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''15'': {0} -configure.incompatibleTargetForSource14 = ''1.4'' source mode requires ''-target 1.4'' : {0} -configure.incompatibleComplianceForSource14 = ''1.4'' source mode requires ''-1.4'' compliance mode: {0} -configure.incompatibleComplianceForTarget14 = ''1.4'' target mode requires ''-1.4'' compliance mode: {0} -configure.incompatibleComplianceForTarget11 = ''1.1'' target mode requires ''-1.3'' compliance mode: {0} -configure.incompatibleComplianceForTarget = Compliance level ''{0}'' is incompatible with target level ''{1}''. A compliance level ''{1}'' or better is required -configure.invalidClasspathSection = invalid Class-Path header in manifest of jar file: {0} -configure.repetition = repetition must be a positive integer: {0} -configure.directoryNotExist = directory does not exist: {0} -configure.IOError = i/o error : unable to retrieve .JAVA files in directory: {0} -configure.noClasspath = no classpath defined, using default directory instead -configure.incorrectClasspath = incorrect classpath: {0} -configure.invalidexpansionargumentname = expansion argument file {0} doesn't exist or cannot be read -configure.cannotOpenLog = cannot open .log file -configure.unexpectedCustomEncoding = unexpected custom encoding specification: {0}[{1}] -configure.unsupportedEncoding = unsupported encoding format: {0} -configure.duplicateDefaultEncoding = duplicate default encoding format specification: {0} -configure.invalidTaskTag ={0} is an invalid task tag - -### requestor -requestor.error = ERROR -requestor.warning = WARNING -requestor.in = in {0} -requestor.notRetrieveErrorMessage = Cannot retrieve the error message for {0} - -### unit -unit.more = File {0} is specified more than once -unit.missing = File {0} is missing - -### output -output.noClassFileCreated = No .class file created for file named {0} because of an IOException. - -### miscellaneous -misc.version = {0} {1} - {2} {3} +\ \n\ +\ -XnoInline don't inline advice\n\ +\ -XnotReweavable create class files that can't be subsequently rewoven\n\ +\ by AspectJ.\n\ +\ -XserializableAspects allows aspects to implement serializable\n\ +\ -XterminateAfterCompilation compile classes then terminate before weaving\n\ +\ -XaddSerialVersionUID calculates and adds the serialVersionUID to any\n\ +\ serializable type woven by an aspect\n\ +\ -Xajruntimetarget:<level> allows code to be generated that targets\n\ +\ a 1.2, 1.5, 1.9 level AspectJ runtime (default 1.5)\n\ +\ -XhasMember allow hasmethod() and hasfield type patterns in\n\ +\ declare parents and declare @type\n\ +\ -Xjoinpoints: supply a comma separated list of new joinpoints\n\ +\ that can be identified by pointcuts. Values are:\n\ +\ arrayconstruction, synchronization\n diff --git a/org.aspectj.matcher/src/main/resources/org/aspectj/weaver/XlintDefault.properties b/org.aspectj.matcher/src/main/resources/org/aspectj/weaver/XlintDefault.properties index 416fc2d55..f996d040b 100644 --- a/org.aspectj.matcher/src/main/resources/org/aspectj/weaver/XlintDefault.properties +++ b/org.aspectj.matcher/src/main/resources/org/aspectj/weaver/XlintDefault.properties @@ -47,4 +47,4 @@ mustWeaveXmlDefinedAspects=warning missingAspectForReweaving=error cannotAdviseJoinpointInInterfaceWithAroundAdvice=warning -nonReweavableTypeEncountered=error
\ No newline at end of file +nonReweavableTypeEncountered=error |