Skip to content

Commit

Permalink
Eclipse 4.20 (RC1) JDT Patch for Groovy-Eclipse: JDT commit 1787e34
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed May 29, 2021
1 parent 0060908 commit ac06026
Show file tree
Hide file tree
Showing 17 changed files with 384 additions and 294 deletions.
2 changes: 1 addition & 1 deletion groovy-eclipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
<repository
url="https://download.eclipse.org/releases/2021-06"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.20-I-builds/I20210519-1800"/>
url="https://download.eclipse.org/eclipse/updates/4.20-I-builds/I20210526-2310"/>
</repositoryList>
<repositoryList
name="2021-03">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</license>

<requires>
<import feature="org.eclipse.jdt" version="3.18.800.v20210519-1800" patch="true"/>
<import feature="org.eclipse.jdt" version="3.18.800.v20210526-2310" patch="true"/>
</requires>

<plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public void test012(){
" --processor-module-path <directories separated by " + File.pathSeparator + ">\n" +
" specify module path where annotation processors\n" +
" can be found\n" +
" --system <jdk> Override location of system modules\n" +
" --system <jdk> Override location of system modules\n" +
" --add-exports <module>/<package>=<other-module>(,<other-module>)*\n" +
" specify additional package exports clauses to the\n" +
" given modules\n" +
Expand All @@ -656,8 +656,7 @@ public void test012(){
" resolved to be root modules\n" +
" --limit-modules <module>(,<module>)*\n" +
" specify the observable module names\n" +
" --release <release>\n" +
" compile for a specific VM version\n" +
" --release <release> compile for a specific VM version\n" +
" \n" +
" Compliance options:\n" +
" -1.3 use 1.3 compliance (-source 1.3 -target 1.1)\n" +
Expand Down Expand Up @@ -700,18 +699,18 @@ public void test012(){
" reported as errors\n" +
" \n" +
" Info options:\n" +
" -info:<warnings separated by ,> convert exactly the listed warnings\n" +
" -info:<warnings separated by ,> convert exactly the listed warnings\n" +
" to be reported as infos\n" +
" -info:+<warnings separated by ,> enable additional warnings to be\n" +
" -info:+<warnings separated by ,> enable additional warnings to be\n" +
" reported as infos\n" +
" -info:-<warnings separated by ,> disable specific warnings to be\n" +
" -info:-<warnings separated by ,> disable specific warnings to be\n" +
" reported as infos\n" +
" \n" +
" Setting warning, error or info options using properties file:\n" +
" -properties <file> set warnings/errors/info option based on the properties\n" +
" file contents. This option can be used with -nowarn,\n" +
" -err:.., -info: or -warn:.. options, but the last one\n" +
" on the command line sets the options to be used.\n" +
" file contents. This option can be used with -nowarn,\n" +
" -err:.., -info: or -warn:.. options, but the last one\n" +
" on the command line sets the options to be used.\n" +
" \n" +
" Debug options:\n" +
" -g[:lines,vars,source] custom debug info\n" +
Expand Down Expand Up @@ -817,11 +816,11 @@ public void test012b(){
" -deprecation + deprecation outside deprecated code\n" +
" -nowarn -warn:none disable all warnings and infos\n" +
" -nowarn:[<directories separated by " + File.pathSeparator+ ">]\n" +
" specify directories from which optional problems should\n" +
" be ignored\n" +
" -warn:<warnings separated by ,> enable exactly the listed warnings\n" +
" -warn:+<warnings separated by ,> enable additional warnings\n" +
" -warn:-<warnings separated by ,> disable specific warnings\n" +
" specify directories from which optional problems\n" +
" should be ignored\n" +
" -warn:<warnings separated by ,> enable exactly the listed warnings\n" +
" -warn:+<warnings separated by ,> enable additional warnings\n" +
" -warn:-<warnings separated by ,> disable specific warnings\n" +
" all enable all warnings\n" +
" allDeadCode dead code including trivial if(DEBUG) check\n" +
" allDeprecation deprecation including inside deprecated code\n" +
Expand All @@ -848,7 +847,7 @@ public void test012b(){
" finalBound type parameter with final bound\n" +
" finally + finally block not completing normally\n" +
" forbidden + use of types matching a forbidden access rule\n" +
" hashCode missing hashCode() method when overriding equals()\n" +
" hashCode missing hashCode() method when overriding equals()\n" +
" hiding macro for fieldHiding, localHiding, typeHiding and\n" +
" maskedCatchBlock\n" +
" includeAssertNull raise null warnings for variables\n" +
Expand All @@ -861,42 +860,45 @@ public void test012b(){
" invalidJavadoc all warnings for malformed javadoc tags\n" +
" invalidJavadocTag validate javadoc tag arguments\n" +
" invalidJavadocTagDep validate deprecated references in javadoc tag args\n" +
" invalidJavadocTagNotVisible validate non-visible references in javadoc\n" +
" tag args\n" +
" invalidJavadocVisibility(<visibility>) specify visibility modifier\n" +
" for malformed javadoc tag warnings\n" +
" invalidJavadocTagNotVisible\n" +
" validate non-visible references in javadoc tag args\n" +
" invalidJavadocVisibility(<visibility>)\n" +
" specify visibility modifier for malformed javadoc\n" +
" tag warnings\n" +
" javadoc invalid javadoc\n" +
" localHiding local variable hiding another variable\n" +
" maskedCatchBlock + hidden catch block\n" +
" missingJavadocTags missing Javadoc tags\n" +
" missingJavadocTagsOverriding missing Javadoc tags in overriding methods\n" +
" missingJavadocTagsMethod missing Javadoc tags for method type parameter\n" +
" missingJavadocTagsVisibility(<visibility>) specify visibility modifier\n" +
" for missing javadoc tags warnings\n" +
" missingJavadocComments missing Javadoc comments\n" +
" missingJavadocCommentsOverriding missing Javadoc tags in overriding\n" +
" methods\n" +
" missingJavadocTagsVisibility(<visibility>)\n" +
" specify visibility modifier for missing javadoc\n" +
" tags warnings\n" +
" missingJavadocComments missing Javadoc comments\n" +
" missingJavadocCommentsOverriding\n" +
" missing Javadoc tags in overriding methods\n" +
" missingJavadocCommentsVisibility(<visibility>) specify visibility\n" +
" modifier for missing javadoc comments warnings\n" +
" modifier for missing javadoc comments warnings\n" +
" module + module related problems.\n" +
" nls string literal lacking non-nls tag //$NON-NLS-<n>$\n" +
" noEffectAssign + assignment without effect\n" +
" null potential missing or redundant null check\n" +
" nullAnnot(<annot. names separated by |>) annotation based null analysis,\n" +
" nullAnnot(<annot. names separated by |>)\n" +
" annotation based null analysis,\n" +
" nullable|nonnull|nonnullbydefault annotation types\n" +
" optionally specified using fully qualified names.\n" +
" Enabling this option enables all null-annotation\n" +
" related sub-options. These can be individually\n" +
" controlled using options listed below.\n" +
" Enabling this option enables all null-annotation\n" +
" related sub-options. These can be individually\n" +
" controlled using options listed below.\n" +
" nullAnnotConflict conflict between null annotation specified\n" +
" and nullness inferred. Is effective only with\n" +
" nullAnnot option enabled.\n" +
" and nullness inferred. Is effective only with\n" +
" nullAnnot option enabled.\n" +
" nullAnnotRedundant redundant specification of null annotation. Is\n" +
" effective only with nullAnnot option enabled.\n" +
" effective only with nullAnnot option enabled.\n" +
" nullDereference + missing null check\n" +
" nullUncheckedConversion unchecked conversion from non-annotated type\n" +
" to @NonNull type. Is effective only with\n" +
" nullAnnot option enabled.\n" +
" nullUncheckedConversion unchecked conversion from non-annotated type\n" +
" to @NonNull type. Is effective only with\n" +
" nullAnnot option enabled.\n" +
" over-ann missing @Override annotation (superclass)\n" +
" paramAssign assignment to a parameter\n" +
" pkgDefaultMethod + attempt to override package-default method\n" +
Expand All @@ -917,39 +919,39 @@ public void test012b(){
" syncOverride missing synchronized in synchr. method override\n" +
" syntacticAnalysis perform syntax-based null analysis for fields\n" +
" syntheticAccess synthetic access for innerclass\n" +
" tasks(<tags separated by |>) tasks identified by tags inside comments\n" +
" tasks(<tags separated by |>) tasks identified by tags inside comments\n" +
" typeHiding + type parameter hiding another type\n" +
" unavoidableGenericProblems + ignore unavoidable type safety problems\n" +
" due to raw APIs\n" +
" unavoidableGenericProblems + ignore unavoidable type safety problems\n" +
" due to raw APIs\n" +
" unchecked + unchecked type operation\n" +
" unlikelyCollectionMethodArgumentType\n" +
" + unlikely argument type for collection method\n" +
" declaring an Object parameter\n" +
" unlikelyEqualsArgumentType unlikely argument type for method equals()\n" +
" unlikelyEqualsArgumentType unlikely argument type for method equals()\n" +
" unnecessaryElse unnecessary else clause\n" +
" unqualifiedField unqualified reference to field\n" +
" unused macro for unusedAllocation, unusedArgument,\n" +
" unusedImport, unusedLabel, unusedLocal,\n" +
" unusedPrivate, unusedThrown, and unusedTypeArgs,\n" +
" unusedExceptionParam\n"+
" unusedImport, unusedLabel, unusedLocal,\n" +
" unusedPrivate, unusedThrown, and unusedTypeArgs,\n" +
" unusedExceptionParam\n" +
" unusedAllocation allocating an object that is not used\n" +
" unusedArgument unread method parameter\n" +
" unusedExceptionParam unread exception parameter\n" +
" unusedImport + unused import declaration\n" +
" unusedLabel + unused label\n" +
" unusedLocal + unread local variable\n" +
" unusedParam unused parameter\n" +
" unusedParamOverriding unused parameter for overriding method\n" +
" unusedParamImplementing unused parameter for implementing method\n" +
" unusedParamIncludeDoc unused parameter documented in comment tag\n" +
" unusedParam unused parameter\n" +
" unusedParamOverriding unused parameter for overriding method\n" +
" unusedParamImplementing unused parameter for implementing method\n" +
" unusedParamIncludeDoc unused parameter documented in comment tag\n" +
" unusedPrivate + unused private member declaration\n" +
" unusedThrown unused declared thrown exception\n" +
" unusedThrownWhenOverriding unused declared thrown exception in \n" +
" overriding method\n" +
" unusedThrownIncludeDocComment unused declared thrown exception,\n" +
" documented in a comment tag\n" +
" unusedThrownWhenOverriding unused declared thrown exception in \n" +
" overriding method\n" +
" unusedThrownIncludeDocComment unused declared thrown exception,\n" +
" documented in a comment tag\n" +
" unusedThrownExemptExceptionThrowable unused declared thrown exception,\n" +
" exempt Exception and Throwable\n" +
" exempt Exception and Throwable\n" +
" unusedTypeArgs + unused type arguments for method and constructor\n" +
" uselessTypeCheck unnecessary cast/instanceof operation\n" +
" varargsCast + varargs argument need explicit cast\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3209,51 +3209,50 @@ public void configure(String[] argv) {
}
}
/** Translates any supported standard version starting at 1.3 up-to latest into the corresponding constant from CompilerOptions */
@SuppressWarnings("nls")
private String optionStringToVersion(String currentArg) {
switch (currentArg) {
case "1.3": return CompilerOptions.VERSION_1_3;
case "1.4": return CompilerOptions.VERSION_1_4;
case "1.5":
case "5":
case "5.0":
case "1.3": return CompilerOptions.VERSION_1_3; //$NON-NLS-1$
case "1.4": return CompilerOptions.VERSION_1_4; //$NON-NLS-1$
case "1.5": //$NON-NLS-1$
case "5": //$NON-NLS-1$
case "5.0": //$NON-NLS-1$
return CompilerOptions.VERSION_1_5;
case "1.6":
case "6":
case "6.0":
case "1.6": //$NON-NLS-1$
case "6": //$NON-NLS-1$
case "6.0": //$NON-NLS-1$
return CompilerOptions.VERSION_1_6;
case "1.7":
case "7":
case "7.0":
case "1.7": //$NON-NLS-1$
case "7": //$NON-NLS-1$
case "7.0": //$NON-NLS-1$
return CompilerOptions.VERSION_1_7;
case "1.8":
case "8":
case "8.0":
case "1.8": //$NON-NLS-1$
case "8": //$NON-NLS-1$
case "8.0": //$NON-NLS-1$
return CompilerOptions.VERSION_1_8;
case "1.9":
case "9":
case "9.0":
case "1.9": //$NON-NLS-1$
case "9": //$NON-NLS-1$
case "9.0": //$NON-NLS-1$
return CompilerOptions.VERSION_9;
case "10":
case "10.0":
case "10": //$NON-NLS-1$
case "10.0": //$NON-NLS-1$
return CompilerOptions.VERSION_10;
case "11":
case "11.0":
case "11": //$NON-NLS-1$
case "11.0": //$NON-NLS-1$
return CompilerOptions.VERSION_11;
case "12":
case "12.0":
case "12": //$NON-NLS-1$
case "12.0": //$NON-NLS-1$
return CompilerOptions.VERSION_12;
case "13":
case "13.0":
case "13": //$NON-NLS-1$
case "13.0": //$NON-NLS-1$
return CompilerOptions.VERSION_13;
case "14":
case "14.0":
case "14": //$NON-NLS-1$
case "14.0": //$NON-NLS-1$
return CompilerOptions.VERSION_14;
case "15":
case "15.0":
case "15": //$NON-NLS-1$
case "15.0": //$NON-NLS-1$
return CompilerOptions.VERSION_15;
case "16":
case "16.0":
case "16": //$NON-NLS-1$
case "16.0": //$NON-NLS-1$
return CompilerOptions.VERSION_16;
default:
return null;
Expand Down
Loading

0 comments on commit ac06026

Please sign in to comment.