Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-04-02 03:29:32 +0000
committerStephan Herrmann2010-04-02 03:29:32 +0000
commite5d6be89e15a96492d4f4e9c63a2d2aa53f53492 (patch)
tree61fc9bff256de4278b57515af0df7bcb0a9d75d1 /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl
parent8cb8512b19883a3f28bbacdea5a1c04c9b1ff51e (diff)
downloadorg.eclipse.objectteams-e5d6be89e15a96492d4f4e9c63a2d2aa53f53492.tar.gz
org.eclipse.objectteams-e5d6be89e15a96492d4f4e9c63a2d2aa53f53492.tar.xz
org.eclipse.objectteams-e5d6be89e15a96492d4f4e9c63a2d2aa53f53492.zip
update jdt.core to v_A39 using patch from the corresponding update in old svn for 1.4.0
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index b4ec01ee4..29a4db264 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -10,6 +10,7 @@
* IBM Corporation - initial API and implementation
* Benjamin Muskalla - Contribution for bug 239066
* Stephan Herrmann - Contribution for bug 236385
+ * Stephan Herrmann - Contribution for bug 295551
* Fraunhofer FIRST - extended API and implementation
* Technical University Berlin - extended API and implementation
*******************************************************************************/
@@ -119,6 +120,7 @@ public class CompilerOptions {
public static final String OPTION_ReportForbiddenReference = "org.eclipse.jdt.core.compiler.problem.forbiddenReference"; //$NON-NLS-1$
public static final String OPTION_ReportDiscouragedReference = "org.eclipse.jdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$
public static final String OPTION_SuppressWarnings = "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$
+ public static final String OPTION_SuppressOptionalErrors = "org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors"; //$NON-NLS-1$
public static final String OPTION_ReportUnhandledWarningToken = "org.eclipse.jdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$
public static final String OPTION_ReportUnusedWarningToken = "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"; //$NON-NLS-1$
public static final String OPTION_ReportUnusedLabel = "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$
@@ -401,8 +403,10 @@ public class CompilerOptions {
public boolean reportMissingJavadocCommentsOverriding;
/** Indicate whether the JSR bytecode should be inlined to avoid its presence in classfile */
public boolean inlineJsrBytecode;
- /** Indicate if @SuppressWarning annotation are activated */
+ /** Indicate if @SuppressWarning annotations are activated */
public boolean suppressWarnings;
+ /** Indicate if @SuppressWarning annotations should also suppress optional errors */
+ public boolean suppressOptionalErrors;
/** Specify if should treat optional error as fatal or just like warning */
public boolean treatOptionalErrorAsFatal;
/** Specify if parser should perform structural recovery in methods */
@@ -1127,6 +1131,7 @@ public class CompilerOptions {
optionsMap.put(OPTION_ReportPotentialNullReference, getSeverityString(PotentialNullReference));
optionsMap.put(OPTION_ReportRedundantNullCheck, getSeverityString(RedundantNullCheck));
optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_SuppressOptionalErrors, this.suppressOptionalErrors ? ENABLED : DISABLED);
optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken));
optionsMap.put(OPTION_ReportUnusedWarningToken, getSeverityString(UnusedWarningToken));
optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment));
@@ -1283,6 +1288,9 @@ public class CompilerOptions {
// suppress warning annotation
this.suppressWarnings = true;
+ // suppress also optional errors
+ this.suppressOptionalErrors = false;
+
// treat optional error as non fatal
this.treatOptionalErrorAsFatal = false;
@@ -1494,6 +1502,13 @@ public class CompilerOptions {
this.suppressWarnings = false;
}
}
+ if ((optionValue = optionsMap.get(OPTION_SuppressOptionalErrors)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.suppressOptionalErrors = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.suppressOptionalErrors = false;
+ }
+ }
if ((optionValue = optionsMap.get(OPTION_FatalOptionalError)) != null) {
if (ENABLED.equals(optionValue)) {
this.treatOptionalErrorAsFatal = true;
@@ -1791,6 +1806,7 @@ public class CompilerOptions {
buf.append("\n\t- missing @Deprecated annotation: ").append(getSeverityString(MissingDeprecatedAnnotation)); //$NON-NLS-1$
buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$
buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- suppress optional errors: ").append(this.suppressOptionalErrors ? ENABLED : DISABLED); //$NON-NLS-1$
buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$
buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$
buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$

Back to the top