[564361] support information severity, update test for new default
diff --git a/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF b/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF index a0a4fc4..7b9b212 100755 --- a/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF +++ b/core/bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wst.sse.ui; singleton:=true -Bundle-Version: 1.7.0.qualifier +Bundle-Version: 1.7.100.qualifier Bundle-Activator: org.eclipse.wst.sse.ui.internal.SSEUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -63,13 +63,14 @@ org.eclipse.ui.workbench;bundle-version="[3.117.0,4.0.0)", org.eclipse.ui.forms;bundle-version="[3.7.0,4.0.0)", org.eclipse.ui.views;bundle-version="[3.9.0,4.0.0)", - org.eclipse.wst.sse.core;bundle-version="[1.2.0,1.3.0)", - org.eclipse.core.runtime;bundle-version="[3.14.0,4.0.0)", + org.eclipse.wst.sse.core;bundle-version="[1.2.400,1.3.0)", + org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)", org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)", org.eclipse.core.commands;bundle-version="[3.9.0,4.0.0)", - org.eclipse.wst.validation;bundle-version="[1.2.700,1.3.0)", + org.eclipse.wst.validation;bundle-version="[1.2.800,1.3.0)", org.eclipse.emf.common;bundle-version="[2.14.0,3.0.0)", - org.eclipse.core.expressions;bundle-version="[3.6.0,4.0.0)" + org.eclipse.core.expressions;bundle-version="[3.6.0,4.0.0)", + org.eclipse.ui.genericeditor;bundle-version="[1.1.700,2.0.0)";resolution:=optional Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.wst.sse.ui.internal.propertytester" Eclipse-LazyStart: true Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/core/bundles/org.eclipse.wst.sse.ui/pom.xml b/core/bundles/org.eclipse.wst.sse.ui/pom.xml index 02d527b..1b0ccc0 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/pom.xml +++ b/core/bundles/org.eclipse.wst.sse.ui/pom.xml
@@ -21,7 +21,7 @@ <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.wst.sse.ui</artifactId> - <version>1.7.0-SNAPSHOT</version> + <version>1.7.100-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> <build>
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java index 7f8e806..afb0bec 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2014 IBM Corporation and others. + * Copyright (c) 2011, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -55,8 +55,8 @@ */ public abstract class AbstractValidationSettingsPage extends PropertyPreferencePage { - private List fCombos; - protected List fExpandables; + private List<Combo> fCombos; + protected List<ExpandableComposite> fExpandables; private SelectionListener fSelectionListener; @@ -97,13 +97,13 @@ * @param severity the severity level */ public void setSeverity(int severity) { - for(int i = 0; fSeverities != null && i < fSeverities.length; i++) { - if(fSeverities[i] == severity) { + for (int i = 0; fSeverities != null && i < fSeverities.length; i++) { + if (fSeverities[i] == severity) { fIndex = i; return; } } - + fIndex = -1; } @@ -118,8 +118,8 @@ public AbstractValidationSettingsPage() { super(); - fCombos = new ArrayList(); - fExpandables = new ArrayList(); + fCombos = new ArrayList<>(); + fExpandables = new ArrayList<>(); fPreferencesService = Platform.getPreferencesService(); fValidation = ValidationFramework.getDefault(); } @@ -177,16 +177,18 @@ makeScrollableCompositeAware(comboBox); int severity = -1; - if(key != null) + if (key != null) { severity = fPreferencesService.getInt(getPreferenceNodeQualifier(), key, ValidationMessage.WARNING, createPreferenceScopes()); + } - if (severity == ValidationMessage.ERROR || severity == ValidationMessage.WARNING || severity == ValidationMessage.IGNORE) { + if (severity == ValidationMessage.ERROR || severity == ValidationMessage.WARNING || severity == ValidationMessage.IGNORE || severity == ValidationMessage.INFORMATION) { data.setSeverity(severity); data.originalSeverity = severity; } - if(data.getIndex() >= 0) + if(data.getIndex() >= 0) { comboBox.select(data.getIndex()); + } fCombos.add(comboBox); return comboBox; @@ -222,12 +224,12 @@ if(fCombos == null || fCombos.size() == 0) return; - Iterator it = fCombos.iterator(); + Iterator<Combo> it = fCombos.iterator(); IScopeContext[] contexts = createPreferenceScopes(); while(it.hasNext()) { - ComboData data = (ComboData) ((Combo)it.next()).getData(); + ComboData data = (ComboData) it.next().getData(); if(data.getKey() != null) { contexts[0].getNode(getPreferenceNodeQualifier()).putInt(data.getKey(), data.getSeverity()); data.originalSeverity = data.getSeverity(); @@ -319,14 +321,14 @@ protected void storeSectionExpansionStates(IDialogSettings section) { for(int i = 0; i < fExpandables.size(); i++) { - ExpandableComposite comp = (ExpandableComposite) fExpandables.get(i); + ExpandableComposite comp = fExpandables.get(i); section.put(SETTINGS_EXPANDED + String.valueOf(i), comp.isExpanded()); } } protected void restoreSectionExpansionStates(IDialogSettings settings) { for (int i= 0; i < fExpandables.size(); i++) { - ExpandableComposite excomposite= (ExpandableComposite) fExpandables.get(i); + ExpandableComposite excomposite= fExpandables.get(i); if (settings == null) { excomposite.setExpanded(i == 0); // only expand the first node by default } else { @@ -338,18 +340,18 @@ protected void resetSeverities() { IEclipsePreferences defaultContext = new DefaultScope().getNode(getPreferenceNodeQualifier()); for(int i = 0; i < fCombos.size(); i++) { - ComboData data = (ComboData)((Combo)fCombos.get(i)).getData(); + ComboData data = (ComboData)fCombos.get(i).getData(); int severity = defaultContext.getInt(data.getKey(), ValidationMessage.WARNING); data.setSeverity(severity); - ((Combo)fCombos.get(i)).select(data.getIndex()); + fCombos.get(i).select(data.getIndex()); } } protected boolean shouldRevalidateOnSettingsChange() { - Iterator it = fCombos.iterator(); + Iterator<Combo> it = fCombos.iterator(); while (it.hasNext()) { - ComboData data = (ComboData) ((Combo) it.next()).getData(); + ComboData data = (ComboData) it.next().getData(); if (data.isChanged()) return true; } @@ -400,7 +402,7 @@ /* Get all of the projects in the workspace */ projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); IEclipsePreferences prefs = null; - List projectList = new ArrayList(); + List<IProject> projectList = new ArrayList<>(); /* Filter out projects that use project-specific settings or have been closed */ for(int i = 0; i < projects.length; i++) { @@ -408,7 +410,7 @@ if(projects[i].isAccessible() && !prefs.getBoolean(getProjectSettingsKey(), false)) projectList.add(projects[i]); } - projects = (IProject[]) projectList.toArray(new IProject[projectList.size()]); + projects = projectList.toArray(new IProject[projectList.size()]); } fValidation.validate(projects, true, false, monitor); }
diff --git a/xml/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF b/xml/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF index d011987..fb7e1fc 100644 --- a/xml/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF +++ b/xml/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wst.xml.core; singleton:=true -Bundle-Version: 1.2.200.qualifier +Bundle-Version: 1.2.300.qualifier Bundle-Activator: org.eclipse.wst.xml.core.internal.XMLCorePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin
diff --git a/xml/bundles/org.eclipse.wst.xml.core/pom.xml b/xml/bundles/org.eclipse.wst.xml.core/pom.xml index f0ed656..496df68 100644 --- a/xml/bundles/org.eclipse.wst.xml.core/pom.xml +++ b/xml/bundles/org.eclipse.wst.xml.core/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.wst.xml.core</artifactId> - <version>1.2.200-SNAPSHOT</version> + <version>1.2.300-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfiguration.java b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfiguration.java index b4f756d..35d0eea 100644 --- a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfiguration.java +++ b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfiguration.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2012 IBM Corporation and others. + * Copyright (c) 2006, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -13,6 +13,8 @@ *******************************************************************************/ package org.eclipse.wst.xml.core.internal.validation; +import org.eclipse.wst.sse.core.internal.validate.ValidationMessage; + /** * An XML validation configuration allows setting specific configuration * information for a WTP XML validation run. Any features and properties @@ -33,7 +35,7 @@ private boolean warn_no_grammar_value = false; // 1 = Warning, 2 = Error, 0/-1 = Ignore - private int indicate_no_grammar_value = 1; + private int indicate_no_grammar_value = ValidationMessage.IGNORE; private boolean use_xinclude = false; private boolean honour_all_schema_locations_value = false; private int indicate_no_document_value = 0;
diff --git a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java index 77e8fa1..dc41d4b 100644 --- a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java +++ b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
@@ -47,6 +47,7 @@ import org.apache.xerces.xni.parser.XMLEntityResolver; import org.apache.xerces.xni.parser.XMLInputSource; import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; @@ -58,6 +59,7 @@ import org.eclipse.osgi.util.NLS; import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; import org.eclipse.wst.common.uriresolver.internal.util.URIHelper; +import org.eclipse.wst.sse.core.internal.validate.ValidationMessage; import org.eclipse.wst.validation.ValidationResult; import org.eclipse.wst.validation.internal.ValOperation; import org.eclipse.wst.validation.internal.operations.LocalizedMessage; @@ -373,13 +375,15 @@ Thread.currentThread().setContextClassLoader(originalClzLoader); } - if(configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR) > 0 && + if(configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR) > ValidationMessage.IGNORE && valinfo.isValid() && !isGrammarEncountered) { - if(configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR) == 1) + if(configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR) == IMarker.SEVERITY_WARNING) valinfo.addWarning(XMLValidationMessages._WARN_NO_GRAMMAR, 1, 0, uri, NO_GRAMMAR_FOUND, null); - else // 2 + else if (configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR) == IMarker.SEVERITY_ERROR) // 2 valinfo.addError(XMLValidationMessages._WARN_NO_GRAMMAR, 1, 0, uri, NO_GRAMMAR_FOUND, null); + else + valinfo.addInfo(XMLValidationMessages._WARN_NO_GRAMMAR, 1, 0, uri, NO_GRAMMAR_FOUND, null); } if(configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_DOCUMENT_ELEMENT) > 0 && valinfo.isValid() && !helper.isDocumentElementEncountered) { if(configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_DOCUMENT_ELEMENT) == 1)
diff --git a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/AbstractNestedValidator.java b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/AbstractNestedValidator.java index d9f9f28..5887888 100644 --- a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/AbstractNestedValidator.java +++ b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/AbstractNestedValidator.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2012 IBM Corporation and others. + * Copyright (c) 2006, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -399,7 +399,7 @@ } /** - * Create markers for the valiation messages generated from the validation. + * Create markers for the validation messages generated from the validation. * * @param iFile * The resource to create the markers on. @@ -421,7 +421,7 @@ LocalizedMessage message; if (validationMessage.getSeverity() == ValidationMessage.SEV_LOW) { - message = new LocalizedMessage(IMessage.NORMAL_SEVERITY, + message = new LocalizedMessage(IMessage.LOW_SEVERITY, validationMessage.getMessage(), iFile); } else
diff --git a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java index 2b1bed7..69131a7 100644 --- a/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java +++ b/xml/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2019 IBM Corporation and others. + * Copyright (c) 2001, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -44,6 +44,7 @@ private boolean WRAPPER_ERROR_SUPPORT_ENABLED = true; public static final int SEV_ERROR = 0; public static final int SEV_WARNING = 1; + public static final int SEV_INFO = 2; private String validating_file_uri = null; private URL validating_file_url = null; @@ -115,6 +116,25 @@ } /** + * + * Add an informational message. + * + * @param message The message to add. + * @param line The line location of the message. + * @param column The column location of the message. + * @param uri The URI of the file that contains the message. + * @param key The key for the message. + * @param messageArguments more information about the error + */ + public void addInfo(String message, int line, int column, String uri, String key, Object[] messageArguments) + { + if(addMessage(message, line, column, uri, SEV_INFO, key, messageArguments)) + { + valid = false; + } + } + + /** * Add a warning message. * * @param message The string message of the warning.
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF b/xml/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF index c66d972..0f253db 100755 --- a/xml/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF +++ b/xml/bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wst.xml.ui; singleton:=true -Bundle-Version: 1.2.400.qualifier +Bundle-Version: 1.2.500.qualifier Bundle-Activator: org.eclipse.wst.xml.ui.internal.XMLUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -54,16 +54,16 @@ org.eclipse.ui.views;bundle-version="[3.9.0,4.0.0)", org.eclipse.jface.text;bundle-version="[3.13.0,4.0.0)", org.eclipse.ui.workbench.texteditor;bundle-version="[3.10.0,4.0.0)", - org.eclipse.wst.sse.ui;bundle-version="[1.7.0,2.0.0)", - org.eclipse.wst.sse.core;bundle-version="[1.2.0,1.3.0)", + org.eclipse.wst.sse.ui;bundle-version="[1.7.100,2.0.0)", + org.eclipse.wst.sse.core;bundle-version="[1.2.400,1.3.0)", org.eclipse.ui;bundle-version="[3.109.0,4.0.0)", org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.14.0,4.0.0)", org.eclipse.wst.common.uriresolver;bundle-version="[1.2.300,2.0.0)", org.eclipse.wst.xml.core;bundle-version="[1.2.0,1.3.0)", - org.eclipse.wst.common.ui;bundle-version="[1.1.500,1.2.0)", - org.eclipse.wst.validation;bundle-version="[1.2.700,1.3.0)", - org.eclipse.wst.validation.ui;bundle-version="[1.2.500,1.3.0)", + org.eclipse.wst.common.ui;bundle-version="[1.1.500,2.0.0)", + org.eclipse.wst.validation;bundle-version="[1.2.800,1.3.0)", + org.eclipse.wst.validation.ui;bundle-version="[1.2.700,1.3.0)", org.eclipse.core.expressions;bundle-version="[3.6.0,4.0.0)", org.eclipse.core.filesystem;bundle-version="[1.7.0,2.0.0)" Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.wst.xml.ui.internal.validation.core.errorinfo,org.eclipse.wst.xml.ui.internal.editor.propertytester"
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/about.mappings b/xml/bundles/org.eclipse.wst.xml.ui/about.mappings index bddaab4..d56f960 100644 --- a/xml/bundles/org.eclipse.wst.xml.ui/about.mappings +++ b/xml/bundles/org.eclipse.wst.xml.ui/about.mappings
@@ -3,4 +3,5 @@ # java.io.Properties file (ISO 8859-1 with "\" escapes) # This file does not need to be translated. -0=@build@ \ No newline at end of file +0=@build@ +
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/pom.xml b/xml/bundles/org.eclipse.wst.xml.ui/pom.xml index e01cda2..78a7e80 100755 --- a/xml/bundles/org.eclipse.wst.xml.ui/pom.xml +++ b/xml/bundles/org.eclipse.wst.xml.ui/pom.xml
@@ -21,7 +21,7 @@ <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.wst.xml.ui</artifactId> - <version>1.2.400-SNAPSHOT</version> + <version>1.2.500-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> <build>
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java index 9bf73a3..025e0d0 100644 --- a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java +++ b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
@@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2005, 2019 IBM Corporation and others. All rights reserved. This + * Copyright (c) 2005, 2020 IBM Corporation and others. All rights reserved. This * program and the accompanying materials are made available under the terms of * the Eclipse Public License 2.0 which accompanies this distribution, and is * available at https://www.eclipse.org/legal/epl-2.0/ @@ -337,6 +337,7 @@ public static String MarkupValidation_files; public static String Severity_error; public static String Severity_warning; + public static String Severity_information; public static String Severity_ignore; public static String Empty_element_tag; public static String End_tag_with_attributes;
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties index 64fb9a7..b4ab787 100644 --- a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties +++ b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
@@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2001, 2017 IBM Corporation and others. +# Copyright (c) 2001, 2020 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 # which accompanies this distribution, and is available at @@ -365,6 +365,7 @@ MarkupValidation_files=&Enable markup validation Severity_error=Error Severity_warning=Warning +Severity_information=Information Severity_ignore=Ignore Empty_element_tag=Invalid e&mpty element tag: End_tag_with_attributes=Invalid end &tag with attributes:
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLValidatorPreferencePage.java b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLValidatorPreferencePage.java index d4abae5..281c7f6 100644 --- a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLValidatorPreferencePage.java +++ b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLValidatorPreferencePage.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2017 IBM Corporation and others. + * Copyright (c) 2001, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -95,10 +95,14 @@ private static final String[] MARKUP_SEVERITIES = { XMLUIMessages.Severity_error, XMLUIMessages.Severity_warning, XMLUIMessages.Severity_ignore }; + private static final int[] NO_GRAMMAR_XML_SEVERITIES = { ValidationMessage.ERROR, ValidationMessage.WARNING, ValidationMessage.INFORMATION, ValidationMessage.IGNORE }; + + private static final String[] NO_GRAMMAR_MESSAGE_SEVERITIES = { XMLUIMessages.Severity_error, XMLUIMessages.Severity_warning, XMLUIMessages.Severity_information, XMLUIMessages.Severity_ignore }; + protected void createContentsForValidatingGroup(Composite validatingGroup) { if (fIndicateNoGrammar == null) - fIndicateNoGrammar = addComboBox(validatingGroup, XMLUIMessages.Indicate_no_grammar_specified, XMLCorePreferenceNames.INDICATE_NO_GRAMMAR, XML_SEVERITIES, MARKUP_SEVERITIES, 0); + fIndicateNoGrammar = addComboBox(validatingGroup, XMLUIMessages.Indicate_no_grammar_specified, XMLCorePreferenceNames.INDICATE_NO_GRAMMAR, NO_GRAMMAR_XML_SEVERITIES, NO_GRAMMAR_MESSAGE_SEVERITIES, 0); if (fIndicateReferencedFileError == null) { fIndicateReferencedFileError = addComboBox(validatingGroup, XMLUIMessages.Indicate_referenced_file_error,
diff --git a/xml/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF b/xml/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF index ed8caeb..222dafe 100644 --- a/xml/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF +++ b/xml/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.wst.xml.validation.tests;singleton:=true -Bundle-Version: 1.1.0.qualifier +Bundle-Version: 1.1.100.qualifier Bundle-Activator: org.eclipse.wst.xml.validation.tests.internal.XMLValidatorTestsPlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin @@ -12,6 +12,7 @@ org.eclipse.wst.xml.validation.tests.internal;x-internal:=true Require-Bundle: org.junit;bundle-version=3.8.2, org.eclipse.core.runtime, + org.eclipse.wst.sse.core, org.eclipse.wst.xml.core, org.eclipse.wst.xml.ui, org.eclipse.wst.validation,
diff --git a/xml/tests/org.eclipse.wst.xml.validation.tests/pom.xml b/xml/tests/org.eclipse.wst.xml.validation.tests/pom.xml index a3120f0..87fea22 100644 --- a/xml/tests/org.eclipse.wst.xml.validation.tests/pom.xml +++ b/xml/tests/org.eclipse.wst.xml.validation.tests/pom.xml
@@ -21,7 +21,7 @@ <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.wst.xml.validation.tests</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.100-SNAPSHOT</version> <packaging>eclipse-test-plugin</packaging> <properties>
diff --git a/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfigurationTest.java b/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfigurationTest.java index 0aa4c57..b0f6958 100644 --- a/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfigurationTest.java +++ b/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfigurationTest.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2017 IBM Corporation and others. + * Copyright (c) 2006, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -12,6 +12,8 @@ *******************************************************************************/ package org.eclipse.wst.xml.core.internal.validation; +import org.eclipse.wst.sse.core.internal.validate.ValidationMessage; + import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; @@ -136,7 +138,7 @@ { try { - assertEquals("The INDICATE_NO_GRAMMAR feature is not set by default to Ignore.", 1, configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR)); + assertEquals("The INDICATE_NO_GRAMMAR feature is not set by default to Ignore.", ValidationMessage.IGNORE, configuration.getIntFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR)); } catch(Exception e) {