Lines 115-120
Link Here
|
115 |
public static final String OPTION_ReportUnusedWarningToken = "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"; //$NON-NLS-1$ |
115 |
public static final String OPTION_ReportUnusedWarningToken = "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"; //$NON-NLS-1$ |
116 |
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ |
116 |
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ |
117 |
public static final String OPTION_FatalOptionalError = "org.eclipse.jdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$ |
117 |
public static final String OPTION_FatalOptionalError = "org.eclipse.jdt.core.compiler.problem.fatalOptionalError"; //$NON-NLS-1$ |
|
|
118 |
public static final String OPTION_PromoteWarningsToErrors = "org.eclipse.jdt.core.compiler.problem.promoteWarningsToErrors"; //$NON-NLS-1$ |
118 |
public static final String OPTION_ReportParameterAssignment = "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$ |
119 |
public static final String OPTION_ReportParameterAssignment = "org.eclipse.jdt.core.compiler.problem.parameterAssignment"; //$NON-NLS-1$ |
119 |
public static final String OPTION_ReportFallthroughCase = "org.eclipse.jdt.core.compiler.problem.fallthroughCase"; //$NON-NLS-1$ |
120 |
public static final String OPTION_ReportFallthroughCase = "org.eclipse.jdt.core.compiler.problem.fallthroughCase"; //$NON-NLS-1$ |
120 |
public static final String OPTION_ReportOverridingMethodWithoutSuperInvocation = "org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation"; //$NON-NLS-1$ |
121 |
public static final String OPTION_ReportOverridingMethodWithoutSuperInvocation = "org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation"; //$NON-NLS-1$ |
Lines 333-338
Link Here
|
333 |
public boolean reportMissingOverrideAnnotationForInterfaceMethodImplementation; |
334 |
public boolean reportMissingOverrideAnnotationForInterfaceMethodImplementation; |
334 |
/** Indicate if annotation processing generates classfiles */ |
335 |
/** Indicate if annotation processing generates classfiles */ |
335 |
public boolean generateClassFiles; |
336 |
public boolean generateClassFiles; |
|
|
337 |
/** Indicate if all warnings should be promoted to errors */ |
338 |
private boolean promoteWarningsToErrors; |
336 |
|
339 |
|
337 |
|
340 |
|
338 |
// keep in sync with warningTokenToIrritant and warningTokenFromIrritant |
341 |
// keep in sync with warningTokenToIrritant and warningTokenFromIrritant |
Lines 860-865
Link Here
|
860 |
optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); |
863 |
optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); |
861 |
optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); |
864 |
optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); |
862 |
optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); |
865 |
optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); |
|
|
866 |
optionsMap.put(OPTION_PromoteWarningsToErrors, this.promoteWarningsToErrors ? ENABLED : DISABLED); |
863 |
if (this.defaultEncoding != null) { |
867 |
if (this.defaultEncoding != null) { |
864 |
optionsMap.put(OPTION_Encoding, this.defaultEncoding); |
868 |
optionsMap.put(OPTION_Encoding, this.defaultEncoding); |
865 |
} |
869 |
} |
Lines 1008-1013
Link Here
|
1008 |
// treat optional error as fatal or just like warning? |
1012 |
// treat optional error as fatal or just like warning? |
1009 |
this.treatOptionalErrorAsFatal = true; |
1013 |
this.treatOptionalErrorAsFatal = true; |
1010 |
|
1014 |
|
|
|
1015 |
// promote all warnings to errors? |
1016 |
this.promoteWarningsToErrors = false; |
1017 |
|
1011 |
// parser perform statements recovery |
1018 |
// parser perform statements recovery |
1012 |
this.performMethodsFullRecovery = true; |
1019 |
this.performMethodsFullRecovery = true; |
1013 |
|
1020 |
|
Lines 1221-1226
Link Here
|
1221 |
this.treatOptionalErrorAsFatal = false; |
1228 |
this.treatOptionalErrorAsFatal = false; |
1222 |
} |
1229 |
} |
1223 |
} |
1230 |
} |
|
|
1231 |
if ((optionValue = optionsMap.get(OPTION_PromoteWarningsToErrors)) != null) { |
1232 |
if (ENABLED.equals(optionValue)) { |
1233 |
this.promoteWarningsToErrors = true; |
1234 |
} else if (DISABLED.equals(optionValue)) { |
1235 |
this.promoteWarningsToErrors = false; |
1236 |
} |
1237 |
} |
1224 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation)) != null) { |
1238 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation)) != null) { |
1225 |
if (ENABLED.equals(optionValue)) { |
1239 |
if (ENABLED.equals(optionValue)) { |
1226 |
this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true; |
1240 |
this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true; |
Lines 1474-1479
Link Here
|
1474 |
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$ |
1488 |
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$ |
1475 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
1489 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
1476 |
buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ |
1490 |
buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ |
|
|
1491 |
buf.append("\n\t- promote warnings to errors: ").append(this.promoteWarningsToErrors ? ENABLED : DISABLED); //$NON-NLS-1$ |
1477 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
1492 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
1478 |
buf.append("\n\t- generate class files: ").append(this.generateClassFiles ? ENABLED : DISABLED); //$NON-NLS-1$ |
1493 |
buf.append("\n\t- generate class files: ").append(this.generateClassFiles ? ENABLED : DISABLED); //$NON-NLS-1$ |
1479 |
buf.append("\n\t- process annotations: ").append(this.processAnnotations ? ENABLED : DISABLED); //$NON-NLS-1$ |
1494 |
buf.append("\n\t- process annotations: ").append(this.processAnnotations ? ENABLED : DISABLED); //$NON-NLS-1$ |