summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2014-02-20 12:53:18 (EST)
committerNick Sandonato2014-02-26 23:29:01 (EST)
commitddac7fbec1298f11023805860115f9d92b54ef30 (patch)
tree68918c7b3c8f6915258670a23be4ba7054841554
parent28e9a12b3f4388ee4d5ac42da76ea391ecd1ce2b (diff)
downloadwebtools.sourceediting-ddac7fbec1298f11023805860115f9d92b54ef30.zip
webtools.sourceediting-ddac7fbec1298f11023805860115f9d92b54ef30.tar.gz
webtools.sourceediting-ddac7fbec1298f11023805860115f9d92b54ef30.tar.bz2
[428013] [regression] Web->HTML Files->Validation preference page doesn't saves the new severity valuesv201402270431
The severity values change/save is restored The project re-validation is not requested after 'Apply' is pressed Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java31
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java3
2 files changed, 22 insertions, 12 deletions
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java
index 3e14f55..b707d1d 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 IBM Corporation and others.
+ * Copyright (c) 2008, 2014 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
@@ -475,23 +475,28 @@ public class HTMLValidationPreferencePage extends AbstractValidationSettingsPage
if (text.length() == 0)
return true;
+ String[] names = text.split(","); //$NON-NLS-1$
boolean valid = true;
- for (int i = 0; valid && i < text.length(); i++) {
- if (!Character.isJavaIdentifierPart(text.charAt(i)) &&
- '-' != text.charAt(i) && '_' != text.charAt(i) &&
- '*' != text.charAt(i) && '?' != text.charAt(i) &&
- ',' != text.charAt(i))
- valid = false;
+ for (int i = 0; names != null && i < names.length; i++) {
+ String name = names[i] == null ? null : names[i].trim();
+ if (name != null && name.length() > 0) {
+ for (int j = 0; valid && j < name.length(); j++) {
+ if (!Character.isJavaIdentifierPart(name.charAt(j)) &&
+ '-' != name.charAt(j) && '_' != name.charAt(j) &&
+ '*' != name.charAt(j) && '?' != name.charAt(j))
+ valid = false;
+ }
+ }
}
if (!valid) {
setErrorMessage(NLS.bind(HTMLUIMessages.BadIgnoreAttributeNamesPattern, text));
setValid(false);
- }
- else {
+ } else {
setErrorMessage(null);
setValid(true);
}
+
return valid;
}
@@ -509,6 +514,8 @@ public class HTMLValidationPreferencePage extends AbstractValidationSettingsPage
fIgnoredAttributeNames.setFocus();
}
}
+ } else {
+ super.controlChanged(widget);
}
}
@@ -537,11 +544,12 @@ public class HTMLValidationPreferencePage extends AbstractValidationSettingsPage
BooleanData ignoreData = (BooleanData)fIgnoreAttributeNames.getData();
contexts[0].getNode(getPreferenceNodeQualifier()).putBoolean(ignoreData.getKey(), ignoreData.getValue());
+ ignoreData.originalValue = ignoreData.getValue();
TextData data = (TextData)fIgnoredAttributeNames.getData();
contexts[0].getNode(getPreferenceNodeQualifier()).put(data.getKey(), data.getValue());
-
-
+ data.originalValue = data.getValue();
+
for(int i = 0; i < contexts.length; i++) {
try {
contexts[i].getNode(getPreferenceNodeQualifier()).flush();
@@ -549,6 +557,7 @@ public class HTMLValidationPreferencePage extends AbstractValidationSettingsPage
Logger.logException(e);
}
}
+
super.storeValues();
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java
index 32fbb58..69e0d42 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2014 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
@@ -228,6 +228,7 @@ public abstract class AbstractValidationSettingsPage extends PropertyPreferenceP
ComboData data = (ComboData) ((Combo)it.next()).getData();
if(data.getKey() != null) {
contexts[0].getNode(getPreferenceNodeQualifier()).putInt(data.getKey(), data.getSeverity());
+ data.originalSeverity = data.getSeverity();
}
}