Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-11-13 21:53:26 +0000
committerKaren Butzke2012-11-13 21:53:26 +0000
commit8cf5a294e912792d0f9eabdd88ab080b4c16fd9d (patch)
treebda94727d10f544814b5d81f91d0289ecdc731dd
parente3d87033e0a11aa0803ea2420006e0ad03876e12 (diff)
downloadwebtools.dali-8cf5a294e912792d0f9eabdd88ab080b4c16fd9d.tar.gz
webtools.dali-8cf5a294e912792d0f9eabdd88ab080b4c16fd9d.tar.xz
webtools.dali-8cf5a294e912792d0f9eabdd88ab080b4c16fd9d.zip
log an error if no schema location defined for a particular version
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java
index f66678c21a..0daa0d70f0 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.common.core.internal.plugin.JptCommonCorePlugin;
import org.eclipse.jpt.common.core.internal.utility.translators.EnumeratedValueTranslator;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.wst.common.internal.emf.resource.ConstantAttributeTranslator;
@@ -371,7 +372,11 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
protected abstract HashMap<String, String> schemaLocations();
protected String getSchemaLocationForVersion(String version) {
- return schemaLocations().get(version);
+ String schemaLocation = schemaLocations().get(version);
+ if (schemaLocation == null) {
+ JptCommonCorePlugin.instance().logError(new Throwable("No schema location defined for version: " + version));
+ }
+ return schemaLocation;
}
private static String buildSchemaLocationString(String namespace, String schemaLocation) {

Back to the top