From 135559f09fe49da9ff2fd506e892bd341331558e Mon Sep 17 00:00:00 2001
From: Simon Barner <barner@fortiss.org>
Date: Wed, 1 Oct 2014 16:36:53 +0000
Subject: [PATCH] createStructuralFeatureInstance(): Do not try to create any
 instances for EReferences:   - Contained features are created automatically
 by the generated EFactory   - Non-contained features must be set by the user
 -> Return null in any case refs 1841

---
 .../EStructuralFeatureValueProviderBase.java              | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java
index 13676c691..60b44b365 100644
--- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java
+++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java
@@ -344,13 +344,7 @@ public abstract class EStructuralFeatureValueProviderBase<T extends IAnnotatedSp
 			// Return data types default value
 			return attributeEDataType.getDefaultValue();
 		} else if(structuralFeature instanceof EReference) {
-			EReference reference = (EReference)structuralFeature;
-			if(reference.isContainment()) {
-				// EClasses attached to contained EReferences are created lazily by the
-				// corresponding generated code on the first access (i.e., also during get / "read")
-				return null;
-			}
-			return factory.create(reference.getEReferenceType());
+			return null;
 		} else {
 			throw new Exception(
 					"createStructuralFeatureInstance() is not supported / has not been implemented for the annotation type " +
-- 
GitLab