View | Details | Raw Unified | Return to bug 246066
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java (-4 / +65 lines)
Lines 1660-1665 Link Here
1660
        "      indirectStatic       indirect reference to static member\n" +
1660
        "      indirectStatic       indirect reference to static member\n" +
1661
        "      intfAnnotation     + annotation type used as super interface\n" +
1661
        "      intfAnnotation     + annotation type used as super interface\n" +
1662
        "      intfNonInherited   + interface non-inherited method compatibility\n" +
1662
        "      intfNonInherited   + interface non-inherited method compatibility\n" +
1663
        "      intfRedundant      + find redundant superinterfaces\n" + 
1663
        "      javadoc              invalid javadoc\n" +
1664
        "      javadoc              invalid javadoc\n" +
1664
        "      localHiding          local variable hiding another variable\n" +
1665
        "      localHiding          local variable hiding another variable\n" +
1665
        "      maskedCatchBlock   + hidden catch block\n" +
1666
        "      maskedCatchBlock   + hidden catch block\n" +
Lines 1671-1677 Link Here
1671
        "      paramAssign          assignment to a parameter\n" +
1672
        "      paramAssign          assignment to a parameter\n" +
1672
        "      pkgDefaultMethod   + attempt to override package-default method\n" +
1673
        "      pkgDefaultMethod   + attempt to override package-default method\n" +
1673
        "      raw                + usage of raw type\n" +
1674
        "      raw                + usage of raw type\n" +
1674
        "      redundantSuperinterface                + find redundant superinterfaces\n" +
1675
        "      semicolon            unnecessary semicolon, empty statement\n" +
1675
        "      semicolon            unnecessary semicolon, empty statement\n" +
1676
        "      serial             + missing serialVersionUID\n" +
1676
        "      serial             + missing serialVersionUID\n" +
1677
        "      specialParamHiding   constructor or setter parameter hiding a field\n" +
1677
        "      specialParamHiding   constructor or setter parameter hiding a field\n" +
Lines 1679-1692 Link Here
1679
        "      staticReceiver     + non-static reference to static member\n" +
1679
        "      staticReceiver     + non-static reference to static member\n" +
1680
        "      super                overriding a method without making a super invocation\n" +
1680
        "      super                overriding a method without making a super invocation\n" +
1681
        "      suppress           + enable @SuppressWarnings\n" +
1681
        "      suppress           + enable @SuppressWarnings\n" +
1682
        "      syncOverride     overriding a synchronized method without synchronizing it\n" +
1682
        "      syncOverride         missing synchronized in synchr. method override\n" +
1683
        "      synthetic-access     same as syntheticAccess\n" +
1684
        "      syntheticAccess      synthetic access for innerclass\n" +
1683
        "      syntheticAccess      synthetic access for innerclass\n" +
1685
        "      tasks(<tags separated by |>) tasks identified by tags inside comments\n" +
1684
        "      tasks(<tags separated by |>) tasks identified by tags inside comments\n" +
1686
        "      typeHiding         + type parameter hiding another type\n" +
1685
        "      typeHiding         + type parameter hiding another type\n" +
1687
        "      unchecked          + unchecked type operation\n" +
1686
        "      unchecked          + unchecked type operation\n" +
1688
        "      unnecessaryElse      unnecessary else clause\n" +
1687
        "      unnecessaryElse      unnecessary else clause\n" +
1689
        "      unqualified-field-access same as unqualifiedField\n" +
1690
        "      unqualifiedField     unqualified reference to field\n" +
1688
        "      unqualifiedField     unqualified reference to field\n" +
1691
        "      unused               macro for unusedArgument, unusedImport, unusedLabel,\n" +
1689
        "      unused               macro for unusedArgument, unusedImport, unusedLabel,\n" +
1692
        "                               unusedLocal, unusedPrivate, unusedThrown,\n" +
1690
        "                               unusedLocal, unusedPrivate, unusedThrown,\n" +
Lines 10963-10966 Link Here
10963
        "Unrecognized option : @options2.txt\n" /* stderr */,
10961
        "Unrecognized option : @options2.txt\n" /* stderr */,
10964
        true /*shouldFlushOutput*/);
10962
        true /*shouldFlushOutput*/);
10965
}
10963
}
10964
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=246066
10965
public void test288_warn_options() {
10966
	this.runConformTest(
10967
		new String[] {
10968
			"X.java",
10969
			"interface IX {}\n" + 
10970
			"class BaseX implements IX {}\n" + 
10971
			"public class X extends BaseX implements IX {\n" + 
10972
			"}\n",
10973
		},
10974
		"\"" + OUTPUT_DIR +  File.separator + "X.java\""
10975
		+ " -sourcepath \"" + OUTPUT_DIR + "\""
10976
		+ " -warn:+intfRedundant -proc:none -d \"" + OUTPUT_DIR + "\"",
10977
		"",
10978
		"----------\n" + 
10979
		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + 
10980
		"	public class X extends BaseX implements IX {\n" + 
10981
		"	                                        ^^\n" + 
10982
		"Redundant superinterface IX for the type X, already defined by BaseX\n" + 
10983
		"----------\n" + 
10984
		"1 problem (1 warning)",
10985
		true);
10986
}
10987
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=246066 - variation
10988
public void test289_warn_options() {
10989
	this.runConformTest(
10990
		new String[] {
10991
			"X.java",
10992
			"interface IX {}\n" + 
10993
			"class BaseX implements IX {}\n" + 
10994
			"public class X extends BaseX implements IX {\n" + 
10995
			"}\n",
10996
		},
10997
		"\"" + OUTPUT_DIR +  File.separator + "X.java\""
10998
		+ " -sourcepath \"" + OUTPUT_DIR + "\""
10999
		+ " -warn:+redundantSuperinterface -proc:none -d \"" + OUTPUT_DIR + "\"",
11000
		"",
11001
		"----------\n" + 
11002
		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + 
11003
		"	public class X extends BaseX implements IX {\n" + 
11004
		"	                                        ^^\n" + 
11005
		"Redundant superinterface IX for the type X, already defined by BaseX\n" + 
11006
		"----------\n" + 
11007
		"1 problem (1 warning)",
11008
		true);
11009
}
11010
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=246066 - variation
11011
public void test290_warn_options() {
11012
	this.runConformTest(
11013
		new String[] {
11014
			"X.java",
11015
			"interface IX {}\n" + 
11016
			"class BaseX implements IX {}\n" + 
11017
			"public class X extends BaseX implements IX {\n" + 
11018
			"}\n",
11019
		},
11020
		"\"" + OUTPUT_DIR +  File.separator + "X.java\""
11021
		+ " -sourcepath \"" + OUTPUT_DIR + "\""
11022
		+ " -warn:+intfRedundant -warn:-intfRedundant -proc:none -d \"" + OUTPUT_DIR + "\"",
11023
		"",
11024
		"",
11025
		true);
11026
}
10966
}
11027
}
(-)batch/org/eclipse/jdt/internal/compiler/batch/messages.properties (-4 / +2 lines)
Lines 257-262 Link Here
257
\      indirectStatic       indirect reference to static member\n\
257
\      indirectStatic       indirect reference to static member\n\
258
\      intfAnnotation     + annotation type used as super interface\n\
258
\      intfAnnotation     + annotation type used as super interface\n\
259
\      intfNonInherited   + interface non-inherited method compatibility\n\
259
\      intfNonInherited   + interface non-inherited method compatibility\n\
260
\      intfRedundant      + find redundant superinterfaces\n\
260
\      javadoc              invalid javadoc\n\
261
\      javadoc              invalid javadoc\n\
261
\      localHiding          local variable hiding another variable\n\
262
\      localHiding          local variable hiding another variable\n\
262
\      maskedCatchBlock   + hidden catch block\n\
263
\      maskedCatchBlock   + hidden catch block\n\
Lines 268-274 Link Here
268
\      paramAssign          assignment to a parameter\n\
269
\      paramAssign          assignment to a parameter\n\
269
\      pkgDefaultMethod   + attempt to override package-default method\n\
270
\      pkgDefaultMethod   + attempt to override package-default method\n\
270
\      raw                + usage of raw type\n\
271
\      raw                + usage of raw type\n\
271
\      redundantSuperinterface                + find redundant superinterfaces\n\
272
\      semicolon            unnecessary semicolon, empty statement\n\
272
\      semicolon            unnecessary semicolon, empty statement\n\
273
\      serial             + missing serialVersionUID\n\
273
\      serial             + missing serialVersionUID\n\
274
\      specialParamHiding   constructor or setter parameter hiding a field\n\
274
\      specialParamHiding   constructor or setter parameter hiding a field\n\
Lines 276-289 Link Here
276
\      staticReceiver     + non-static reference to static member\n\
276
\      staticReceiver     + non-static reference to static member\n\
277
\      super                overriding a method without making a super invocation\n\
277
\      super                overriding a method without making a super invocation\n\
278
\      suppress           + enable @SuppressWarnings\n\
278
\      suppress           + enable @SuppressWarnings\n\
279
\      syncOverride     overriding a synchronized method without synchronizing it\n\
279
\      syncOverride         missing synchronized in synchr. method override\n\
280
\      synthetic-access     same as syntheticAccess\n\
281
\      syntheticAccess      synthetic access for innerclass\n\
280
\      syntheticAccess      synthetic access for innerclass\n\
282
\      tasks(<tags separated by |>) tasks identified by tags inside comments\n\
281
\      tasks(<tags separated by |>) tasks identified by tags inside comments\n\
283
\      typeHiding         + type parameter hiding another type\n\
282
\      typeHiding         + type parameter hiding another type\n\
284
\      unchecked          + unchecked type operation\n\
283
\      unchecked          + unchecked type operation\n\
285
\      unnecessaryElse      unnecessary else clause\n\
284
\      unnecessaryElse      unnecessary else clause\n\
286
\      unqualified-field-access same as unqualifiedField\n\
287
\      unqualifiedField     unqualified reference to field\n\
285
\      unqualifiedField     unqualified reference to field\n\
288
\      unused               macro for unusedArgument, unusedImport, unusedLabel,\n\
286
\      unused               macro for unusedArgument, unusedImport, unusedLabel,\n\
289
\                               unusedLocal, unusedPrivate, unusedThrown,\n\
287
\                               unusedLocal, unusedPrivate, unusedThrown,\n\
(-)batch/org/eclipse/jdt/internal/compiler/batch/Main.java (-313 / +445 lines)
Lines 381-387 Link Here
381
381
382
		// find out an option name controlling a given problemID
382
		// find out an option name controlling a given problemID
383
		private String getProblemOptionKey(int problemID) {
383
		private String getProblemOptionKey(int problemID) {
384
			long irritant = ProblemReporter.getIrritant(problemID);
384
			int irritant = ProblemReporter.getIrritant(problemID);
385
			return CompilerOptions.optionKeyFromIrritant(irritant);
385
			return CompilerOptions.optionKeyFromIrritant(irritant);
386
		}
386
		}
387
387
Lines 3056-3374 Link Here
3056
 * Handle a single warning token.
3056
 * Handle a single warning token.
3057
*/
3057
*/
3058
protected void handleWarningToken(String token, boolean isEnabling) throws InvalidInputException {
3058
protected void handleWarningToken(String token, boolean isEnabling) throws InvalidInputException {
3059
	if (token.equals("constructorName")) { //$NON-NLS-1$
3059
	if (token.length() == 0) return;
3060
		this.options.put(
3060
	switch(token.charAt(0)) {
3061
			CompilerOptions.OPTION_ReportMethodWithConstructorName,
3061
		case 'a' :
3062
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3062
			if (token.equals("allDeprecation")) { //$NON-NLS-1$
3063
	} else if (token.equals("pkgDefaultMethod") || token.equals("packageDefaultMethod")/*backward compatible*/ ) { //$NON-NLS-1$ //$NON-NLS-2$
3063
				this.options.put(
3064
		this.options.put(
3064
					CompilerOptions.OPTION_ReportDeprecation,
3065
			CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod,
3065
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3066
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3066
				this.options.put(
3067
	} else if (token.equals("maskedCatchBlock") || token.equals("maskedCatchBlocks")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3067
					CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
3068
		this.options.put(
3068
					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3069
			CompilerOptions.OPTION_ReportHiddenCatchBlock,
3069
				this.options.put(
3070
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3070
					CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
3071
	} else if (token.equals("deprecation")) { //$NON-NLS-1$
3071
					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3072
		this.options.put(
3072
				return;
3073
			CompilerOptions.OPTION_ReportDeprecation,
3073
			} else if (token.equals("allJavadoc")) { //$NON-NLS-1$
3074
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3074
				this.warnAllJavadocOn = this.warnJavadocOn = isEnabling;
3075
		this.options.put(
3075
				return;
3076
			CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
3076
			} else if (token.equals("assertIdentifier")) { //$NON-NLS-1$
3077
			CompilerOptions.DISABLED);
3077
				this.options.put(
3078
		this.options.put(
3078
					CompilerOptions.OPTION_ReportAssertIdentifier,
3079
			CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
3079
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3080
			CompilerOptions.DISABLED);
3080
				return;
3081
	} else if (token.equals("allDeprecation")) { //$NON-NLS-1$
3081
			}
3082
		this.options.put(
3082
			break;
3083
			CompilerOptions.OPTION_ReportDeprecation,
3083
		case 'b' :
3084
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3084
			if (token.equals("boxing")) { //$NON-NLS-1$
3085
		this.options.put(
3085
				this.options.put(
3086
			CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
3086
					CompilerOptions.OPTION_ReportAutoboxing,
3087
			isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3087
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3088
		this.options.put(
3088
				return;
3089
			CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
3089
			}
3090
			isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3090
			break;
3091
	} else if (token.equals("unusedLocal") || token.equals("unusedLocals")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3091
		case 'c' :
3092
		this.options.put(
3092
			if (token.equals("constructorName")) { //$NON-NLS-1$
3093
			CompilerOptions.OPTION_ReportUnusedLocal,
3093
				this.options.put(
3094
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3094
					CompilerOptions.OPTION_ReportMethodWithConstructorName,
3095
	} else if (token.equals("unusedArgument") || token.equals("unusedArguments")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3095
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3096
		this.options.put(
3096
				return;
3097
			CompilerOptions.OPTION_ReportUnusedParameter,
3097
			} else if (token.equals("conditionAssign")) { //$NON-NLS-1$
3098
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3098
				this.options.put(
3099
	} else if (token.equals("unusedImport") || token.equals("unusedImports")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3099
					CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment,
3100
		this.options.put(
3100
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3101
			CompilerOptions.OPTION_ReportUnusedImport,
3101
				return;
3102
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3102
			} else if (token.equals("compareIdentical")) { //$NON-NLS-1$
3103
	} else if (token.equals("unusedPrivate")) { //$NON-NLS-1$
3103
				this.options.put(
3104
		this.options.put(
3104
					CompilerOptions.OPTION_ReportComparingIdentical,
3105
			CompilerOptions.OPTION_ReportUnusedPrivateMember,
3105
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3106
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3106
				return;
3107
	} else if (token.equals("unusedLabel")) { //$NON-NLS-1$
3107
			} else if (token.equals("charConcat") /*|| token.equals("noImplicitStringConversion")/*backward compatible*/) {//$NON-NLS-1$
3108
		this.options.put(
3108
				this.options.put(
3109
			CompilerOptions.OPTION_ReportUnusedLabel,
3109
					CompilerOptions.OPTION_ReportNoImplicitStringConversion,
3110
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3110
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3111
	} else if (token.equals("localHiding")) { //$NON-NLS-1$
3111
				return;
3112
		this.options.put(
3112
			}
3113
			CompilerOptions.OPTION_ReportLocalVariableHiding,
3113
			break;
3114
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3114
		case 'd' :
3115
	} else if (token.equals("fieldHiding")) { //$NON-NLS-1$
3115
			if (token.equals("deprecation")) { //$NON-NLS-1$
3116
		this.options.put(
3116
				this.options.put(
3117
			CompilerOptions.OPTION_ReportFieldHiding,
3117
					CompilerOptions.OPTION_ReportDeprecation,
3118
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3118
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3119
	} else if (token.equals("specialParamHiding")) { //$NON-NLS-1$
3119
				this.options.put(
3120
		this.options.put(
3120
					CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
3121
			CompilerOptions.OPTION_ReportSpecialParameterHidingField,
3121
					CompilerOptions.DISABLED);
3122
			isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3122
				this.options.put(
3123
	} else if (token.equals("conditionAssign")) { //$NON-NLS-1$
3123
					CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
3124
		this.options.put(
3124
					CompilerOptions.DISABLED);
3125
			CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment,
3125
				return;
3126
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3126
			} else if (token.equals("dep-ann")) { //$NON-NLS-1$
3127
		} else if (token.equals("syntheticAccess") //$NON-NLS-1$
3127
				this.options.put(
3128
				|| token.equals("synthetic-access")) { //$NON-NLS-1$
3128
					CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation,
3129
		this.options.put(
3129
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3130
			CompilerOptions.OPTION_ReportSyntheticAccessEmulation,
3130
				return;
3131
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3131
			} else if (token.equals("discouraged")) { //$NON-NLS-1$
3132
	} else if (token.equals("nls")) { //$NON-NLS-1$
3132
				this.options.put(
3133
		this.options.put(
3133
					CompilerOptions.OPTION_ReportDiscouragedReference,
3134
			CompilerOptions.OPTION_ReportNonExternalizedStringLiteral,
3134
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3135
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3135
				return;
3136
	} else if (token.equals("staticReceiver")) { //$NON-NLS-1$
3136
			}
3137
		this.options.put(
3137
			break;
3138
			CompilerOptions.OPTION_ReportNonStaticAccessToStatic,
3138
		case 'e' :
3139
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3139
			if (token.equals("enumSwitch") //$NON-NLS-1$
3140
	} else if (token.equals("indirectStatic")) { //$NON-NLS-1$
3140
					|| token.equals("incomplete-switch")) { //$NON-NLS-1$
3141
		this.options.put(
3141
				this.options.put(
3142
			CompilerOptions.OPTION_ReportIndirectStaticAccess,
3142
					CompilerOptions.OPTION_ReportIncompleteEnumSwitch,
3143
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3143
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3144
	} else if (token.equals("noEffectAssign")) { //$NON-NLS-1$
3144
				return;
3145
		this.options.put(
3145
			} else if (token.equals("emptyBlock")) {//$NON-NLS-1$
3146
			CompilerOptions.OPTION_ReportNoEffectAssignment,
3146
				this.options.put(
3147
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3147
					CompilerOptions.OPTION_ReportUndocumentedEmptyBlock,
3148
	} else if (token.equals("compareIdentical")) { //$NON-NLS-1$
3148
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3149
		this.options.put(
3149
				return;
3150
				CompilerOptions.OPTION_ReportComparingIdentical,
3150
			} else if (token.equals("enumIdentifier")) { //$NON-NLS-1$
3151
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3151
				this.options.put(
3152
	} else if (token.equals("syncOverride")) { //$NON-NLS-1$
3152
					CompilerOptions.OPTION_ReportEnumIdentifier,
3153
		this.options.put(
3153
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3154
				CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod,
3154
				return;
3155
				isEnabling ? CompilerOptions.ERROR : CompilerOptions.IGNORE);
3155
			}
3156
	} else if (token.equals("intfNonInherited") || token.equals("interfaceNonInherited")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3156
			break;
3157
		this.options.put(
3157
		case 'f' :
3158
			CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod,
3158
			if (token.equals("fieldHiding")) { //$NON-NLS-1$
3159
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3159
				this.options.put(
3160
	} else if (token.equals("charConcat") || token.equals("noImplicitStringConversion")/*backward compatible*/) {//$NON-NLS-1$ //$NON-NLS-2$
3160
					CompilerOptions.OPTION_ReportFieldHiding,
3161
		this.options.put(
3161
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3162
			CompilerOptions.OPTION_ReportNoImplicitStringConversion,
3162
				return;
3163
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3163
			} else if (token.equals("finalBound")) {//$NON-NLS-1$
3164
	} else if (token.equals("semicolon")) {//$NON-NLS-1$
3164
				this.options.put(
3165
		this.options.put(
3165
						CompilerOptions.OPTION_ReportFinalParameterBound,
3166
			CompilerOptions.OPTION_ReportEmptyStatement,
3166
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3167
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3167
				return;
3168
	} else if (token.equals("serial")) {//$NON-NLS-1$
3168
			} else if (token.equals("finally")) { //$NON-NLS-1$
3169
		this.options.put(
3169
				this.options.put(
3170
			CompilerOptions.OPTION_ReportMissingSerialVersion,
3170
					CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally,
3171
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3171
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3172
	} else if (token.equals("emptyBlock")) {//$NON-NLS-1$
3172
				return;
3173
		this.options.put(
3173
			} else if (token.equals("forbidden")) { //$NON-NLS-1$
3174
			CompilerOptions.OPTION_ReportUndocumentedEmptyBlock,
3174
				this.options.put(
3175
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3175
					CompilerOptions.OPTION_ReportForbiddenReference,
3176
	} else if (token.equals("uselessTypeCheck")) {//$NON-NLS-1$
3176
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3177
		this.options.put(
3177
				return;
3178
			CompilerOptions.OPTION_ReportUnnecessaryTypeCheck,
3178
			} else if (token.equals("fallthrough")) { //$NON-NLS-1$
3179
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3179
				this.options.put(
3180
	} else if (token.equals("unchecked") || token.equals("unsafe")) {//$NON-NLS-1$ //$NON-NLS-2$
3180
					CompilerOptions.OPTION_ReportFallthroughCase,
3181
		this.options.put(
3181
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3182
			CompilerOptions.OPTION_ReportUncheckedTypeOperation,
3182
				return;
3183
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3183
			}
3184
	} else if (token.equals("raw")) {//$NON-NLS-1$
3184
			break;
3185
		this.options.put(
3185
		case 'h' :
3186
			CompilerOptions.OPTION_ReportRawTypeReference,
3186
			if (token.equals("hiding")) { //$NON-NLS-1$
3187
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3187
				this.options.put(
3188
	} else if (token.equals("finalBound")) {//$NON-NLS-1$
3188
					CompilerOptions.OPTION_ReportHiddenCatchBlock,
3189
		this.options.put(
3189
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3190
			CompilerOptions.OPTION_ReportFinalParameterBound,
3190
				this.options.put(
3191
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3191
					CompilerOptions.OPTION_ReportLocalVariableHiding,
3192
	} else if (token.equals("suppress")) {//$NON-NLS-1$
3192
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3193
		this.options.put(
3193
				this.options.put(
3194
			CompilerOptions.OPTION_SuppressWarnings,
3194
					CompilerOptions.OPTION_ReportFieldHiding,
3195
			isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3195
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3196
	} else if (token.equals("warningToken")) {//$NON-NLS-1$
3196
				this.options.put(
3197
		this.options.put(
3197
					CompilerOptions.OPTION_ReportTypeParameterHiding,
3198
			CompilerOptions.OPTION_ReportUnhandledWarningToken,
3198
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3199
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3199
				return;
3200
		this.options.put(
3200
			}
3201
				CompilerOptions.OPTION_ReportUnusedWarningToken,
3201
			break;
3202
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3202
		case 'i' :
3203
	} else if (token.equals("unnecessaryElse")) {//$NON-NLS-1$
3203
			if (token.equals("indirectStatic")) { //$NON-NLS-1$
3204
		this.options.put(
3204
				this.options.put(
3205
			CompilerOptions.OPTION_ReportUnnecessaryElse,
3205
					CompilerOptions.OPTION_ReportIndirectStaticAccess,
3206
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3206
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3207
	} else if (token.equals("javadoc")) {//$NON-NLS-1$
3207
				return;
3208
		this.warnJavadocOn = isEnabling;
3208
			} else if (token.equals("intfNonInherited") || token.equals("interfaceNonInherited")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3209
	} else if (token.equals("allJavadoc")) { //$NON-NLS-1$
3209
				this.options.put(
3210
		this.warnAllJavadocOn = this.warnJavadocOn = isEnabling;
3210
					CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod,
3211
	} else if (token.startsWith("tasks")) { //$NON-NLS-1$
3211
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3212
		String taskTags = Util.EMPTY_STRING;
3212
				return;
3213
		int start = token.indexOf('(');
3213
			} else if (token.equals("intfAnnotation")) { //$NON-NLS-1$
3214
		int end = token.indexOf(')');
3214
				this.options.put(
3215
		if (start >= 0 && end >= 0 && start < end){
3215
					CompilerOptions.OPTION_ReportAnnotationSuperInterface,
3216
			taskTags = token.substring(start+1, end).trim();
3216
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3217
			taskTags = taskTags.replace('|',',');
3217
				return;
3218
		}
3218
			} else if (token.equals("intfRedundant") /*|| token.equals("redundantSuperinterface")*/) { //$NON-NLS-1$
3219
		if (taskTags.length() == 0){
3219
				this.options.put(
3220
			throw new InvalidInputException(this.bind("configure.invalidTaskTag", token)); //$NON-NLS-1$
3220
					CompilerOptions.OPTION_ReportRedundantSuperinterface,
3221
		}
3221
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
3222
		this.options.put(
3222
				return;
3223
			CompilerOptions.OPTION_TaskTags,
3223
			}
3224
			isEnabling ? taskTags : Util.EMPTY_STRING);
3224
			break;
3225
	} else if (token.equals("assertIdentifier")) { //$NON-NLS-1$
3225
		case 'j' :
3226
		this.options.put(
3226
			if (token.equals("javadoc")) {//$NON-NLS-1$
3227
			CompilerOptions.OPTION_ReportAssertIdentifier,
3227
				this.warnJavadocOn = isEnabling;
3228
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3228
				return;
3229
	} else if (token.equals("enumIdentifier")) { //$NON-NLS-1$
3229
			}
3230
		this.options.put(
3230
			break;
3231
				CompilerOptions.OPTION_ReportEnumIdentifier,
3231
		case 'l' :
3232
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3232
			if (token.equals("localHiding")) { //$NON-NLS-1$
3233
	} else if (token.equals("finally")) { //$NON-NLS-1$
3233
				this.options.put(
3234
		this.options.put(
3234
					CompilerOptions.OPTION_ReportLocalVariableHiding,
3235
			CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally,
3235
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3236
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3236
				return;
3237
	} else if (token.equals("unusedThrown")) { //$NON-NLS-1$
3237
			}
3238
		this.options.put(
3238
			break;
3239
			CompilerOptions.OPTION_ReportUnusedDeclaredThrownException,
3239
		case 'm' :
3240
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3240
			if (token.equals("maskedCatchBlock") || token.equals("maskedCatchBlocks")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3241
	} else if (token.equals("unqualifiedField") //$NON-NLS-1$
3241
				this.options.put(
3242
			|| token.equals("unqualified-field-access")) { //$NON-NLS-1$
3242
					CompilerOptions.OPTION_ReportHiddenCatchBlock,
3243
		this.options.put(
3243
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3244
			CompilerOptions.OPTION_ReportUnqualifiedFieldAccess,
3244
				return;
3245
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3245
			}
3246
	} else if (token.equals("typeHiding")) { //$NON-NLS-1$
3246
			break;
3247
		this.options.put(
3247
		case 'n' :
3248
			CompilerOptions.OPTION_ReportTypeParameterHiding,
3248
			if (token.equals("nls")) { //$NON-NLS-1$
3249
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3249
				this.options.put(
3250
	} else if (token.equals("varargsCast")) { //$NON-NLS-1$
3250
					CompilerOptions.OPTION_ReportNonExternalizedStringLiteral,
3251
		this.options.put(
3251
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3252
			CompilerOptions.OPTION_ReportVarargsArgumentNeedCast,
3252
				return;
3253
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3253
			} else if (token.equals("noEffectAssign")) { //$NON-NLS-1$
3254
	} else if (token.equals("null")) { //$NON-NLS-1$
3254
				this.options.put(
3255
		if (isEnabling) {
3255
					CompilerOptions.OPTION_ReportNoEffectAssignment,
3256
			this.options.put(CompilerOptions.OPTION_ReportNullReference,
3256
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3257
					CompilerOptions.WARNING);
3257
				return;
3258
			this.options.put(CompilerOptions.OPTION_ReportPotentialNullReference,
3258
			} else if (/*token.equals("charConcat") ||*/ token.equals("noImplicitStringConversion")/*backward compatible*/) {//$NON-NLS-1$
3259
					CompilerOptions.WARNING);
3259
				this.options.put(
3260
			this.options.put(CompilerOptions.OPTION_ReportRedundantNullCheck,
3260
					CompilerOptions.OPTION_ReportNoImplicitStringConversion,
3261
					CompilerOptions.WARNING);
3261
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3262
		} else {
3262
				return;
3263
			this.options.put(CompilerOptions.OPTION_ReportNullReference,
3263
			} else if (token.equals("null")) { //$NON-NLS-1$
3264
					CompilerOptions.IGNORE);
3264
				this.options.put(
3265
			this.options.put(CompilerOptions.OPTION_ReportPotentialNullReference,
3265
						CompilerOptions.OPTION_ReportNullReference,
3266
					CompilerOptions.IGNORE);
3266
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3267
			this.options.put(CompilerOptions.OPTION_ReportRedundantNullCheck,
3267
				this.options.put(
3268
					CompilerOptions.IGNORE);
3268
						CompilerOptions.OPTION_ReportPotentialNullReference,
3269
		}
3269
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3270
	} else if (token.equals("nullDereference")) { //$NON-NLS-1$
3270
				this.options.put(
3271
		if (isEnabling) {
3271
						CompilerOptions.OPTION_ReportRedundantNullCheck,
3272
			this.options.put(CompilerOptions.OPTION_ReportNullReference,
3272
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3273
					CompilerOptions.WARNING);
3273
				return;
3274
		} else {
3274
			} else if (token.equals("nullDereference")) { //$NON-NLS-1$
3275
			this.options.put(CompilerOptions.OPTION_ReportNullReference,
3275
				this.options.put(
3276
					CompilerOptions.IGNORE);
3276
						CompilerOptions.OPTION_ReportNullReference,
3277
			this.options.put(CompilerOptions.OPTION_ReportPotentialNullReference,
3277
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3278
					CompilerOptions.IGNORE);
3278
				if (!isEnabling) {
3279
			this.options.put(CompilerOptions.OPTION_ReportRedundantNullCheck,
3279
					this.options.put(
3280
					CompilerOptions.IGNORE);
3280
							CompilerOptions.OPTION_ReportPotentialNullReference,
3281
		}
3281
							CompilerOptions.IGNORE);
3282
	} else if (token.equals("boxing")) { //$NON-NLS-1$
3282
					this.options.put(
3283
		this.options.put(
3283
							CompilerOptions.OPTION_ReportRedundantNullCheck,
3284
			CompilerOptions.OPTION_ReportAutoboxing,
3284
							CompilerOptions.IGNORE);
3285
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3285
				}
3286
	} else if (token.equals("over-ann")) { //$NON-NLS-1$
3286
				return;
3287
		this.options.put(
3287
			}
3288
			CompilerOptions.OPTION_ReportMissingOverrideAnnotation,
3288
			break;
3289
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3289
		case 'o' :
3290
	} else if (token.equals("dep-ann")) { //$NON-NLS-1$
3290
			if (token.equals("over-sync") /*|| token.equals("syncOverride")*/) { //$NON-NLS-1$ 
3291
		this.options.put(
3291
				this.options.put(
3292
			CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation,
3292
					CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod,
3293
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3293
					isEnabling ? CompilerOptions.ERROR : CompilerOptions.IGNORE);
3294
	} else if (token.equals("intfAnnotation")) { //$NON-NLS-1$
3294
				return;
3295
		this.options.put(
3295
			} else if (token.equals("over-ann")) { //$NON-NLS-1$
3296
			CompilerOptions.OPTION_ReportAnnotationSuperInterface,
3296
				this.options.put(
3297
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3297
					CompilerOptions.OPTION_ReportMissingOverrideAnnotation,
3298
	} else if (token.equals("enumSwitch") //$NON-NLS-1$
3298
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3299
			|| token.equals("incomplete-switch")) { //$NON-NLS-1$
3299
				return;
3300
		this.options.put(
3300
			}
3301
			CompilerOptions.OPTION_ReportIncompleteEnumSwitch,
3301
			break;
3302
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3302
		case 'p' :
3303
	} else if (token.equals("hiding")) { //$NON-NLS-1$
3303
			if (token.equals("pkgDefaultMethod") || token.equals("packageDefaultMethod")/*backward compatible*/ ) { //$NON-NLS-1$ //$NON-NLS-2$
3304
		this.options.put(
3304
				this.options.put(
3305
			CompilerOptions.OPTION_ReportHiddenCatchBlock,
3305
					CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod,
3306
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3306
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
3307
		this.options.put(
3307
				return;
3308
			CompilerOptions.OPTION_ReportLocalVariableHiding,
3308
			} else if (token.equals("paramAssign")) { //$NON-NLS-1$
3309
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3309
				this.options.put(
3310
		this.options.put(
3310
					CompilerOptions.OPTION_ReportParameterAssignment,
3311
			CompilerOptions.OPTION_ReportFieldHiding,
3311
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3312
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3312
				return;
3313
		this.options.put(
3313
			}
3314
			CompilerOptions.OPTION_ReportTypeParameterHiding,
3314
			break;
3315
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3315
		case 'r' :
3316
	} else if (token.equals("static-access")) { //$NON-NLS-1$
3316
			if (token.equals("raw")) {//$NON-NLS-1$
3317
		this.options.put(
3317
				this.options.put(
3318
			CompilerOptions.OPTION_ReportNonStaticAccessToStatic,
3318
					CompilerOptions.OPTION_ReportRawTypeReference,
3319
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3319
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3320
		this.options.put(
3320
				return;
3321
			CompilerOptions.OPTION_ReportIndirectStaticAccess,
3321
			} else if (/*token.equals("intfRedundant") ||*/ token.equals("redundantSuperinterface")) { //$NON-NLS-1$
3322
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3322
				this.options.put(
3323
	} else if (token.equals("unused")) { //$NON-NLS-1$
3323
					CompilerOptions.OPTION_ReportRedundantSuperinterface,
3324
		this.options.put(
3324
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
3325
			CompilerOptions.OPTION_ReportUnusedLocal,
3325
				return;
3326
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3326
			}
3327
		this.options.put(
3327
			break;
3328
			CompilerOptions.OPTION_ReportUnusedParameter,
3328
		case 's' :
3329
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3329
			if (token.equals("specialParamHiding")) { //$NON-NLS-1$
3330
		this.options.put(
3330
				this.options.put(
3331
			CompilerOptions.OPTION_ReportUnusedImport,
3331
					CompilerOptions.OPTION_ReportSpecialParameterHidingField,
3332
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3332
					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3333
		this.options.put(
3333
				return;
3334
			CompilerOptions.OPTION_ReportUnusedPrivateMember,
3334
			} else if (token.equals("syntheticAccess") || token.equals("synthetic-access")) { //$NON-NLS-1$ //$NON-NLS-2$
3335
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3335
				this.options.put(
3336
		this.options.put(
3336
					CompilerOptions.OPTION_ReportSyntheticAccessEmulation,
3337
			CompilerOptions.OPTION_ReportUnusedDeclaredThrownException,
3337
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3338
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3338
				return;
3339
		this.options.put(
3339
			} else if (token.equals("staticReceiver")) { //$NON-NLS-1$
3340
				CompilerOptions.OPTION_ReportUnusedLabel,
3340
				this.options.put(
3341
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3341
					CompilerOptions.OPTION_ReportNonStaticAccessToStatic,
3342
		this.options.put(
3342
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3343
				CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
3343
				return;
3344
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3344
			} else 	if (/*token.equals("over-sync") ||*/ token.equals("syncOverride")) { //$NON-NLS-1$ 
3345
	} else if (token.equals("paramAssign")) { //$NON-NLS-1$
3345
				this.options.put(
3346
		this.options.put(
3346
					CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod,
3347
			CompilerOptions.OPTION_ReportParameterAssignment,
3347
					isEnabling ? CompilerOptions.ERROR : CompilerOptions.IGNORE);
3348
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3348
				return;
3349
	} else if (token.equals("discouraged")) { //$NON-NLS-1$
3349
			} else if (token.equals("semicolon")) {//$NON-NLS-1$
3350
		this.options.put(
3350
				this.options.put(
3351
			CompilerOptions.OPTION_ReportDiscouragedReference,
3351
					CompilerOptions.OPTION_ReportEmptyStatement,
3352
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3352
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3353
	} else if (token.equals("forbidden")) { //$NON-NLS-1$
3353
				return;
3354
		this.options.put(
3354
			} else if (token.equals("serial")) {//$NON-NLS-1$
3355
			CompilerOptions.OPTION_ReportForbiddenReference,
3355
				this.options.put(
3356
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3356
					CompilerOptions.OPTION_ReportMissingSerialVersion,
3357
	} else if (token.equals("fallthrough")) { //$NON-NLS-1$
3357
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3358
		this.options.put(
3358
				return;
3359
			CompilerOptions.OPTION_ReportFallthroughCase,
3359
			} else if (token.equals("suppress")) {//$NON-NLS-1$
3360
			isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3360
				this.options.put(
3361
	} else if (token.equals("super")) { //$NON-NLS-1$
3361
					CompilerOptions.OPTION_SuppressWarnings,
3362
		this.options.put(
3362
					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
3363
				CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation,
3363
				return;
3364
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3364
			} else if (token.equals("static-access")) { //$NON-NLS-1$
3365
	} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
3365
				this.options.put(
3366
		this.options.put(
3366
					CompilerOptions.OPTION_ReportNonStaticAccessToStatic,
3367
				CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
3367
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3368
				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3368
				this.options.put(
3369
	} else {
3369
					CompilerOptions.OPTION_ReportIndirectStaticAccess,
3370
		addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
3370
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3371
				return;
3372
			} else if (token.equals("super")) { //$NON-NLS-1$
3373
				this.options.put(
3374
					CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation,
3375
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3376
				return;
3377
			}
3378
			break;
3379
		case 't' :
3380
			if (token.startsWith("tasks")) { //$NON-NLS-1$
3381
				String taskTags = Util.EMPTY_STRING;
3382
				int start = token.indexOf('(');
3383
				int end = token.indexOf(')');
3384
				if (start >= 0 && end >= 0 && start < end){
3385
					taskTags = token.substring(start+1, end).trim();
3386
					taskTags = taskTags.replace('|',',');
3387
				}
3388
				if (taskTags.length() == 0){
3389
					throw new InvalidInputException(this.bind("configure.invalidTaskTag", token)); //$NON-NLS-1$
3390
				}
3391
				this.options.put(
3392
					CompilerOptions.OPTION_TaskTags,
3393
					isEnabling ? taskTags : Util.EMPTY_STRING);
3394
				return;
3395
			} else if (token.equals("typeHiding")) { //$NON-NLS-1$
3396
				this.options.put(
3397
					CompilerOptions.OPTION_ReportTypeParameterHiding,
3398
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3399
				return;
3400
			}
3401
			break;
3402
		case 'u' :
3403
			if (token.equals("unusedLocal") || token.equals("unusedLocals")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3404
				this.options.put(
3405
					CompilerOptions.OPTION_ReportUnusedLocal,
3406
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3407
				return;
3408
			} else if (token.equals("unusedArgument") || token.equals("unusedArguments")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3409
				this.options.put(
3410
					CompilerOptions.OPTION_ReportUnusedParameter,
3411
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3412
				return;
3413
			} else if (token.equals("unusedImport") || token.equals("unusedImports")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
3414
				this.options.put(
3415
					CompilerOptions.OPTION_ReportUnusedImport,
3416
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3417
				return;
3418
			} else if (token.equals("unusedPrivate")) { //$NON-NLS-1$
3419
				this.options.put(
3420
					CompilerOptions.OPTION_ReportUnusedPrivateMember,
3421
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3422
				return;
3423
			} else if (token.equals("unusedLabel")) { //$NON-NLS-1$
3424
				this.options.put(
3425
					CompilerOptions.OPTION_ReportUnusedLabel,
3426
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3427
				return;
3428
			} else if (token.equals("uselessTypeCheck")) {//$NON-NLS-1$
3429
				this.options.put(
3430
					CompilerOptions.OPTION_ReportUnnecessaryTypeCheck,
3431
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3432
				return;
3433
			} else if (token.equals("unchecked") || token.equals("unsafe")) {//$NON-NLS-1$ //$NON-NLS-2$
3434
				this.options.put(
3435
					CompilerOptions.OPTION_ReportUncheckedTypeOperation,
3436
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3437
				return;
3438
			} else if (token.equals("unnecessaryElse")) {//$NON-NLS-1$
3439
				this.options.put(
3440
					CompilerOptions.OPTION_ReportUnnecessaryElse,
3441
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3442
				return;
3443
			} else if (token.equals("unusedThrown")) { //$NON-NLS-1$
3444
				this.options.put(
3445
					CompilerOptions.OPTION_ReportUnusedDeclaredThrownException,
3446
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3447
				return;
3448
			} else if (token.equals("unqualifiedField") || token.equals("unqualified-field-access")) { //$NON-NLS-1$ //$NON-NLS-2$
3449
				this.options.put(
3450
					CompilerOptions.OPTION_ReportUnqualifiedFieldAccess,
3451
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3452
				return;
3453
			} else if (token.equals("unused")) { //$NON-NLS-1$
3454
				this.options.put(
3455
					CompilerOptions.OPTION_ReportUnusedLocal,
3456
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3457
				this.options.put(
3458
					CompilerOptions.OPTION_ReportUnusedParameter,
3459
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3460
				this.options.put(
3461
					CompilerOptions.OPTION_ReportUnusedImport,
3462
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3463
				this.options.put(
3464
					CompilerOptions.OPTION_ReportUnusedPrivateMember,
3465
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3466
				this.options.put(
3467
					CompilerOptions.OPTION_ReportUnusedDeclaredThrownException,
3468
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3469
				this.options.put(
3470
						CompilerOptions.OPTION_ReportUnusedLabel,
3471
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3472
				this.options.put(
3473
						CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
3474
						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3475
				return;
3476
			} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
3477
				this.options.put(
3478
					CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
3479
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3480
				return;
3481
			}
3482
			break;
3483
		case 'v' :
3484
			if (token.equals("varargsCast")) { //$NON-NLS-1$
3485
				this.options.put(
3486
					CompilerOptions.OPTION_ReportVarargsArgumentNeedCast,
3487
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3488
				return;
3489
			}
3490
			break;
3491
		case 'w' :
3492
			if (token.equals("warningToken")) {//$NON-NLS-1$
3493
				this.options.put(
3494
					CompilerOptions.OPTION_ReportUnhandledWarningToken,
3495
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3496
				this.options.put(
3497
					CompilerOptions.OPTION_ReportUnusedWarningToken,
3498
					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
3499
				return;
3500
			}
3501
			break;
3371
	}
3502
	}
3503
	addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
3372
}
3504
}
3373
/**
3505
/**
3374
 * @deprecated - use {@link #initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)} instead
3506
 * @deprecated - use {@link #initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)} instead

Return to bug 246066