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 335-340
Link Here
|
335 |
public boolean generateClassFiles; |
336 |
public boolean generateClassFiles; |
336 |
/** Indicate if method bodies should be ignored */ |
337 |
/** Indicate if method bodies should be ignored */ |
337 |
public boolean ignoreMethodBodies; |
338 |
public boolean ignoreMethodBodies; |
|
|
339 |
/** Indicate if all warnings should be promoted to errors */ |
340 |
private boolean promoteWarningsToErrors; |
338 |
|
341 |
|
339 |
// keep in sync with warningTokenToIrritant and warningTokenFromIrritant |
342 |
// keep in sync with warningTokenToIrritant and warningTokenFromIrritant |
340 |
public final static String[] warningTokens = { |
343 |
public final static String[] warningTokens = { |
Lines 861-866
Link Here
|
861 |
optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); |
864 |
optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel)); |
862 |
optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); |
865 |
optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK)); |
863 |
optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); |
866 |
optionsMap.put(OPTION_FatalOptionalError, this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); |
|
|
867 |
optionsMap.put(OPTION_PromoteWarningsToErrors, this.promoteWarningsToErrors ? ENABLED : DISABLED); |
864 |
if (this.defaultEncoding != null) { |
868 |
if (this.defaultEncoding != null) { |
865 |
optionsMap.put(OPTION_Encoding, this.defaultEncoding); |
869 |
optionsMap.put(OPTION_Encoding, this.defaultEncoding); |
866 |
} |
870 |
} |
Lines 1009-1014
Link Here
|
1009 |
// treat optional error as fatal or just like warning? |
1013 |
// treat optional error as fatal or just like warning? |
1010 |
this.treatOptionalErrorAsFatal = true; |
1014 |
this.treatOptionalErrorAsFatal = true; |
1011 |
|
1015 |
|
|
|
1016 |
// promote all warnings to errors? |
1017 |
this.promoteWarningsToErrors = false; |
1018 |
|
1012 |
// parser perform statements recovery |
1019 |
// parser perform statements recovery |
1013 |
this.performMethodsFullRecovery = true; |
1020 |
this.performMethodsFullRecovery = true; |
1014 |
|
1021 |
|
Lines 1224-1229
Link Here
|
1224 |
this.treatOptionalErrorAsFatal = false; |
1231 |
this.treatOptionalErrorAsFatal = false; |
1225 |
} |
1232 |
} |
1226 |
} |
1233 |
} |
|
|
1234 |
if ((optionValue = optionsMap.get(OPTION_PromoteWarningsToErrors)) != null) { |
1235 |
if (ENABLED.equals(optionValue)) { |
1236 |
this.promoteWarningsToErrors = true; |
1237 |
} else if (DISABLED.equals(optionValue)) { |
1238 |
this.promoteWarningsToErrors = false; |
1239 |
} |
1240 |
} |
1227 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation)) != null) { |
1241 |
if ((optionValue = optionsMap.get(OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation)) != null) { |
1228 |
if (ENABLED.equals(optionValue)) { |
1242 |
if (ENABLED.equals(optionValue)) { |
1229 |
this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true; |
1243 |
this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true; |
Lines 1477-1482
Link Here
|
1477 |
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$ |
1491 |
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$ |
1478 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
1492 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
1479 |
buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ |
1493 |
buf.append("\n\t- treat optional error as fatal: ").append(this.treatOptionalErrorAsFatal ? ENABLED : DISABLED); //$NON-NLS-1$ |
|
|
1494 |
buf.append("\n\t- promote warnings to errors: ").append(this.promoteWarningsToErrors ? ENABLED : DISABLED); //$NON-NLS-1$ |
1480 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
1495 |
buf.append("\n\t- parameter assignment: ").append(getSeverityString(ParameterAssignment)); //$NON-NLS-1$ |
1481 |
buf.append("\n\t- generate class files: ").append(this.generateClassFiles ? ENABLED : DISABLED); //$NON-NLS-1$ |
1496 |
buf.append("\n\t- generate class files: ").append(this.generateClassFiles ? ENABLED : DISABLED); //$NON-NLS-1$ |
1482 |
buf.append("\n\t- process annotations: ").append(this.processAnnotations ? ENABLED : DISABLED); //$NON-NLS-1$ |
1497 |
buf.append("\n\t- process annotations: ").append(this.processAnnotations ? ENABLED : DISABLED); //$NON-NLS-1$ |