summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-11-13 16:53:26 (EST)
committerKaren Butzke2012-11-13 16:53:26 (EST)
commit8cf5a294e912792d0f9eabdd88ab080b4c16fd9d (patch)
treebda94727d10f544814b5d81f91d0289ecdc731dd
parente3d87033e0a11aa0803ea2420006e0ad03876e12 (diff)
downloadwebtools.dali-8cf5a294e912792d0f9eabdd88ab080b4c16fd9d.zip
webtools.dali-8cf5a294e912792d0f9eabdd88ab080b4c16fd9d.tar.gz
webtools.dali-8cf5a294e912792d0f9eabdd88ab080b4c16fd9d.tar.bz2
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 f66678c..0daa0d7 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) {