Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2013-12-27 16:34:14 +0000
committervrubezhny2013-12-27 16:34:14 +0000
commit7c2cd5de0284d710a14949adce66b0a043451423 (patch)
tree8956dc83245a9b42936bedc5d5f3c0d0fbf3f048
parent661227b754eaadfdf47061dc9ec8d087dca82ed6 (diff)
downloadwebtools.jsdt.core-7c2cd5de0284d710a14949adce66b0a043451423.tar.gz
webtools.jsdt.core-7c2cd5de0284d710a14949adce66b0a043451423.tar.xz
webtools.jsdt.core-7c2cd5de0284d710a14949adce66b0a043451423.zip
[424131] JSDT Parser doesn't respect "Enable Semantic Validation" preference valuev201312271639
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