Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2013-12-27 16:34:14 +0000
committervrubezhny2013-12-27 16:36:51 +0000
commitb863132bb1b9e8fce80b3e48f3257d429731efee (patch)
treef418e27a682a8adcbc20e976f1efac12294b0558
parent82adbeaf56d8745878638ec4b126de0375a3b9b9 (diff)
downloadwebtools.jsdt.core-b863132bb1b9e8fce80b3e48f3257d429731efee.tar.gz
webtools.jsdt.core-b863132bb1b9e8fce80b3e48f3257d429731efee.tar.xz
webtools.jsdt.core-b863132bb1b9e8fce80b3e48f3257d429731efee.zip
[424131] JSDT Parser doesn't respect "Enable Semantic Validation" preference valuev201312271640
Problem reported is made to respect Enable Semantic Validation preference value for the preferences, so the problems market as ProblemSeverities.Optional (configurable problems) aren't reported in case of Semantic Validation is disabled. Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r--bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java
index 4a6c38b9..47ee20b4 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/problem/ProblemReporter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -528,13 +528,13 @@ public void cannotReturnOutsideFunction(ASTNode location) {
* to indicate that this problem is configurable through options
*/
public int computeSeverity(int problemID){
-
-
/*
* If semantic validation is not enabled and this is anything but a
* syntax, documentation, or task problem, ignore.
*/
- if (!this.options.enableSemanticValidation && (problemID & IProblem.Syntax) == 0 && (problemID & IProblem.Javadoc) == 0 && problemID != IProblem.Task) {
+ if (!this.options.enableSemanticValidation &&
+ ((problemID & ProblemSeverities.Optional) != 0 ||
+ ((problemID & IProblem.Syntax) == 0 && (problemID & IProblem.Javadoc) == 0 && problemID != IProblem.Task))) {
return ProblemSeverities.Ignore;
}

Back to the top