Lines 9-14
Link Here
|
9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
10 |
* Benjamin Muskalla - Contribution for bug 239066 |
10 |
* Benjamin Muskalla - Contribution for bug 239066 |
11 |
* Stephan Herrmann - Contribution for bug 236385 |
11 |
* Stephan Herrmann - Contribution for bug 236385 |
|
|
12 |
* Stephan Herrmann - Contribution for bug 295551 |
12 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
13 |
package org.eclipse.jdt.internal.compiler.impl; |
14 |
package org.eclipse.jdt.internal.compiler.impl; |
14 |
|
15 |
|
Lines 112-117
Link Here
|
112 |
public static final String OPTION_ReportForbiddenReference = "org.eclipse.jdt.core.compiler.problem.forbiddenReference"; //$NON-NLS-1$ |
113 |
public static final String OPTION_ReportForbiddenReference = "org.eclipse.jdt.core.compiler.problem.forbiddenReference"; //$NON-NLS-1$ |
113 |
public static final String OPTION_ReportDiscouragedReference = "org.eclipse.jdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$ |
114 |
public static final String OPTION_ReportDiscouragedReference = "org.eclipse.jdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$ |
114 |
public static final String OPTION_SuppressWarnings = "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$ |
115 |
public static final String OPTION_SuppressWarnings = "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$ |
|
|
116 |
public static final String OPTION_SuppressOptionalErrors = "org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors"; //$NON-NLS-1$ |
115 |
public static final String OPTION_ReportUnhandledWarningToken = "org.eclipse.jdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$ |
117 |
public static final String OPTION_ReportUnhandledWarningToken = "org.eclipse.jdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$ |
116 |
public static final String OPTION_ReportUnusedWarningToken = "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"; //$NON-NLS-1$ |
118 |
public static final String OPTION_ReportUnusedWarningToken = "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"; //$NON-NLS-1$ |
117 |
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ |
119 |
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$ |
Lines 320-327
Link Here
|
320 |
public boolean reportMissingJavadocCommentsOverriding; |
322 |
public boolean reportMissingJavadocCommentsOverriding; |
321 |
/** Indicate whether the JSR bytecode should be inlined to avoid its presence in classfile */ |
323 |
/** Indicate whether the JSR bytecode should be inlined to avoid its presence in classfile */ |
322 |
public boolean inlineJsrBytecode; |
324 |
public boolean inlineJsrBytecode; |
323 |
/** Indicate if @SuppressWarning annotation are activated */ |
325 |
/** Indicate if @SuppressWarning annotations are activated */ |
324 |
public boolean suppressWarnings; |
326 |
public boolean suppressWarnings; |
|
|
327 |
/** Indicate if @SuppressWarning annotations should also suppress optional errors */ |
328 |
public boolean suppressOptionalErrors; |
325 |
/** Specify if should treat optional error as fatal or just like warning */ |
329 |
/** Specify if should treat optional error as fatal or just like warning */ |
326 |
public boolean treatOptionalErrorAsFatal; |
330 |
public boolean treatOptionalErrorAsFatal; |
327 |
/** Specify if parser should perform structural recovery in methods */ |
331 |
/** Specify if parser should perform structural recovery in methods */ |
Lines 884-889
Link Here
|
884 |
optionsMap.put(OPTION_ReportPotentialNullReference, getSeverityString(PotentialNullReference)); |
888 |
optionsMap.put(OPTION_ReportPotentialNullReference, getSeverityString(PotentialNullReference)); |
885 |
optionsMap.put(OPTION_ReportRedundantNullCheck, getSeverityString(RedundantNullCheck)); |
889 |
optionsMap.put(OPTION_ReportRedundantNullCheck, getSeverityString(RedundantNullCheck)); |
886 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
890 |
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED); |
|
|
891 |
optionsMap.put(OPTION_SuppressOptionalErrors, this.suppressOptionalErrors ? ENABLED : DISABLED); |
887 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
892 |
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken)); |
888 |
optionsMap.put(OPTION_ReportUnusedWarningToken, getSeverityString(UnusedWarningToken)); |
893 |
optionsMap.put(OPTION_ReportUnusedWarningToken, getSeverityString(UnusedWarningToken)); |
889 |
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); |
894 |
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment)); |
Lines 1014-1019
Link Here
|
1014 |
// suppress warning annotation |
1019 |
// suppress warning annotation |
1015 |
this.suppressWarnings = true; |
1020 |
this.suppressWarnings = true; |
1016 |
|
1021 |
|
|
|
1022 |
// suppress also optional errors |
1023 |
this.suppressOptionalErrors = false; |
1024 |
|
1017 |
// treat optional error as non fatal |
1025 |
// treat optional error as non fatal |
1018 |
this.treatOptionalErrorAsFatal = false; |
1026 |
this.treatOptionalErrorAsFatal = false; |
1019 |
|
1027 |
|
Lines 1225-1230
Link Here
|
1225 |
this.suppressWarnings = false; |
1233 |
this.suppressWarnings = false; |
1226 |
} |
1234 |
} |
1227 |
} |
1235 |
} |
|
|
1236 |
if ((optionValue = optionsMap.get(OPTION_SuppressOptionalErrors)) != null) { |
1237 |
if (ENABLED.equals(optionValue)) { |
1238 |
this.suppressOptionalErrors = true; |
1239 |
} else if (DISABLED.equals(optionValue)) { |
1240 |
this.suppressOptionalErrors = false; |
1241 |
} |
1242 |
} |
1228 |
if ((optionValue = optionsMap.get(OPTION_FatalOptionalError)) != null) { |
1243 |
if ((optionValue = optionsMap.get(OPTION_FatalOptionalError)) != null) { |
1229 |
if (ENABLED.equals(optionValue)) { |
1244 |
if (ENABLED.equals(optionValue)) { |
1230 |
this.treatOptionalErrorAsFatal = true; |
1245 |
this.treatOptionalErrorAsFatal = true; |
Lines 1482-1487
Link Here
|
1482 |
buf.append("\n\t- missing @Deprecated annotation: ").append(getSeverityString(MissingDeprecatedAnnotation)); //$NON-NLS-1$ |
1497 |
buf.append("\n\t- missing @Deprecated annotation: ").append(getSeverityString(MissingDeprecatedAnnotation)); //$NON-NLS-1$ |
1483 |
buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$ |
1498 |
buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$ |
1484 |
buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$ |
1499 |
buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$ |
|
|
1500 |
buf.append("\n\t- suppress optional errors: ").append(this.suppressOptionalErrors ? ENABLED : DISABLED); //$NON-NLS-1$ |
1485 |
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ |
1501 |
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$ |
1486 |
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$ |
1502 |
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$ |
1487 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |
1503 |
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$ |