diff options
author | Nitin Dahyabhai | 2016-05-12 00:36:25 +0000 |
---|---|---|
committer | Nitin Dahyabhai | 2016-05-12 00:36:25 +0000 |
commit | 2f211d389cd9ca667d5dc46ef6df05f4ee294b79 (patch) | |
tree | 49fe28ea5515ab40e606f6091dd61fd3bec1dac4 | |
parent | aaa2e3c9166e7d82ae4a8650cf39eb02027fe3f7 (diff) | |
download | webtools.sourceediting-2f211d389cd9ca667d5dc46ef6df05f4ee294b79.tar.gz webtools.sourceediting-2f211d389cd9ca667d5dc46ef6df05f4ee294b79.tar.xz webtools.sourceediting-2f211d389cd9ca667d5dc46ef6df05f4ee294b79.zip |
[491313] Allow user to ignore 'Referenced file contains errors' validation errors
Correct regression in o.e.w.xml.validation.tests.internal.HonourAllSchemaLocationsTest.testCanTurnOffHonourAllSchemaLocations()
2 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java index 4fad19bf9f..53fa9b482f 100644 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java +++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2011 IBM Corporation and others. + * Copyright (c) 2005, 2016 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 @@ -61,6 +61,7 @@ public class XMLCorePreferenceInitializer extends AbstractPreferenceInitializer node.putBoolean(XMLCorePreferenceNames.WARN_NO_GRAMMAR, true); // 1 = IMarker.SEVERITY_WARNING node.putInt(XMLCorePreferenceNames.INDICATE_NO_GRAMMAR, 1); + node.putInt(XMLCorePreferenceNames.INDICATE_REFERENCED_FILE_CONTAINS_ERRORS, 2); node.putInt(XMLCorePreferenceNames.INDICATE_NO_DOCUMENT_ELEMENT, -1); // ignore node.putBoolean(XMLCorePreferenceNames.USE_XINCLUDE, false); node.putBoolean(XMLCorePreferenceNames.HONOUR_ALL_SCHEMA_LOCATIONS, true); diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/HonourAllSchemaLocationsTest.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/HonourAllSchemaLocationsTest.java index e332d2e587..662d6428af 100644 --- a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/HonourAllSchemaLocationsTest.java +++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/HonourAllSchemaLocationsTest.java @@ -19,7 +19,6 @@ import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.wst.xml.core.internal.XMLCorePlugin; import org.eclipse.wst.xml.core.internal.preferences.XMLCorePreferenceNames; import org.eclipse.wst.xml.core.internal.validation.XMLValidationConfiguration; -import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage; /** @@ -61,15 +60,15 @@ public class HonourAllSchemaLocationsTest extends BaseTestCase List keys = new ArrayList(); keys.add(null); keys.add("cvc-complex-type.2.4.d"); //$NON-NLS-1$ - int numErrors = 1; + int numErrors = 2; int numWarnings = 0; runTest(testFile, keys, numErrors, numWarnings); } - public void testCanTurnOnReferencedFileErrors() { + public void testCanTurnOffReferencedFileErrors() { String qualifier = XMLCorePlugin.getDefault().getBundle().getSymbolicName(); - InstanceScope.INSTANCE.getNode(qualifier).putInt(XMLCorePreferenceNames.INDICATE_REFERENCED_FILE_CONTAINS_ERRORS, ValidationMessage.SEV_NORMAL); + InstanceScope.INSTANCE.getNode(qualifier).putInt(XMLCorePreferenceNames.INDICATE_REFERENCED_FILE_CONTAINS_ERRORS, 0); try { try { configuration.setFeature(XMLValidationConfiguration.HONOUR_ALL_SCHEMA_LOCATIONS, false); @@ -81,7 +80,7 @@ public class HonourAllSchemaLocationsTest extends BaseTestCase List keys = new ArrayList(); keys.add(null); keys.add("cvc-complex-type.2.4.d"); //$NON-NLS-1$ - int numErrors = 2; + int numErrors = 1; int numWarnings = 0; runTest(testFile, keys, numErrors, numWarnings); |