[129964] Regenerating with updated subset/superset constraint enforcement.
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AbstractionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AbstractionImpl.java
index 64df6bc..75bba33 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AbstractionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AbstractionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: AbstractionImpl.java,v 1.12 2006/02/22 23:49:05 khussey Exp $
+ * $Id: AbstractionImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -215,8 +215,7 @@
 			case UMLPackage.ABSTRACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ABSTRACTION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ABSTRACTION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ABSTRACTION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ABSTRACTION__CLIENT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AcceptEventActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AcceptEventActionImpl.java
index c11e3fd..dbdc672 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AcceptEventActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AcceptEventActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: AcceptEventActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: AcceptEventActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -310,11 +310,9 @@
 			case UMLPackage.ACCEPT_EVENT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ACCEPT_EVENT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.ACCEPT_EVENT_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ACCEPT_EVENT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ACCEPT_EVENT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.ACCEPT_EVENT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionImpl.java
index 5b8cf2d..89ae3fc 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActionImpl.java,v 1.18 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ActionImpl.java,v 1.19 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -374,11 +374,9 @@
 			case UMLPackage.ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ACTION__ACTIVITY :
-				return eBasicSetContainer(null, UMLPackage.ACTION__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionInputPinImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionInputPinImpl.java
index 5daf00a..57e1e2b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionInputPinImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActionInputPinImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActionInputPinImpl.java,v 1.17 2006/02/22 23:07:15 khussey Exp $
+ * $Id: ActionInputPinImpl.java,v 1.18 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -260,11 +260,9 @@
 			case UMLPackage.ACTION_INPUT_PIN__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ACTION_INPUT_PIN__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTION_INPUT_PIN__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ACTION_INPUT_PIN__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTION_INPUT_PIN__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.ACTION_INPUT_PIN__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityEdgeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityEdgeImpl.java
index 9e00836..8661c12 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityEdgeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityEdgeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActivityEdgeImpl.java,v 1.15 2006/02/22 23:07:15 khussey Exp $
+ * $Id: ActivityEdgeImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -167,6 +167,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetActivity(Activity newActivity,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newActivity,
+			UMLPackage.ACTIVITY_EDGE__ACTIVITY, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setActivity(Activity newActivity) {
 		if (newActivity != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_EDGE__ACTIVITY && newActivity != null)) {
@@ -179,8 +192,7 @@
 			if (newActivity != null)
 				msgs = ((InternalEObject) newActivity).eInverseAdd(this,
 					UMLPackage.ACTIVITY__EDGE, Activity.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newActivity,
-				UMLPackage.ACTIVITY_EDGE__ACTIVITY, msgs);
+			msgs = basicSetActivity(newActivity, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -249,6 +261,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInStructuredNode(
+			StructuredActivityNode newInStructuredNode, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInStructuredNode,
+			UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInStructuredNode(StructuredActivityNode newInStructuredNode) {
 		if (newInStructuredNode != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE && newInStructuredNode != null)) {
@@ -262,8 +287,7 @@
 				msgs = ((InternalEObject) newInStructuredNode).eInverseAdd(
 					this, UMLPackage.STRUCTURED_ACTIVITY_NODE__EDGE,
 					StructuredActivityNode.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInStructuredNode,
-				UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE, msgs);
+			msgs = basicSetInStructuredNode(newInStructuredNode, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -843,13 +867,12 @@
 			case UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(
+					(StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.ACTIVITY_EDGE__ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_EDGE__ACTIVITY, msgs);
+				return basicSetActivity((Activity) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -887,11 +910,9 @@
 			case UMLPackage.ACTIVITY_EDGE__INTERRUPTS :
 				return basicSetInterrupts(null, msgs);
 			case UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_EDGE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ACTIVITY_EDGE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_EDGE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityGroupImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityGroupImpl.java
index 96ba375..0494fbd 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityGroupImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityGroupImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActivityGroupImpl.java,v 1.12 2006/02/22 20:48:16 khussey Exp $
+ * $Id: ActivityGroupImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -221,6 +221,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInActivity(Activity newInActivity,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInActivity,
+			UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInActivity(Activity newInActivity) {
 		if (newInActivity != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY && newInActivity != null)) {
@@ -233,8 +246,7 @@
 			if (newInActivity != null)
 				msgs = ((InternalEObject) newInActivity).eInverseAdd(this,
 					UMLPackage.ACTIVITY__GROUP, Activity.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInActivity,
-				UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY, msgs);
+			msgs = basicSetInActivity(newInActivity, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -289,8 +301,7 @@
 			case UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY, msgs);
+				return basicSetInActivity((Activity) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -310,8 +321,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_GROUP__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityImpl.java
index cdc0565..5cba8fe 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActivityImpl.java,v 1.23 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ActivityImpl.java,v 1.24 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -637,8 +637,8 @@
 			case UMLPackage.ACTIVITY__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.ACTIVITY__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.ACTIVITY__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -726,8 +726,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ACTIVITY__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ACTIVITY__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ACTIVITY__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityNodeImpl.java
index 50bf0d0..5c7142f 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActivityNodeImpl.java,v 1.13 2006/02/22 20:48:16 khussey Exp $
+ * $Id: ActivityNodeImpl.java,v 1.14 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -234,6 +234,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInStructuredNode(
+			StructuredActivityNode newInStructuredNode, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInStructuredNode,
+			UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInStructuredNode(StructuredActivityNode newInStructuredNode) {
 		if (newInStructuredNode != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE && newInStructuredNode != null)) {
@@ -247,8 +260,7 @@
 				msgs = ((InternalEObject) newInStructuredNode).eInverseAdd(
 					this, UMLPackage.STRUCTURED_ACTIVITY_NODE__NODE,
 					StructuredActivityNode.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInStructuredNode,
-				UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE, msgs);
+			msgs = basicSetInStructuredNode(newInStructuredNode, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -274,6 +286,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetActivity(Activity newActivity,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newActivity,
+			UMLPackage.ACTIVITY_NODE__ACTIVITY, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setActivity(Activity newActivity) {
 		if (newActivity != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_NODE__ACTIVITY && newActivity != null)) {
@@ -286,8 +311,7 @@
 			if (newActivity != null)
 				msgs = ((InternalEObject) newActivity).eInverseAdd(this,
 					UMLPackage.ACTIVITY__NODE, Activity.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newActivity,
-				UMLPackage.ACTIVITY_NODE__ACTIVITY, msgs);
+			msgs = basicSetActivity(newActivity, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -442,13 +466,12 @@
 			case UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(
+					(StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.ACTIVITY_NODE__ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_NODE__ACTIVITY, msgs);
+				return basicSetActivity((Activity) otherEnd, msgs);
 			case UMLPackage.ACTIVITY_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings())
 					.basicAdd(otherEnd, msgs);
@@ -485,11 +508,9 @@
 			case UMLPackage.ACTIVITY_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ACTIVITY_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.ACTIVITY_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityPartitionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityPartitionImpl.java
index bab6e73..32efe0e 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityPartitionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ActivityPartitionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ActivityPartitionImpl.java,v 1.16 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ActivityPartitionImpl.java,v 1.17 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -279,6 +279,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInActivity(Activity newInActivity,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInActivity,
+			UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInActivity(Activity newInActivity) {
 		if (newInActivity != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY && newInActivity != null)) {
@@ -291,8 +304,7 @@
 			if (newInActivity != null)
 				msgs = ((InternalEObject) newInActivity).eInverseAdd(this,
 					UMLPackage.ACTIVITY__GROUP, Activity.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInActivity,
-				UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY, msgs);
+			msgs = basicSetInActivity(newInActivity, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -524,6 +536,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetSuperPartition(
+			ActivityPartition newSuperPartition, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newSuperPartition,
+			UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setSuperPartition(ActivityPartition newSuperPartition) {
 		if (newSuperPartition != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION && newSuperPartition != null)) {
@@ -537,8 +562,7 @@
 				msgs = ((InternalEObject) newSuperPartition).eInverseAdd(this,
 					UMLPackage.ACTIVITY_PARTITION__SUBPARTITION,
 					ActivityPartition.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newSuperPartition,
-				UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION, msgs);
+			msgs = basicSetSuperPartition(newSuperPartition, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -689,8 +713,7 @@
 			case UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY, msgs);
+				return basicSetInActivity((Activity) otherEnd, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__NODE :
 				return ((InternalEList) getNodes()).basicAdd(otherEnd, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__SUBPARTITION :
@@ -699,8 +722,8 @@
 			case UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION, msgs);
+				return basicSetSuperPartition((ActivityPartition) otherEnd,
+					msgs);
 			case UMLPackage.ACTIVITY_PARTITION__EDGE :
 				return ((InternalEList) getEdges()).basicAdd(otherEnd, msgs);
 		}
@@ -727,16 +750,14 @@
 			case UMLPackage.ACTIVITY_PARTITION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_PARTITION__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__NODE :
 				return ((InternalEList) getNodes()).basicRemove(otherEnd, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__SUBPARTITION :
 				return ((InternalEList) getSubpartitions()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION :
-				return eBasicSetContainer(null,
-					UMLPackage.ACTIVITY_PARTITION__SUPER_PARTITION, msgs);
+				return basicSetSuperPartition(null, msgs);
 			case UMLPackage.ACTIVITY_PARTITION__EDGE :
 				return ((InternalEList) getEdges()).basicRemove(otherEnd, msgs);
 		}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddStructuralFeatureValueActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddStructuralFeatureValueActionImpl.java
index 5c94101..dce0ceb 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddStructuralFeatureValueActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddStructuralFeatureValueActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: AddStructuralFeatureValueActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: AddStructuralFeatureValueActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -327,14 +327,9 @@
 			case UMLPackage.ADD_STRUCTURAL_FEATURE_VALUE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ADD_STRUCTURAL_FEATURE_VALUE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.ADD_STRUCTURAL_FEATURE_VALUE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ADD_STRUCTURAL_FEATURE_VALUE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ADD_STRUCTURAL_FEATURE_VALUE_ACTION__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.ADD_STRUCTURAL_FEATURE_VALUE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddVariableValueActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddVariableValueActionImpl.java
index 5566809..f8a0c89 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddVariableValueActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AddVariableValueActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: AddVariableValueActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: AddVariableValueActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -302,12 +302,9 @@
 			case UMLPackage.ADD_VARIABLE_VALUE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.ADD_VARIABLE_VALUE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.ADD_VARIABLE_VALUE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.ADD_VARIABLE_VALUE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.ADD_VARIABLE_VALUE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.ADD_VARIABLE_VALUE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ArtifactImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ArtifactImpl.java
index d3323eb..88a274d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ArtifactImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ArtifactImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ArtifactImpl.java,v 1.20 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ArtifactImpl.java,v 1.21 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -631,8 +631,8 @@
 			case UMLPackage.ARTIFACT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ARTIFACT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.ARTIFACT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.ARTIFACT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -698,8 +698,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ARTIFACT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ARTIFACT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ARTIFACT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ARTIFACT__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationClassImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationClassImpl.java
index b502772..c3395e5 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationClassImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationClassImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: AssociationClassImpl.java,v 1.20 2006/02/22 23:49:05 khussey Exp $
+ * $Id: AssociationClassImpl.java,v 1.21 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -593,9 +593,8 @@
 			case UMLPackage.ASSOCIATION_CLASS__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ASSOCIATION_CLASS__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.ASSOCIATION_CLASS__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.ASSOCIATION_CLASS__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -675,9 +674,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ASSOCIATION_CLASS__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ASSOCIATION_CLASS__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ASSOCIATION_CLASS__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ASSOCIATION_CLASS__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationImpl.java
index 67c9eb0..d05c165 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/AssociationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: AssociationImpl.java,v 1.20 2006/02/22 23:49:05 khussey Exp $
+ * $Id: AssociationImpl.java,v 1.21 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -544,8 +544,8 @@
 			case UMLPackage.ASSOCIATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ASSOCIATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.ASSOCIATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.ASSOCIATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -617,8 +617,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ASSOCIATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ASSOCIATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ASSOCIATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ASSOCIATION__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehaviorImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehaviorImpl.java
index 8110212..7f9f857 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehaviorImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehaviorImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: BehaviorImpl.java,v 1.22 2006/02/22 23:49:05 khussey Exp $
+ * $Id: BehaviorImpl.java,v 1.23 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -693,8 +693,8 @@
 			case UMLPackage.BEHAVIOR__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.BEHAVIOR__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.BEHAVIOR__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.BEHAVIOR__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -773,8 +773,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.BEHAVIOR__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.BEHAVIOR__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.BEHAVIOR__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.BEHAVIOR__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehavioredClassifierImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehavioredClassifierImpl.java
index 1296747..205967c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehavioredClassifierImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/BehavioredClassifierImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: BehavioredClassifierImpl.java,v 1.21 2006/02/22 23:49:05 khussey Exp $
+ * $Id: BehavioredClassifierImpl.java,v 1.22 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -28,6 +28,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
@@ -270,10 +272,6 @@
 	 * @generated
 	 */
 	public void setClassifierBehavior(Behavior newClassifierBehavior) {
-		if (newClassifierBehavior != null
-			&& !getOwnedBehaviors().contains(newClassifierBehavior)) {
-			getOwnedBehaviors().add(newClassifierBehavior);
-		}
 		Behavior classifierBehavior = newClassifierBehavior;
 		Object oldClassifierBehavior = eVirtualSet(
 			UMLPackage.BEHAVIORED_CLASSIFIER__CLASSIFIER_BEHAVIOR,
@@ -285,6 +283,15 @@
 					? null
 					: oldClassifierBehavior, classifierBehavior));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newClassifierBehavior != null) {
+				EList ownedBehavior = getOwnedBehaviors();
+				if (!ownedBehavior.contains(newClassifierBehavior)) {
+					ownedBehavior.add(newClassifierBehavior);
+				}
+			}
+		}
 	}
 
 	/**
@@ -469,10 +476,8 @@
 			case UMLPackage.BEHAVIORED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.BEHAVIORED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.BEHAVIORED_CLASSIFIER__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.BEHAVIORED_CLASSIFIER__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -543,10 +548,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.BEHAVIORED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.BEHAVIORED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.BEHAVIORED_CLASSIFIER__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.BEHAVIORED_CLASSIFIER__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallActionImpl.java
index f3b3815..2350540 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: CallActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: CallActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -261,11 +261,9 @@
 			case UMLPackage.CALL_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CALL_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.CALL_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.CALL_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CALL_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.CALL_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallOperationActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallOperationActionImpl.java
index 516ba5f..0cd83d6 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallOperationActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CallOperationActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: CallOperationActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: CallOperationActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -340,11 +340,9 @@
 			case UMLPackage.CALL_OPERATION_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CALL_OPERATION_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.CALL_OPERATION_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.CALL_OPERATION_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CALL_OPERATION_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.CALL_OPERATION_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ChangeEventImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ChangeEventImpl.java
index b7247ae..d5ae913 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ChangeEventImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ChangeEventImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ChangeEventImpl.java,v 1.12 2006/02/22 23:07:15 khussey Exp $
+ * $Id: ChangeEventImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -223,8 +223,7 @@
 			case UMLPackage.CHANGE_EVENT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CHANGE_EVENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.CHANGE_EVENT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.CHANGE_EVENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.CHANGE_EVENT__CHANGE_EXPRESSION :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassImpl.java
index 5ba9832..3678663 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ClassImpl.java,v 1.27 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ClassImpl.java,v 1.28 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -30,6 +30,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -310,10 +312,6 @@
 	 * @generated
 	 */
 	public void setClassifierBehavior(Behavior newClassifierBehavior) {
-		if (newClassifierBehavior != null
-			&& !getOwnedBehaviors().contains(newClassifierBehavior)) {
-			getOwnedBehaviors().add(newClassifierBehavior);
-		}
 		Behavior classifierBehavior = newClassifierBehavior;
 		Object oldClassifierBehavior = eVirtualSet(
 			UMLPackage.CLASS__CLASSIFIER_BEHAVIOR, classifierBehavior);
@@ -324,6 +322,15 @@
 					? null
 					: oldClassifierBehavior, classifierBehavior));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newClassifierBehavior != null) {
+				EList ownedBehavior = getOwnedBehaviors();
+				if (!ownedBehavior.contains(newClassifierBehavior)) {
+					ownedBehavior.add(newClassifierBehavior);
+				}
+			}
+		}
 	}
 
 	/**
@@ -1164,8 +1171,8 @@
 			case UMLPackage.CLASS__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CLASS__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.CLASS__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.CLASS__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -1237,8 +1244,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.CLASS__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.CLASS__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.CLASS__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.CLASS__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java
index 9b55bd1..6aded83 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ClassifierImpl.java,v 1.29 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ClassifierImpl.java,v 1.30 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -24,11 +24,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
@@ -384,10 +385,16 @@
 
 		msgs = basicSetTemplateParameterGen(newTemplateParameter, msgs);
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwningTemplateParameter(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+
+				setOwningTemplateParameter(null);
+			}
 		}
 
 		return msgs;
@@ -456,9 +463,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -473,9 +501,8 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs);
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -483,10 +510,6 @@
 				UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -1455,10 +1478,6 @@
 	 * @generated
 	 */
 	public void setRepresentation(CollaborationUse newRepresentation) {
-		if (newRepresentation != null
-			&& !getCollaborationUses().contains(newRepresentation)) {
-			getCollaborationUses().add(newRepresentation);
-		}
 		CollaborationUse representation = newRepresentation;
 		Object oldRepresentation = eVirtualSet(
 			UMLPackage.CLASSIFIER__REPRESENTATION, representation);
@@ -1469,6 +1488,15 @@
 					? null
 					: oldRepresentation, representation));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newRepresentation != null) {
+				EList collaborationUse = getCollaborationUses();
+				if (!collaborationUse.contains(newRepresentation)) {
+					collaborationUse.add(newRepresentation);
+				}
+			}
+		}
 	}
 
 	/**
@@ -1896,8 +1924,8 @@
 			case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -1963,8 +1991,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.CLASSIFIER__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierTemplateParameterImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierTemplateParameterImpl.java
index 5bfdac1..65fc592 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierTemplateParameterImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClassifierTemplateParameterImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ClassifierTemplateParameterImpl.java,v 1.13 2006/02/21 16:12:18 khussey Exp $
+ * $Id: ClassifierTemplateParameterImpl.java,v 1.14 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -26,6 +26,7 @@
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.Resource;
 
 import org.eclipse.uml2.uml.Classifier;
 import org.eclipse.uml2.uml.ClassifierTemplateParameter;
@@ -300,10 +301,16 @@
 
 		msgs = basicSetParameteredElementGen(newParameteredElement, msgs);
 
-		if (eVirtualGet(UMLPackage.CLASSIFIER_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != null
-			&& eVirtualGet(UMLPackage.CLASSIFIER_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != newParameteredElement) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwnedParameteredElement(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Object ownedParameteredElement = eVirtualGet(UMLPackage.CLASSIFIER_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT);
+
+			if (ownedParameteredElement != null
+				&& ownedParameteredElement != newParameteredElement) {
+
+				setOwnedParameteredElement(null);
+			}
 		}
 
 		return msgs;
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClearAssociationActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClearAssociationActionImpl.java
index 019227f..999ecbc 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClearAssociationActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ClearAssociationActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ClearAssociationActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ClearAssociationActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -311,12 +311,9 @@
 			case UMLPackage.CLEAR_ASSOCIATION_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CLEAR_ASSOCIATION_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.CLEAR_ASSOCIATION_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.CLEAR_ASSOCIATION_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CLEAR_ASSOCIATION_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.CLEAR_ASSOCIATION_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CollaborationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CollaborationImpl.java
index eab5dd6..df02fe8 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CollaborationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CollaborationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: CollaborationImpl.java,v 1.20 2006/02/22 23:49:06 khussey Exp $
+ * $Id: CollaborationImpl.java,v 1.21 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -502,8 +502,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.COLLABORATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.COLLABORATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.COLLABORATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.COLLABORATION__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CombinedFragmentImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CombinedFragmentImpl.java
index 6250ddb..bbe78a2 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CombinedFragmentImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CombinedFragmentImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: CombinedFragmentImpl.java,v 1.12 2006/02/22 23:49:05 khussey Exp $
+ * $Id: CombinedFragmentImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -334,11 +334,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.COMBINED_FRAGMENT__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.COMBINED_FRAGMENT__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.COMBINED_FRAGMENT__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.COMBINED_FRAGMENT__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand(null, msgs);
 			case UMLPackage.COMBINED_FRAGMENT__OPERAND :
 				return ((InternalEList) getOperands()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentImpl.java
index 087ade9..64f6270 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ComponentImpl.java,v 1.21 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ComponentImpl.java,v 1.22 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -470,8 +470,8 @@
 			case UMLPackage.COMPONENT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.COMPONENT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.COMPONENT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.COMPONENT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -546,8 +546,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.COMPONENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.COMPONENT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.COMPONENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.COMPONENT__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentRealizationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentRealizationImpl.java
index cb51343..3a8433b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentRealizationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ComponentRealizationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ComponentRealizationImpl.java,v 1.11 2006/02/21 16:12:18 khussey Exp $
+ * $Id: ComponentRealizationImpl.java,v 1.12 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -23,6 +23,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -144,10 +146,29 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setAbstraction(Component newAbstraction) {
-		if (newAbstraction != null && !getClients().contains(newAbstraction)) {
-			getClients().add(newAbstraction);
+	public NotificationChain basicSetAbstraction(Component newAbstraction,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newAbstraction,
+			UMLPackage.COMPONENT_REALIZATION__ABSTRACTION, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newAbstraction != null) {
+				EList client = getClients();
+				if (!client.contains(newAbstraction)) {
+					client.add(newAbstraction);
+				}
+			}
 		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setAbstraction(Component newAbstraction) {
 		if (newAbstraction != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.COMPONENT_REALIZATION__ABSTRACTION && newAbstraction != null)) {
 			if (EcoreUtil.isAncestor(this, newAbstraction))
@@ -159,8 +180,7 @@
 			if (newAbstraction != null)
 				msgs = ((InternalEObject) newAbstraction).eInverseAdd(this,
 					UMLPackage.COMPONENT__REALIZATION, Component.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newAbstraction,
-				UMLPackage.COMPONENT_REALIZATION__ABSTRACTION, msgs);
+			msgs = basicSetAbstraction(newAbstraction, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -208,10 +228,6 @@
 	 * @generated
 	 */
 	public void setRealizingClassifier(Classifier newRealizingClassifier) {
-		if (newRealizingClassifier != null
-			&& !getSuppliers().contains(newRealizingClassifier)) {
-			getSuppliers().add(newRealizingClassifier);
-		}
 		Classifier realizingClassifier = newRealizingClassifier;
 		Object oldRealizingClassifier = eVirtualSet(
 			UMLPackage.COMPONENT_REALIZATION__REALIZING_CLASSIFIER,
@@ -223,6 +239,15 @@
 					? null
 					: oldRealizingClassifier, realizingClassifier));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newRealizingClassifier != null) {
+				EList supplier = getSuppliers();
+				if (!supplier.contains(newRealizingClassifier)) {
+					supplier.add(newRealizingClassifier);
+				}
+			}
+		}
 	}
 
 	/**
@@ -242,10 +267,8 @@
 			case UMLPackage.COMPONENT_REALIZATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.COMPONENT_REALIZATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.COMPONENT_REALIZATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.COMPONENT_REALIZATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -260,8 +283,7 @@
 			case UMLPackage.COMPONENT_REALIZATION__ABSTRACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.COMPONENT_REALIZATION__ABSTRACTION, msgs);
+				return basicSetAbstraction((Component) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -286,10 +308,7 @@
 			case UMLPackage.COMPONENT_REALIZATION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.COMPONENT_REALIZATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.COMPONENT_REALIZATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.COMPONENT_REALIZATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.COMPONENT_REALIZATION__CLIENT :
@@ -298,8 +317,7 @@
 			case UMLPackage.COMPONENT_REALIZATION__MAPPING :
 				return basicSetMapping(null, msgs);
 			case UMLPackage.COMPONENT_REALIZATION__ABSTRACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.COMPONENT_REALIZATION__ABSTRACTION, msgs);
+				return basicSetAbstraction(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConditionalNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConditionalNodeImpl.java
index 338d642..3e119c5 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConditionalNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConditionalNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ConditionalNodeImpl.java,v 1.14 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ConditionalNodeImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -342,11 +342,9 @@
 			case UMLPackage.CONDITIONAL_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CONDITIONAL_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.CONDITIONAL_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.CONDITIONAL_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CONDITIONAL_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.CONDITIONAL_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
@@ -378,8 +376,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.CONDITIONAL_NODE__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CONDITIONAL_NODE__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.CONDITIONAL_NODE__VARIABLE :
 				return ((InternalEList) getVariables()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementImpl.java
index dba7c87..968aa1b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ConnectableElementImpl.java,v 1.12 2006/02/21 16:12:17 khussey Exp $
+ * $Id: ConnectableElementImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -19,11 +19,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
@@ -146,10 +147,16 @@
 
 		msgs = basicSetTemplateParameterGen(newTemplateParameter, msgs);
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwningTemplateParameter(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+
+				setOwningTemplateParameter(null);
+			}
 		}
 
 		return msgs;
@@ -218,9 +225,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.CONNECTABLE_ELEMENT__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -235,9 +263,8 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -245,10 +272,6 @@
 				UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.CONNECTABLE_ELEMENT__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -302,9 +325,8 @@
 			case UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.CONNECTABLE_ELEMENT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.CONNECTABLE_ELEMENT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -340,9 +362,7 @@
 			case UMLPackage.CONNECTABLE_ELEMENT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.CONNECTABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.CONNECTABLE_ELEMENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.CONNECTABLE_ELEMENT__END :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementTemplateParameterImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementTemplateParameterImpl.java
index 93f568a..5e599bd 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementTemplateParameterImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectableElementTemplateParameterImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ConnectableElementTemplateParameterImpl.java,v 1.10 2006/02/21 16:12:17 khussey Exp $
+ * $Id: ConnectableElementTemplateParameterImpl.java,v 1.11 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -21,6 +21,7 @@
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.Resource;
 
 import org.eclipse.uml2.uml.ConnectableElement;
 import org.eclipse.uml2.uml.ConnectableElementTemplateParameter;
@@ -134,10 +135,16 @@
 
 		msgs = basicSetParameteredElementGen(newParameteredElement, msgs);
 
-		if (eVirtualGet(UMLPackage.CONNECTABLE_ELEMENT_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != null
-			&& eVirtualGet(UMLPackage.CONNECTABLE_ELEMENT_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != newParameteredElement) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwnedParameteredElement(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Object ownedParameteredElement = eVirtualGet(UMLPackage.CONNECTABLE_ELEMENT_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT);
+
+			if (ownedParameteredElement != null
+				&& ownedParameteredElement != newParameteredElement) {
+
+				setOwnedParameteredElement(null);
+			}
 		}
 
 		return msgs;
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectionPointReferenceImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectionPointReferenceImpl.java
index 29e2cc7..149b46d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectionPointReferenceImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConnectionPointReferenceImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ConnectionPointReferenceImpl.java,v 1.11 2006/02/22 20:48:15 khussey Exp $
+ * $Id: ConnectionPointReferenceImpl.java,v 1.12 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -178,6 +178,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetState(State newState,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newState,
+			UMLPackage.CONNECTION_POINT_REFERENCE__STATE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setState(State newState) {
 		if (newState != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.CONNECTION_POINT_REFERENCE__STATE && newState != null)) {
@@ -190,8 +203,7 @@
 			if (newState != null)
 				msgs = ((InternalEObject) newState).eInverseAdd(this,
 					UMLPackage.STATE__CONNECTION, State.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newState,
-				UMLPackage.CONNECTION_POINT_REFERENCE__STATE, msgs);
+			msgs = basicSetState(newState, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -246,13 +258,11 @@
 			case UMLPackage.CONNECTION_POINT_REFERENCE__CONTAINER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CONNECTION_POINT_REFERENCE__CONTAINER, msgs);
+				return basicSetContainer((Region) otherEnd, msgs);
 			case UMLPackage.CONNECTION_POINT_REFERENCE__STATE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CONNECTION_POINT_REFERENCE__STATE, msgs);
+				return basicSetState((State) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -283,11 +293,9 @@
 				return ((InternalEList) getIncomings()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.CONNECTION_POINT_REFERENCE__CONTAINER :
-				return eBasicSetContainer(null,
-					UMLPackage.CONNECTION_POINT_REFERENCE__CONTAINER, msgs);
+				return basicSetContainer(null, msgs);
 			case UMLPackage.CONNECTION_POINT_REFERENCE__STATE :
-				return eBasicSetContainer(null,
-					UMLPackage.CONNECTION_POINT_REFERENCE__STATE, msgs);
+				return basicSetState(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConstraintImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConstraintImpl.java
index 1f627e0..0df3444 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConstraintImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ConstraintImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ConstraintImpl.java,v 1.12 2006/02/22 23:07:14 khussey Exp $
+ * $Id: ConstraintImpl.java,v 1.13 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -240,6 +240,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetContext(Namespace newContext,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newContext,
+			UMLPackage.CONSTRAINT__CONTEXT, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setContext(Namespace newContext) {
 		if (newContext != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.CONSTRAINT__CONTEXT && newContext != null)) {
@@ -252,8 +265,7 @@
 			if (newContext != null)
 				msgs = ((InternalEObject) newContext).eInverseAdd(this,
 					UMLPackage.NAMESPACE__OWNED_RULE, Namespace.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newContext,
-				UMLPackage.CONSTRAINT__CONTEXT, msgs);
+			msgs = basicSetContext(newContext, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -333,8 +345,8 @@
 			case UMLPackage.CONSTRAINT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CONSTRAINT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.CONSTRAINT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.CONSTRAINT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -347,8 +359,7 @@
 			case UMLPackage.CONSTRAINT__CONTEXT :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.CONSTRAINT__CONTEXT, msgs);
+				return basicSetContext((Namespace) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -373,15 +384,13 @@
 			case UMLPackage.CONSTRAINT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CONSTRAINT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.CONSTRAINT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.CONSTRAINT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.CONSTRAINT__SPECIFICATION :
 				return basicSetSpecification(null, msgs);
 			case UMLPackage.CONSTRAINT__CONTEXT :
-				return eBasicSetContainer(null, UMLPackage.CONSTRAINT__CONTEXT,
-					msgs);
+				return basicSetContext(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateLinkObjectActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateLinkObjectActionImpl.java
index 69cf76e..e14ea86 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateLinkObjectActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateLinkObjectActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: CreateLinkObjectActionImpl.java,v 1.14 2006/02/22 23:49:05 khussey Exp $
+ * $Id: CreateLinkObjectActionImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -255,12 +255,9 @@
 			case UMLPackage.CREATE_LINK_OBJECT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CREATE_LINK_OBJECT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.CREATE_LINK_OBJECT_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.CREATE_LINK_OBJECT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CREATE_LINK_OBJECT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.CREATE_LINK_OBJECT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateObjectActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateObjectActionImpl.java
index b7632a1..afc7371 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateObjectActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/CreateObjectActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: CreateObjectActionImpl.java,v 1.14 2006/02/22 23:49:05 khussey Exp $
+ * $Id: CreateObjectActionImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -312,11 +312,9 @@
 			case UMLPackage.CREATE_OBJECT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.CREATE_OBJECT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.CREATE_OBJECT_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.CREATE_OBJECT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.CREATE_OBJECT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.CREATE_OBJECT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DataTypeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DataTypeImpl.java
index 035c5e2..ba4003c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DataTypeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DataTypeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: DataTypeImpl.java,v 1.19 2006/02/22 23:49:06 khussey Exp $
+ * $Id: DataTypeImpl.java,v 1.20 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -379,8 +379,8 @@
 			case UMLPackage.DATA_TYPE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.DATA_TYPE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.DATA_TYPE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.DATA_TYPE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -452,8 +452,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.DATA_TYPE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.DATA_TYPE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.DATA_TYPE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.DATA_TYPE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DependencyImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DependencyImpl.java
index 326e63b..736a197 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DependencyImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DependencyImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: DependencyImpl.java,v 1.11 2006/02/22 20:48:16 khussey Exp $
+ * $Id: DependencyImpl.java,v 1.12 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -230,8 +230,8 @@
 			case UMLPackage.DEPENDENCY__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.DEPENDENCY__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.DEPENDENCY__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.DEPENDENCY__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -267,8 +267,7 @@
 			case UMLPackage.DEPENDENCY__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.DEPENDENCY__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.DEPENDENCY__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.DEPENDENCY__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.DEPENDENCY__CLIENT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentImpl.java
index 576daec..64d1f86 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: DeploymentImpl.java,v 1.13 2006/02/22 23:49:06 khussey Exp $
+ * $Id: DeploymentImpl.java,v 1.14 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -24,6 +24,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
@@ -273,10 +275,29 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setLocation(DeploymentTarget newLocation) {
-		if (newLocation != null && !getClients().contains(newLocation)) {
-			getClients().add(newLocation);
+	public NotificationChain basicSetLocation(DeploymentTarget newLocation,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newLocation,
+			UMLPackage.DEPLOYMENT__LOCATION, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newLocation != null) {
+				EList client = getClients();
+				if (!client.contains(newLocation)) {
+					client.add(newLocation);
+				}
+			}
 		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setLocation(DeploymentTarget newLocation) {
 		if (newLocation != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.DEPLOYMENT__LOCATION && newLocation != null)) {
 			if (EcoreUtil.isAncestor(this, newLocation))
@@ -289,8 +310,7 @@
 				msgs = ((InternalEObject) newLocation).eInverseAdd(this,
 					UMLPackage.DEPLOYMENT_TARGET__DEPLOYMENT,
 					DeploymentTarget.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newLocation,
-				UMLPackage.DEPLOYMENT__LOCATION, msgs);
+			msgs = basicSetLocation(newLocation, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -316,8 +336,8 @@
 			case UMLPackage.DEPLOYMENT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.DEPLOYMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.DEPLOYMENT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.DEPLOYMENT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -335,8 +355,7 @@
 			case UMLPackage.DEPLOYMENT__LOCATION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.DEPLOYMENT__LOCATION, msgs);
+				return basicSetLocation((DeploymentTarget) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -361,8 +380,7 @@
 			case UMLPackage.DEPLOYMENT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.DEPLOYMENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.DEPLOYMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.DEPLOYMENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.DEPLOYMENT__CLIENT :
@@ -372,8 +390,7 @@
 				return ((InternalEList) getConfigurations()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.DEPLOYMENT__LOCATION :
-				return eBasicSetContainer(null,
-					UMLPackage.DEPLOYMENT__LOCATION, msgs);
+				return basicSetLocation(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentSpecificationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentSpecificationImpl.java
index 47fc267..4560387 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentSpecificationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DeploymentSpecificationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: DeploymentSpecificationImpl.java,v 1.15 2006/02/21 21:39:47 khussey Exp $
+ * $Id: DeploymentSpecificationImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -228,6 +228,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetDeployment(Deployment newDeployment,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newDeployment,
+			UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setDeployment(Deployment newDeployment) {
 		if (newDeployment != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT && newDeployment != null)) {
@@ -241,8 +254,7 @@
 				msgs = ((InternalEObject) newDeployment).eInverseAdd(this,
 					UMLPackage.DEPLOYMENT__CONFIGURATION, Deployment.class,
 					msgs);
-			msgs = eBasicSetContainer((InternalEObject) newDeployment,
-				UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT, msgs);
+			msgs = basicSetDeployment(newDeployment, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -300,10 +312,8 @@
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.DEPLOYMENT_SPECIFICATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.DEPLOYMENT_SPECIFICATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -341,8 +351,7 @@
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT, msgs);
+				return basicSetDeployment((Deployment) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -376,10 +385,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.DEPLOYMENT_SPECIFICATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__TEMPLATE_BINDING :
@@ -418,8 +424,7 @@
 				return ((InternalEList) getOwnedAttributes()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT :
-				return eBasicSetContainer(null,
-					UMLPackage.DEPLOYMENT_SPECIFICATION__DEPLOYMENT, msgs);
+				return basicSetDeployment(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DestroyObjectActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DestroyObjectActionImpl.java
index 2c51a83..fcdaf89 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DestroyObjectActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/DestroyObjectActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: DestroyObjectActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: DestroyObjectActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -351,11 +351,9 @@
 			case UMLPackage.DESTROY_OBJECT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.DESTROY_OBJECT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.DESTROY_OBJECT_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.DESTROY_OBJECT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.DESTROY_OBJECT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.DESTROY_OBJECT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ElementImportImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ElementImportImpl.java
index a15e4fe..fa3cc10 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ElementImportImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ElementImportImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 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
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ElementImportImpl.java,v 1.9 2005/12/14 22:34:18 khussey Exp $
+ * $Id: ElementImportImpl.java,v 1.10 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -279,6 +279,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetImportingNamespace(
+			Namespace newImportingNamespace, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newImportingNamespace,
+			UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setImportingNamespace(Namespace newImportingNamespace) {
 		if (newImportingNamespace != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE && newImportingNamespace != null)) {
@@ -292,8 +305,7 @@
 				msgs = ((InternalEObject) newImportingNamespace).eInverseAdd(
 					this, UMLPackage.NAMESPACE__ELEMENT_IMPORT,
 					Namespace.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newImportingNamespace,
-				UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE, msgs);
+			msgs = basicSetImportingNamespace(newImportingNamespace, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -359,8 +371,7 @@
 			case UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE, msgs);
+				return basicSetImportingNamespace((Namespace) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -380,8 +391,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE :
-				return eBasicSetContainer(null,
-					UMLPackage.ELEMENT_IMPORT__IMPORTING_NAMESPACE, msgs);
+				return basicSetImportingNamespace(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EncapsulatedClassifierImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EncapsulatedClassifierImpl.java
index 47a8bb7..c9c18b1 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EncapsulatedClassifierImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EncapsulatedClassifierImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: EncapsulatedClassifierImpl.java,v 1.18 2006/02/22 23:49:05 khussey Exp $
+ * $Id: EncapsulatedClassifierImpl.java,v 1.19 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -184,10 +184,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ENCAPSULATED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.ENCAPSULATED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ENCAPSULATED_CLASSIFIER__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ENCAPSULATED_CLASSIFIER__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationImpl.java
index b71aaf6..3c284cc 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: EnumerationImpl.java,v 1.17 2006/02/22 23:49:05 khussey Exp $
+ * $Id: EnumerationImpl.java,v 1.18 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -181,8 +181,8 @@
 			case UMLPackage.ENUMERATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ENUMERATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.ENUMERATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.ENUMERATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -257,8 +257,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ENUMERATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ENUMERATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ENUMERATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ENUMERATION__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationLiteralImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationLiteralImpl.java
index 74a3894..9d509dc 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationLiteralImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/EnumerationLiteralImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: EnumerationLiteralImpl.java,v 1.10 2006/02/21 16:12:17 khussey Exp $
+ * $Id: EnumerationLiteralImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -86,6 +86,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnumeration(Enumeration newEnumeration,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnumeration,
+			UMLPackage.ENUMERATION_LITERAL__ENUMERATION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnumeration(Enumeration newEnumeration) {
 		if (newEnumeration != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.ENUMERATION_LITERAL__ENUMERATION && newEnumeration != null)) {
@@ -99,8 +112,7 @@
 				msgs = ((InternalEObject) newEnumeration).eInverseAdd(this,
 					UMLPackage.ENUMERATION__OWNED_LITERAL, Enumeration.class,
 					msgs);
-			msgs = eBasicSetContainer((InternalEObject) newEnumeration,
-				UMLPackage.ENUMERATION_LITERAL__ENUMERATION, msgs);
+			msgs = basicSetEnumeration(newEnumeration, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -130,9 +142,8 @@
 			case UMLPackage.ENUMERATION_LITERAL__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ENUMERATION_LITERAL__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.ENUMERATION_LITERAL__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.ENUMERATION_LITERAL__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -147,8 +158,7 @@
 			case UMLPackage.ENUMERATION_LITERAL__ENUMERATION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.ENUMERATION_LITERAL__ENUMERATION, msgs);
+				return basicSetEnumeration((Enumeration) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -176,9 +186,7 @@
 				return ((InternalEList) getDeployments()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.ENUMERATION_LITERAL__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.ENUMERATION_LITERAL__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.ENUMERATION_LITERAL__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.ENUMERATION_LITERAL__SLOT :
@@ -186,8 +194,7 @@
 			case UMLPackage.ENUMERATION_LITERAL__SPECIFICATION :
 				return basicSetSpecification(null, msgs);
 			case UMLPackage.ENUMERATION_LITERAL__ENUMERATION :
-				return eBasicSetContainer(null,
-					UMLPackage.ENUMERATION_LITERAL__ENUMERATION, msgs);
+				return basicSetEnumeration(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExceptionHandlerImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExceptionHandlerImpl.java
index d213b38..86a3f0f 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExceptionHandlerImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExceptionHandlerImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExceptionHandlerImpl.java,v 1.9 2006/02/22 20:48:17 khussey Exp $
+ * $Id: ExceptionHandlerImpl.java,v 1.10 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -238,6 +238,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetProtectedNode(
+			ExecutableNode newProtectedNode, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newProtectedNode,
+			UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setProtectedNode(ExecutableNode newProtectedNode) {
 		if (newProtectedNode != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE && newProtectedNode != null)) {
@@ -251,8 +264,7 @@
 				msgs = ((InternalEObject) newProtectedNode).eInverseAdd(this,
 					UMLPackage.EXECUTABLE_NODE__HANDLER, ExecutableNode.class,
 					msgs);
-			msgs = eBasicSetContainer((InternalEObject) newProtectedNode,
-				UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE, msgs);
+			msgs = basicSetProtectedNode(newProtectedNode, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -318,8 +330,7 @@
 			case UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE, msgs);
+				return basicSetProtectedNode((ExecutableNode) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -339,8 +350,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.EXCEPTION_HANDLER__PROTECTED_NODE, msgs);
+				return basicSetProtectedNode(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExecutableNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExecutableNodeImpl.java
index 54ecd81..6b9dcab 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExecutableNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExecutableNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExecutableNodeImpl.java,v 1.12 2006/02/21 16:12:18 khussey Exp $
+ * $Id: ExecutableNodeImpl.java,v 1.13 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -135,13 +135,12 @@
 			case UMLPackage.EXECUTABLE_NODE__IN_STRUCTURED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXECUTABLE_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(
+					(StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.EXECUTABLE_NODE__ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXECUTABLE_NODE__ACTIVITY, msgs);
+				return basicSetActivity((Activity) otherEnd, msgs);
 			case UMLPackage.EXECUTABLE_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings())
 					.basicAdd(otherEnd, msgs);
@@ -180,11 +179,9 @@
 			case UMLPackage.EXECUTABLE_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.EXECUTABLE_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.EXECUTABLE_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.EXECUTABLE_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.EXECUTABLE_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.EXECUTABLE_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionNodeImpl.java
index a2b8da8..c0e9aaf 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExpansionNodeImpl.java,v 1.12 2006/02/21 16:12:17 khussey Exp $
+ * $Id: ExpansionNodeImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -254,13 +254,12 @@
 			case UMLPackage.EXPANSION_NODE__IN_STRUCTURED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXPANSION_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(
+					(StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.EXPANSION_NODE__ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXPANSION_NODE__ACTIVITY, msgs);
+				return basicSetActivity((Activity) otherEnd, msgs);
 			case UMLPackage.EXPANSION_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings())
 					.basicAdd(otherEnd, msgs);
@@ -311,11 +310,9 @@
 			case UMLPackage.EXPANSION_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.EXPANSION_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.EXPANSION_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.EXPANSION_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.EXPANSION_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.EXPANSION_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionRegionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionRegionImpl.java
index 1317218..409573f 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionRegionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpansionRegionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExpansionRegionImpl.java,v 1.13 2006/02/22 20:48:17 khussey Exp $
+ * $Id: ExpansionRegionImpl.java,v 1.14 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -240,13 +240,12 @@
 			case UMLPackage.EXPANSION_REGION__IN_STRUCTURED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXPANSION_REGION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(
+					(StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.EXPANSION_REGION__ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXPANSION_REGION__ACTIVITY, msgs);
+				return basicSetActivity((Activity) otherEnd, msgs);
 			case UMLPackage.EXPANSION_REGION__OUTGOING :
 				return ((InternalEList) getOutgoings())
 					.basicAdd(otherEnd, msgs);
@@ -273,8 +272,7 @@
 			case UMLPackage.EXPANSION_REGION__IN_ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXPANSION_REGION__IN_ACTIVITY, msgs);
+				return basicSetInActivity((Activity) otherEnd, msgs);
 			case UMLPackage.EXPANSION_REGION__VARIABLE :
 				return ((InternalEList) getVariables())
 					.basicAdd(otherEnd, msgs);
@@ -312,11 +310,9 @@
 			case UMLPackage.EXPANSION_REGION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.EXPANSION_REGION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.EXPANSION_REGION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.EXPANSION_REGION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.EXPANSION_REGION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.EXPANSION_REGION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
@@ -348,8 +344,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.EXPANSION_REGION__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.EXPANSION_REGION__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.EXPANSION_REGION__VARIABLE :
 				return ((InternalEList) getVariables()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpressionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpressionImpl.java
index 29447dd..f26464c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpressionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExpressionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExpressionImpl.java,v 1.12 2006/02/22 23:07:14 khussey Exp $
+ * $Id: ExpressionImpl.java,v 1.13 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -241,8 +241,7 @@
 			case UMLPackage.EXPRESSION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.EXPRESSION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.EXPRESSION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.EXPRESSION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.EXPRESSION__OPERAND :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtendImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtendImpl.java
index 3653415..e8e8f03 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtendImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtendImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExtendImpl.java,v 1.13 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ExtendImpl.java,v 1.14 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -378,6 +378,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetExtension(UseCase newExtension,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newExtension,
+			UMLPackage.EXTEND__EXTENSION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setExtension(UseCase newExtension) {
 		if (newExtension != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.EXTEND__EXTENSION && newExtension != null)) {
@@ -390,8 +403,7 @@
 			if (newExtension != null)
 				msgs = ((InternalEObject) newExtension).eInverseAdd(this,
 					UMLPackage.USE_CASE__EXTEND, UseCase.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newExtension,
-				UMLPackage.EXTEND__EXTENSION, msgs);
+			msgs = basicSetExtension(newExtension, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -428,8 +440,7 @@
 			case UMLPackage.EXTEND__EXTENSION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXTEND__EXTENSION, msgs);
+				return basicSetExtension((UseCase) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -456,8 +467,7 @@
 			case UMLPackage.EXTEND__CONDITION :
 				return basicSetCondition(null, msgs);
 			case UMLPackage.EXTEND__EXTENSION :
-				return eBasicSetContainer(null, UMLPackage.EXTEND__EXTENSION,
-					msgs);
+				return basicSetExtension(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtensionPointImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtensionPointImpl.java
index 5a7fcaf..5e36428 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtensionPointImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ExtensionPointImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ExtensionPointImpl.java,v 1.10 2006/02/21 16:12:16 khussey Exp $
+ * $Id: ExtensionPointImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -89,6 +89,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetUseCase(UseCase newUseCase,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newUseCase,
+			UMLPackage.EXTENSION_POINT__USE_CASE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setUseCase(UseCase newUseCase) {
 		if (newUseCase != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.EXTENSION_POINT__USE_CASE && newUseCase != null)) {
@@ -101,8 +114,7 @@
 			if (newUseCase != null)
 				msgs = ((InternalEObject) newUseCase).eInverseAdd(this,
 					UMLPackage.USE_CASE__EXTENSION_POINT, UseCase.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newUseCase,
-				UMLPackage.EXTENSION_POINT__USE_CASE, msgs);
+			msgs = basicSetUseCase(newUseCase, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -138,8 +150,7 @@
 			case UMLPackage.EXTENSION_POINT__USE_CASE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.EXTENSION_POINT__USE_CASE, msgs);
+				return basicSetUseCase((UseCase) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -164,8 +175,7 @@
 			case UMLPackage.EXTENSION_POINT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.EXTENSION_POINT__USE_CASE :
-				return eBasicSetContainer(null,
-					UMLPackage.EXTENSION_POINT__USE_CASE, msgs);
+				return basicSetUseCase(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationImpl.java
index 69d2a07..1af8d55 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: GeneralizationImpl.java,v 1.10 2006/02/22 20:48:17 khussey Exp $
+ * $Id: GeneralizationImpl.java,v 1.11 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -310,6 +310,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetSpecific(Classifier newSpecific,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newSpecific,
+			UMLPackage.GENERALIZATION__SPECIFIC, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setSpecific(Classifier newSpecific) {
 		if (newSpecific != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.GENERALIZATION__SPECIFIC && newSpecific != null)) {
@@ -323,8 +336,7 @@
 				msgs = ((InternalEObject) newSpecific).eInverseAdd(this,
 					UMLPackage.CLASSIFIER__GENERALIZATION, Classifier.class,
 					msgs);
-			msgs = eBasicSetContainer((InternalEObject) newSpecific,
-				UMLPackage.GENERALIZATION__SPECIFIC, msgs);
+			msgs = basicSetSpecific(newSpecific, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -361,8 +373,7 @@
 			case UMLPackage.GENERALIZATION__SPECIFIC :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.GENERALIZATION__SPECIFIC, msgs);
+				return basicSetSpecific((Classifier) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -385,8 +396,7 @@
 				return ((InternalEList) getGeneralizationSets()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.GENERALIZATION__SPECIFIC :
-				return eBasicSetContainer(null,
-					UMLPackage.GENERALIZATION__SPECIFIC, msgs);
+				return basicSetSpecific(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationSetImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationSetImpl.java
index 3ba2cdb..e178655 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationSetImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/GeneralizationSetImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: GeneralizationSetImpl.java,v 1.11 2006/02/22 20:48:16 khussey Exp $
+ * $Id: GeneralizationSetImpl.java,v 1.12 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -327,9 +327,8 @@
 			case UMLPackage.GENERALIZATION_SET__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.GENERALIZATION_SET__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.GENERALIZATION_SET__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.GENERALIZATION_SET__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -373,9 +372,7 @@
 			case UMLPackage.GENERALIZATION_SET__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.GENERALIZATION_SET__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.GENERALIZATION_SET__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.GENERALIZATION_SET__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.GENERALIZATION_SET__POWERTYPE :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/IncludeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/IncludeImpl.java
index bd0b06d..993230d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/IncludeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/IncludeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: IncludeImpl.java,v 1.10 2006/02/21 16:12:17 khussey Exp $
+ * $Id: IncludeImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -186,6 +186,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetIncludingCase(UseCase newIncludingCase,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newIncludingCase,
+			UMLPackage.INCLUDE__INCLUDING_CASE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setIncludingCase(UseCase newIncludingCase) {
 		if (newIncludingCase != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INCLUDE__INCLUDING_CASE && newIncludingCase != null)) {
@@ -198,8 +211,7 @@
 			if (newIncludingCase != null)
 				msgs = ((InternalEObject) newIncludingCase).eInverseAdd(this,
 					UMLPackage.USE_CASE__INCLUDE, UseCase.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newIncludingCase,
-				UMLPackage.INCLUDE__INCLUDING_CASE, msgs);
+			msgs = basicSetIncludingCase(newIncludingCase, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -226,8 +238,7 @@
 			case UMLPackage.INCLUDE__INCLUDING_CASE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INCLUDE__INCLUDING_CASE, msgs);
+				return basicSetIncludingCase((UseCase) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -252,8 +263,7 @@
 			case UMLPackage.INCLUDE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.INCLUDE__INCLUDING_CASE :
-				return eBasicSetContainer(null,
-					UMLPackage.INCLUDE__INCLUDING_CASE, msgs);
+				return basicSetIncludingCase(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java
index bba6155..5d91596 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InstanceSpecificationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InstanceSpecificationImpl.java,v 1.12 2006/02/22 23:07:14 khussey Exp $
+ * $Id: InstanceSpecificationImpl.java,v 1.13 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -24,11 +24,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -150,9 +151,13 @@
 				msgs.add(notification);
 		}
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
-			setOwningTemplateParameter(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+				setOwningTemplateParameter(null);
+			}
 		}
 		return msgs;
 	}
@@ -211,9 +216,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.INSTANCE_SPECIFICATION__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -228,9 +254,7 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER,
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
 				msgs);
 			if (msgs != null)
 				msgs.dispatch();
@@ -239,10 +263,6 @@
 				UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.INSTANCE_SPECIFICATION__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -572,10 +592,8 @@
 			case UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.INSTANCE_SPECIFICATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.INSTANCE_SPECIFICATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -614,10 +632,7 @@
 				return ((InternalEList) getDeployments()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.INSTANCE_SPECIFICATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.INSTANCE_SPECIFICATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.INSTANCE_SPECIFICATION__SLOT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionConstraintImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionConstraintImpl.java
index 0f054d7..2d8d513 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionConstraintImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionConstraintImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InteractionConstraintImpl.java,v 1.13 2006/02/22 23:07:14 khussey Exp $
+ * $Id: InteractionConstraintImpl.java,v 1.14 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -399,17 +399,13 @@
 			case UMLPackage.INTERACTION_CONSTRAINT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.INTERACTION_CONSTRAINT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.INTERACTION_CONSTRAINT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.INTERACTION_CONSTRAINT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.INTERACTION_CONSTRAINT__SPECIFICATION :
 				return basicSetSpecification(null, msgs);
 			case UMLPackage.INTERACTION_CONSTRAINT__CONTEXT :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_CONSTRAINT__CONTEXT, msgs);
+				return basicSetContext(null, msgs);
 			case UMLPackage.INTERACTION_CONSTRAINT__MININT :
 				return basicSetMinint(null, msgs);
 			case UMLPackage.INTERACTION_CONSTRAINT__MAXINT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionFragmentImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionFragmentImpl.java
index 3d963ab..ae1b2c8 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionFragmentImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionFragmentImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InteractionFragmentImpl.java,v 1.12 2006/02/22 23:49:06 khussey Exp $
+ * $Id: InteractionFragmentImpl.java,v 1.13 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -219,6 +219,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnclosingInteraction(
+			Interaction newEnclosingInteraction, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnclosingInteraction,
+			UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnclosingInteraction(Interaction newEnclosingInteraction) {
 		if (newEnclosingInteraction != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION && newEnclosingInteraction != null)) {
@@ -232,9 +245,7 @@
 				msgs = ((InternalEObject) newEnclosingInteraction).eInverseAdd(
 					this, UMLPackage.INTERACTION__FRAGMENT, Interaction.class,
 					msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newEnclosingInteraction,
-				UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION, msgs);
+			msgs = basicSetEnclosingInteraction(newEnclosingInteraction, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -260,6 +271,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnclosingOperand(
+			InteractionOperand newEnclosingOperand, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnclosingOperand,
+			UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnclosingOperand(InteractionOperand newEnclosingOperand) {
 		if (newEnclosingOperand != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND && newEnclosingOperand != null)) {
@@ -273,8 +297,7 @@
 				msgs = ((InternalEObject) newEnclosingOperand).eInverseAdd(
 					this, UMLPackage.INTERACTION_OPERAND__FRAGMENT,
 					InteractionOperand.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newEnclosingOperand,
-				UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND, msgs);
+			msgs = basicSetEnclosingOperand(newEnclosingOperand, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -303,14 +326,13 @@
 			case UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION,
+				return basicSetEnclosingInteraction((Interaction) otherEnd,
 					msgs);
 			case UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand((InteractionOperand) otherEnd,
+					msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -341,12 +363,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_INTERACTION,
-					msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_FRAGMENT__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionImpl.java
index 9ead0da..d95f222 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InteractionImpl.java,v 1.20 2006/02/22 23:49:06 khussey Exp $
+ * $Id: InteractionImpl.java,v 1.21 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -252,6 +252,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnclosingInteraction(
+			Interaction newEnclosingInteraction, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnclosingInteraction,
+			UMLPackage.INTERACTION__ENCLOSING_INTERACTION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnclosingInteraction(Interaction newEnclosingInteraction) {
 		if (newEnclosingInteraction != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERACTION__ENCLOSING_INTERACTION && newEnclosingInteraction != null)) {
@@ -265,9 +278,7 @@
 				msgs = ((InternalEObject) newEnclosingInteraction).eInverseAdd(
 					this, UMLPackage.INTERACTION__FRAGMENT, Interaction.class,
 					msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newEnclosingInteraction,
-				UMLPackage.INTERACTION__ENCLOSING_INTERACTION, msgs);
+			msgs = basicSetEnclosingInteraction(newEnclosingInteraction, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -293,6 +304,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnclosingOperand(
+			InteractionOperand newEnclosingOperand, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnclosingOperand,
+			UMLPackage.INTERACTION__ENCLOSING_OPERAND, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnclosingOperand(InteractionOperand newEnclosingOperand) {
 		if (newEnclosingOperand != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERACTION__ENCLOSING_OPERAND && newEnclosingOperand != null)) {
@@ -306,8 +330,7 @@
 				msgs = ((InternalEObject) newEnclosingOperand).eInverseAdd(
 					this, UMLPackage.INTERACTION_OPERAND__FRAGMENT,
 					InteractionOperand.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newEnclosingOperand,
-				UMLPackage.INTERACTION__ENCLOSING_OPERAND, msgs);
+			msgs = basicSetEnclosingOperand(newEnclosingOperand, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -668,8 +691,8 @@
 			case UMLPackage.INTERACTION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.INTERACTION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.INTERACTION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -720,13 +743,13 @@
 			case UMLPackage.INTERACTION__ENCLOSING_INTERACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction((Interaction) otherEnd,
+					msgs);
 			case UMLPackage.INTERACTION__ENCLOSING_OPERAND :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand((InteractionOperand) otherEnd,
+					msgs);
 			case UMLPackage.INTERACTION__LIFELINE :
 				return ((InternalEList) getLifelines())
 					.basicAdd(otherEnd, msgs);
@@ -768,8 +791,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.INTERACTION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.INTERACTION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.INTERACTION__TEMPLATE_BINDING :
@@ -840,11 +862,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.INTERACTION__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.INTERACTION__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand(null, msgs);
 			case UMLPackage.INTERACTION__LIFELINE :
 				return ((InternalEList) getLifelines()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionOperandImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionOperandImpl.java
index 6fabe1c..d11ba36 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionOperandImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionOperandImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InteractionOperandImpl.java,v 1.13 2006/02/22 23:49:05 khussey Exp $
+ * $Id: InteractionOperandImpl.java,v 1.14 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -235,6 +235,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnclosingInteraction(
+			Interaction newEnclosingInteraction, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnclosingInteraction,
+			UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnclosingInteraction(Interaction newEnclosingInteraction) {
 		if (newEnclosingInteraction != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION && newEnclosingInteraction != null)) {
@@ -248,9 +261,7 @@
 				msgs = ((InternalEObject) newEnclosingInteraction).eInverseAdd(
 					this, UMLPackage.INTERACTION__FRAGMENT, Interaction.class,
 					msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newEnclosingInteraction,
-				UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION, msgs);
+			msgs = basicSetEnclosingInteraction(newEnclosingInteraction, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -276,6 +287,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetEnclosingOperand(
+			InteractionOperand newEnclosingOperand, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newEnclosingOperand,
+			UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setEnclosingOperand(InteractionOperand newEnclosingOperand) {
 		if (newEnclosingOperand != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND && newEnclosingOperand != null)) {
@@ -289,8 +313,7 @@
 				msgs = ((InternalEObject) newEnclosingOperand).eInverseAdd(
 					this, UMLPackage.INTERACTION_OPERAND__FRAGMENT,
 					InteractionOperand.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newEnclosingOperand,
-				UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND, msgs);
+			msgs = basicSetEnclosingOperand(newEnclosingOperand, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -531,13 +554,13 @@
 			case UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction((Interaction) otherEnd,
+					msgs);
 			case UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand((InteractionOperand) otherEnd,
+					msgs);
 			case UMLPackage.INTERACTION_OPERAND__FRAGMENT :
 				return ((InternalEList) getFragments())
 					.basicAdd(otherEnd, msgs);
@@ -580,11 +603,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_OPERAND__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_OPERAND__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand(null, msgs);
 			case UMLPackage.INTERACTION_OPERAND__GUARD :
 				return basicSetGuard(null, msgs);
 			case UMLPackage.INTERACTION_OPERAND__FRAGMENT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionUseImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionUseImpl.java
index 3dc258a..13a83d1 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionUseImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InteractionUseImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InteractionUseImpl.java,v 1.14 2006/02/22 23:49:06 khussey Exp $
+ * $Id: InteractionUseImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -337,11 +337,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.INTERACTION_USE__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_USE__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.INTERACTION_USE__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERACTION_USE__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand(null, msgs);
 			case UMLPackage.INTERACTION_USE__ACTUAL_GATE :
 				return ((InternalEList) getActualGates()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceImpl.java
index af2b181..15216cb 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InterfaceImpl.java,v 1.19 2006/02/22 23:49:05 khussey Exp $
+ * $Id: InterfaceImpl.java,v 1.20 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -726,8 +726,8 @@
 			case UMLPackage.INTERFACE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERFACE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.INTERFACE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.INTERFACE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -796,8 +796,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.INTERFACE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERFACE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.INTERFACE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.INTERFACE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceRealizationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceRealizationImpl.java
index f2690d3..311116c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceRealizationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterfaceRealizationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InterfaceRealizationImpl.java,v 1.11 2006/02/21 16:12:17 khussey Exp $
+ * $Id: InterfaceRealizationImpl.java,v 1.12 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -23,6 +23,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -152,9 +154,6 @@
 	 * @generated
 	 */
 	public void setContract(Interface newContract) {
-		if (newContract != null && !getSuppliers().contains(newContract)) {
-			getSuppliers().add(newContract);
-		}
 		Interface contract = newContract;
 		Object oldContract = eVirtualSet(
 			UMLPackage.INTERFACE_REALIZATION__CONTRACT, contract);
@@ -165,6 +164,15 @@
 					? null
 					: oldContract, contract));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newContract != null) {
+				EList supplier = getSuppliers();
+				if (!supplier.contains(newContract)) {
+					supplier.add(newContract);
+				}
+			}
+		}
 	}
 
 	/**
@@ -194,12 +202,31 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetImplementingClassifier(
+			BehavioredClassifier newImplementingClassifier,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newImplementingClassifier,
+			UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newImplementingClassifier != null) {
+				EList client = getClients();
+				if (!client.contains(newImplementingClassifier)) {
+					client.add(newImplementingClassifier);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setImplementingClassifier(
 			BehavioredClassifier newImplementingClassifier) {
-		if (newImplementingClassifier != null
-			&& !getClients().contains(newImplementingClassifier)) {
-			getClients().add(newImplementingClassifier);
-		}
 		if (newImplementingClassifier != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER && newImplementingClassifier != null)) {
 			if (EcoreUtil.isAncestor(this, newImplementingClassifier))
@@ -214,9 +241,8 @@
 						this,
 						UMLPackage.BEHAVIORED_CLASSIFIER__INTERFACE_REALIZATION,
 						BehavioredClassifier.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newImplementingClassifier,
-				UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER, msgs);
+			msgs = basicSetImplementingClassifier(newImplementingClassifier,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -243,10 +269,8 @@
 			case UMLPackage.INTERFACE_REALIZATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.INTERFACE_REALIZATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.INTERFACE_REALIZATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.INTERFACE_REALIZATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -261,9 +285,8 @@
 			case UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER,
-					msgs);
+				return basicSetImplementingClassifier(
+					(BehavioredClassifier) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -288,10 +311,7 @@
 			case UMLPackage.INTERFACE_REALIZATION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.INTERFACE_REALIZATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.INTERFACE_REALIZATION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.INTERFACE_REALIZATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.INTERFACE_REALIZATION__CLIENT :
@@ -300,9 +320,7 @@
 			case UMLPackage.INTERFACE_REALIZATION__MAPPING :
 				return basicSetMapping(null, msgs);
 			case UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERFACE_REALIZATION__IMPLEMENTING_CLASSIFIER,
-					msgs);
+				return basicSetImplementingClassifier(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterruptibleActivityRegionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterruptibleActivityRegionImpl.java
index dfb7143..b8ad246 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterruptibleActivityRegionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InterruptibleActivityRegionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InterruptibleActivityRegionImpl.java,v 1.11 2006/02/22 20:48:16 khussey Exp $
+ * $Id: InterruptibleActivityRegionImpl.java,v 1.12 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -212,8 +212,7 @@
 			case UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__IN_ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__IN_ACTIVITY, msgs);
+				return basicSetInActivity((Activity) otherEnd, msgs);
 			case UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__NODE :
 				return ((InternalEList) getNodes()).basicAdd(otherEnd, msgs);
 			case UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__INTERRUPTING_EDGE :
@@ -238,8 +237,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__NODE :
 				return ((InternalEList) getNodes()).basicRemove(otherEnd, msgs);
 			case UMLPackage.INTERRUPTIBLE_ACTIVITY_REGION__INTERRUPTING_EDGE :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InvocationActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InvocationActionImpl.java
index 752d4c2..e8c0f54 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InvocationActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/InvocationActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: InvocationActionImpl.java,v 1.16 2006/02/22 23:49:05 khussey Exp $
+ * $Id: InvocationActionImpl.java,v 1.17 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -258,11 +258,9 @@
 			case UMLPackage.INVOCATION_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.INVOCATION_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.INVOCATION_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.INVOCATION_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.INVOCATION_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.INVOCATION_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/JoinNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/JoinNodeImpl.java
index 9596c05..18db5c0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/JoinNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/JoinNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: JoinNodeImpl.java,v 1.15 2006/02/22 23:07:14 khussey Exp $
+ * $Id: JoinNodeImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -294,11 +294,9 @@
 			case UMLPackage.JOIN_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.JOIN_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.JOIN_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.JOIN_NODE__ACTIVITY :
-				return eBasicSetContainer(null, UMLPackage.JOIN_NODE__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.JOIN_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LifelineImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LifelineImpl.java
index 1a76f39..37d8eb0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LifelineImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LifelineImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: LifelineImpl.java,v 1.12 2006/02/22 23:07:15 khussey Exp $
+ * $Id: LifelineImpl.java,v 1.13 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -171,6 +171,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInteraction(Interaction newInteraction,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInteraction,
+			UMLPackage.LIFELINE__INTERACTION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInteraction(Interaction newInteraction) {
 		if (newInteraction != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.LIFELINE__INTERACTION && newInteraction != null)) {
@@ -183,8 +196,7 @@
 			if (newInteraction != null)
 				msgs = ((InternalEObject) newInteraction).eInverseAdd(this,
 					UMLPackage.INTERACTION__LIFELINE, Interaction.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInteraction,
-				UMLPackage.LIFELINE__INTERACTION, msgs);
+			msgs = basicSetInteraction(newInteraction, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -444,8 +456,7 @@
 			case UMLPackage.LIFELINE__INTERACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.LIFELINE__INTERACTION, msgs);
+				return basicSetInteraction((Interaction) otherEnd, msgs);
 			case UMLPackage.LIFELINE__COVERED_BY :
 				return ((InternalEList) getCoveredBys()).basicAdd(otherEnd,
 					msgs);
@@ -473,8 +484,7 @@
 			case UMLPackage.LIFELINE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.LIFELINE__INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.LIFELINE__INTERACTION, msgs);
+				return basicSetInteraction(null, msgs);
 			case UMLPackage.LIFELINE__SELECTOR :
 				return basicSetSelector(null, msgs);
 			case UMLPackage.LIFELINE__COVERED_BY :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LinkActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LinkActionImpl.java
index 138cc65..9ed53a0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LinkActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LinkActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: LinkActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: LinkActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -274,11 +274,9 @@
 			case UMLPackage.LINK_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.LINK_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.LINK_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.LINK_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.LINK_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.LINK_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LoopNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LoopNodeImpl.java
index 5268209..7983395 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LoopNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/LoopNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: LoopNodeImpl.java,v 1.17 2006/02/22 23:49:06 khussey Exp $
+ * $Id: LoopNodeImpl.java,v 1.18 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -632,11 +632,9 @@
 			case UMLPackage.LOOP_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.LOOP_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.LOOP_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.LOOP_NODE__ACTIVITY :
-				return eBasicSetContainer(null, UMLPackage.LOOP_NODE__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.LOOP_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
@@ -668,8 +666,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.LOOP_NODE__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.LOOP_NODE__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.LOOP_NODE__VARIABLE :
 				return ((InternalEList) getVariables()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ManifestationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ManifestationImpl.java
index ec45b87..31ed016 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ManifestationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ManifestationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ManifestationImpl.java,v 1.10 2006/02/21 16:12:18 khussey Exp $
+ * $Id: ManifestationImpl.java,v 1.11 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -22,6 +22,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.uml2.common.util.SubsetSupersetEObjectResolvingEList;
 
 import org.eclipse.uml2.uml.Manifestation;
@@ -123,10 +125,6 @@
 	 * @generated
 	 */
 	public void setUtilizedElement(PackageableElement newUtilizedElement) {
-		if (newUtilizedElement != null
-			&& !getSuppliers().contains(newUtilizedElement)) {
-			getSuppliers().add(newUtilizedElement);
-		}
 		PackageableElement utilizedElement = newUtilizedElement;
 		Object oldUtilizedElement = eVirtualSet(
 			UMLPackage.MANIFESTATION__UTILIZED_ELEMENT, utilizedElement);
@@ -137,6 +135,15 @@
 					? null
 					: oldUtilizedElement, utilizedElement));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newUtilizedElement != null) {
+				EList supplier = getSuppliers();
+				if (!supplier.contains(newUtilizedElement)) {
+					supplier.add(newUtilizedElement);
+				}
+			}
+		}
 	}
 
 	/**
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/MessageImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/MessageImpl.java
index 4bac657..739e7de 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/MessageImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/MessageImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: MessageImpl.java,v 1.14 2006/02/22 23:07:14 khussey Exp $
+ * $Id: MessageImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -329,6 +329,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInteraction(Interaction newInteraction,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInteraction,
+			UMLPackage.MESSAGE__INTERACTION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInteraction(Interaction newInteraction) {
 		if (newInteraction != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.MESSAGE__INTERACTION && newInteraction != null)) {
@@ -341,8 +354,7 @@
 			if (newInteraction != null)
 				msgs = ((InternalEObject) newInteraction).eInverseAdd(this,
 					UMLPackage.INTERACTION__MESSAGE, Interaction.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInteraction,
-				UMLPackage.MESSAGE__INTERACTION, msgs);
+			msgs = basicSetInteraction(newInteraction, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -530,8 +542,7 @@
 			case UMLPackage.MESSAGE__INTERACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.MESSAGE__INTERACTION, msgs);
+				return basicSetInteraction((Interaction) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -556,8 +567,7 @@
 			case UMLPackage.MESSAGE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.MESSAGE__INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.MESSAGE__INTERACTION, msgs);
+				return basicSetInteraction(null, msgs);
 			case UMLPackage.MESSAGE__ARGUMENT :
 				return ((InternalEList) getArguments()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/NodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/NodeImpl.java
index 6f14a70..54f341a 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/NodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/NodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: NodeImpl.java,v 1.20 2006/02/22 23:49:05 khussey Exp $
+ * $Id: NodeImpl.java,v 1.21 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -387,8 +387,8 @@
 			case UMLPackage.NODE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.NODE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.NODE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.NODE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -463,8 +463,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.NODE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.NODE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.NODE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.NODE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ObjectNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ObjectNodeImpl.java
index 79b4b25..ea88eca 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ObjectNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ObjectNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ObjectNodeImpl.java,v 1.14 2006/02/22 23:07:14 khussey Exp $
+ * $Id: ObjectNodeImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -503,11 +503,9 @@
 			case UMLPackage.OBJECT_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.OBJECT_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.OBJECT_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.OBJECT_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.OBJECT_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.OBJECT_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OccurrenceSpecificationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OccurrenceSpecificationImpl.java
index b883d83..13a67f9 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OccurrenceSpecificationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OccurrenceSpecificationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: OccurrenceSpecificationImpl.java,v 1.13 2006/02/22 20:48:16 khussey Exp $
+ * $Id: OccurrenceSpecificationImpl.java,v 1.14 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -281,14 +281,12 @@
 			case UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_INTERACTION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_INTERACTION,
+				return basicSetEnclosingInteraction((Interaction) otherEnd,
 					msgs);
 			case UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_OPERAND :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_OPERAND,
+				return basicSetEnclosingOperand((InteractionOperand) otherEnd,
 					msgs);
 			case UMLPackage.OCCURRENCE_SPECIFICATION__TO_BEFORE :
 				return ((InternalEList) getToBefores())
@@ -325,13 +323,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_INTERACTION,
-					msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.OCCURRENCE_SPECIFICATION__ENCLOSING_OPERAND,
-					msgs);
+				return basicSetEnclosingOperand(null, msgs);
 			case UMLPackage.OCCURRENCE_SPECIFICATION__TO_BEFORE :
 				return ((InternalEList) getToBefores()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationImpl.java
index cae3be5..701ddef 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: OperationImpl.java,v 1.23 2006/02/22 23:49:06 khussey Exp $
+ * $Id: OperationImpl.java,v 1.24 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -24,11 +24,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
@@ -258,10 +259,16 @@
 
 		msgs = basicSetTemplateParameterGen(newTemplateParameter, msgs);
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwningTemplateParameter(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+
+				setOwningTemplateParameter(null);
+			}
 		}
 
 		return msgs;
@@ -330,9 +337,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -347,9 +375,8 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs);
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -357,10 +384,6 @@
 				UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -755,6 +778,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetClass_(
+			org.eclipse.uml2.uml.Class newClass_, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newClass_,
+			UMLPackage.OPERATION__CLASS_, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setClass_(org.eclipse.uml2.uml.Class newClass_) {
 		if (newClass_ != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.OPERATION__CLASS_ && newClass_ != null)) {
@@ -768,8 +804,7 @@
 				msgs = ((InternalEObject) newClass_).eInverseAdd(this,
 					UMLPackage.CLASS__OWNED_OPERATION,
 					org.eclipse.uml2.uml.Class.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newClass_,
-				UMLPackage.OPERATION__CLASS_, msgs);
+			msgs = basicSetClass_(newClass_, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1010,6 +1045,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetDatatype(DataType newDatatype,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newDatatype,
+			UMLPackage.OPERATION__DATATYPE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setDatatype(DataType newDatatype) {
 		if (newDatatype != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.OPERATION__DATATYPE && newDatatype != null)) {
@@ -1023,8 +1071,7 @@
 				msgs = ((InternalEObject) newDatatype)
 					.eInverseAdd(this, UMLPackage.DATA_TYPE__OWNED_OPERATION,
 						DataType.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newDatatype,
-				UMLPackage.OPERATION__DATATYPE, msgs);
+			msgs = basicSetDatatype(newDatatype, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1069,10 +1116,6 @@
 	 * @generated
 	 */
 	public void setBodyCondition(Constraint newBodyCondition) {
-		if (newBodyCondition != null
-			&& !getOwnedRules().contains(newBodyCondition)) {
-			getOwnedRules().add(newBodyCondition);
-		}
 		Constraint bodyCondition = newBodyCondition;
 		Object oldBodyCondition = eVirtualSet(
 			UMLPackage.OPERATION__BODY_CONDITION, bodyCondition);
@@ -1083,6 +1126,15 @@
 					? null
 					: oldBodyCondition, bodyCondition));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newBodyCondition != null) {
+				EList ownedRule = getOwnedRules();
+				if (!ownedRule.contains(newBodyCondition)) {
+					ownedRule.add(newBodyCondition);
+				}
+			}
+		}
 	}
 
 	/**
@@ -1157,6 +1209,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInterface(Interface newInterface,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newInterface,
+			UMLPackage.OPERATION__INTERFACE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInterface(Interface newInterface) {
 		if (newInterface != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.OPERATION__INTERFACE && newInterface != null)) {
@@ -1170,8 +1235,7 @@
 				msgs = ((InternalEObject) newInterface).eInverseAdd(this,
 					UMLPackage.INTERFACE__OWNED_OPERATION, Interface.class,
 					msgs);
-			msgs = eBasicSetContainer((InternalEObject) newInterface,
-				UMLPackage.OPERATION__INTERFACE, msgs);
+			msgs = basicSetInterface(newInterface, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1463,8 +1527,8 @@
 			case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.OPERATION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -1489,18 +1553,16 @@
 			case UMLPackage.OPERATION__INTERFACE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.OPERATION__INTERFACE, msgs);
+				return basicSetInterface((Interface) otherEnd, msgs);
 			case UMLPackage.OPERATION__CLASS_ :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.OPERATION__CLASS_, msgs);
+				return basicSetClass_((org.eclipse.uml2.uml.Class) otherEnd,
+					msgs);
 			case UMLPackage.OPERATION__DATATYPE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.OPERATION__DATATYPE, msgs);
+				return basicSetDatatype((DataType) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -1543,8 +1605,7 @@
 				return ((InternalEList) getOwnedParameterSets()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.OPERATION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.OPERATION__TEMPLATE_BINDING :
@@ -1553,14 +1614,11 @@
 			case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE :
 				return basicSetOwnedTemplateSignature(null, msgs);
 			case UMLPackage.OPERATION__INTERFACE :
-				return eBasicSetContainer(null,
-					UMLPackage.OPERATION__INTERFACE, msgs);
+				return basicSetInterface(null, msgs);
 			case UMLPackage.OPERATION__CLASS_ :
-				return eBasicSetContainer(null, UMLPackage.OPERATION__CLASS_,
-					msgs);
+				return basicSetClass_(null, msgs);
 			case UMLPackage.OPERATION__DATATYPE :
-				return eBasicSetContainer(null, UMLPackage.OPERATION__DATATYPE,
-					msgs);
+				return basicSetDatatype(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationTemplateParameterImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationTemplateParameterImpl.java
index 58c471b..762caa0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationTemplateParameterImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/OperationTemplateParameterImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: OperationTemplateParameterImpl.java,v 1.10 2006/02/21 16:12:17 khussey Exp $
+ * $Id: OperationTemplateParameterImpl.java,v 1.11 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -21,6 +21,7 @@
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.Resource;
 
 import org.eclipse.uml2.uml.Operation;
 import org.eclipse.uml2.uml.OperationTemplateParameter;
@@ -133,10 +134,16 @@
 
 		msgs = basicSetParameteredElementGen(newParameteredElement, msgs);
 
-		if (eVirtualGet(UMLPackage.OPERATION_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != null
-			&& eVirtualGet(UMLPackage.OPERATION_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != newParameteredElement) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwnedParameteredElement(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Object ownedParameteredElement = eVirtualGet(UMLPackage.OPERATION_TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT);
+
+			if (ownedParameteredElement != null
+				&& ownedParameteredElement != newParameteredElement) {
+
+				setOwnedParameteredElement(null);
+			}
 		}
 
 		return msgs;
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java
index 85d18ef..b762893 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PackageImpl.java,v 1.23 2006/02/22 23:49:05 khussey Exp $
+ * $Id: PackageImpl.java,v 1.24 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -24,11 +24,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -161,9 +162,13 @@
 				msgs.add(notification);
 		}
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
-			setOwningTemplateParameter(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+				setOwningTemplateParameter(null);
+			}
 		}
 		return msgs;
 	}
@@ -222,9 +227,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.PACKAGE__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -239,9 +265,8 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER, msgs);
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -249,10 +274,6 @@
 				UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.PACKAGE__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -1156,8 +1177,8 @@
 			case UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PACKAGE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PACKAGE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -1218,8 +1239,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.PACKAGE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PACKAGE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.PACKAGE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImportImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImportImpl.java
index 453ef33..b28f114 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImportImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageImportImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 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
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PackageImportImpl.java,v 1.9 2005/12/14 22:34:18 khussey Exp $
+ * $Id: PackageImportImpl.java,v 1.10 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -217,6 +217,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetImportingNamespace(
+			Namespace newImportingNamespace, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newImportingNamespace,
+			UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setImportingNamespace(Namespace newImportingNamespace) {
 		if (newImportingNamespace != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE && newImportingNamespace != null)) {
@@ -230,8 +243,7 @@
 				msgs = ((InternalEObject) newImportingNamespace).eInverseAdd(
 					this, UMLPackage.NAMESPACE__PACKAGE_IMPORT,
 					Namespace.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newImportingNamespace,
-				UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE, msgs);
+			msgs = basicSetImportingNamespace(newImportingNamespace, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -266,8 +278,7 @@
 			case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE, msgs);
+				return basicSetImportingNamespace((Namespace) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -287,8 +298,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE :
-				return eBasicSetContainer(null,
-					UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE, msgs);
+				return basicSetImportingNamespace(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageMergeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageMergeImpl.java
index c72c189..8add6c1 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageMergeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageMergeImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 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
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PackageMergeImpl.java,v 1.8 2005/12/14 22:34:18 khussey Exp $
+ * $Id: PackageMergeImpl.java,v 1.9 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -167,6 +167,20 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetReceivingPackage(
+			org.eclipse.uml2.uml.Package newReceivingPackage,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newReceivingPackage,
+			UMLPackage.PACKAGE_MERGE__RECEIVING_PACKAGE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setReceivingPackage(
 			org.eclipse.uml2.uml.Package newReceivingPackage) {
 		if (newReceivingPackage != eInternalContainer()
@@ -181,8 +195,7 @@
 				msgs = ((InternalEObject) newReceivingPackage).eInverseAdd(
 					this, UMLPackage.PACKAGE__PACKAGE_MERGE,
 					org.eclipse.uml2.uml.Package.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newReceivingPackage,
-				UMLPackage.PACKAGE_MERGE__RECEIVING_PACKAGE, msgs);
+			msgs = basicSetReceivingPackage(newReceivingPackage, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -206,8 +219,8 @@
 			case UMLPackage.PACKAGE_MERGE__RECEIVING_PACKAGE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PACKAGE_MERGE__RECEIVING_PACKAGE, msgs);
+				return basicSetReceivingPackage(
+					(org.eclipse.uml2.uml.Package) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -227,8 +240,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.PACKAGE_MERGE__RECEIVING_PACKAGE :
-				return eBasicSetContainer(null,
-					UMLPackage.PACKAGE_MERGE__RECEIVING_PACKAGE, msgs);
+				return basicSetReceivingPackage(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java
index a1a9d95..7446975 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PackageableElementImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PackageableElementImpl.java,v 1.10 2006/02/21 16:12:17 khussey Exp $
+ * $Id: PackageableElementImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -19,11 +19,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -128,9 +129,13 @@
 				msgs.add(notification);
 		}
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
-			setOwningTemplateParameter(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+				setOwningTemplateParameter(null);
+			}
 		}
 		return msgs;
 	}
@@ -189,9 +194,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.PACKAGEABLE_ELEMENT__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -206,9 +232,8 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -216,10 +241,6 @@
 				UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.PACKAGEABLE_ELEMENT__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -297,9 +318,8 @@
 			case UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PACKAGEABLE_ELEMENT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PACKAGEABLE_ELEMENT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -333,9 +353,7 @@
 			case UMLPackage.PACKAGEABLE_ELEMENT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.PACKAGEABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PACKAGEABLE_ELEMENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 		}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterImpl.java
index 09913dc..8438a62 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ParameterImpl.java,v 1.21 2006/02/22 23:07:14 khussey Exp $
+ * $Id: ParameterImpl.java,v 1.22 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -1091,8 +1091,8 @@
 			case UMLPackage.PARAMETER__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PARAMETER__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PARAMETER__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PARAMETER__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -1131,8 +1131,7 @@
 			case UMLPackage.PARAMETER__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.PARAMETER__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.PARAMETER__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PARAMETER__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.PARAMETER__END :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterableElementImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterableElementImpl.java
index a529c0c..8ee08c0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterableElementImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ParameterableElementImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 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
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ParameterableElementImpl.java,v 1.8 2005/12/14 22:34:17 khussey Exp $
+ * $Id: ParameterableElementImpl.java,v 1.9 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -19,11 +19,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -125,9 +126,13 @@
 				msgs.add(notification);
 		}
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
-			setOwningTemplateParameter(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+				setOwningTemplateParameter(null);
+			}
 		}
 		return msgs;
 	}
@@ -186,9 +191,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -203,9 +229,7 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
 				msgs);
 			if (msgs != null)
 				msgs.dispatch();
@@ -214,10 +238,6 @@
 				UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -252,10 +272,8 @@
 			case UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -284,10 +302,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 		}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PinImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PinImpl.java
index 1663e98..a0e4b2b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PinImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PinImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PinImpl.java,v 1.15 2006/02/22 23:07:15 khussey Exp $
+ * $Id: PinImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -688,10 +688,9 @@
 			case UMLPackage.PIN__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.PIN__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.PIN__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.PIN__ACTIVITY :
-				return eBasicSetContainer(null, UMLPackage.PIN__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.PIN__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileApplicationImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileApplicationImpl.java
index c2e95a0..1b5f373 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileApplicationImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileApplicationImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ProfileApplicationImpl.java,v 1.13 2006/01/25 18:51:32 khussey Exp $
+ * $Id: ProfileApplicationImpl.java,v 1.14 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -223,6 +223,20 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetApplyingPackage(
+			org.eclipse.uml2.uml.Package newApplyingPackage,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newApplyingPackage,
+			UMLPackage.PROFILE_APPLICATION__APPLYING_PACKAGE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setApplyingPackage(
 			org.eclipse.uml2.uml.Package newApplyingPackage) {
 		if (newApplyingPackage != eInternalContainer()
@@ -237,8 +251,7 @@
 				msgs = ((InternalEObject) newApplyingPackage).eInverseAdd(this,
 					UMLPackage.PACKAGE__PROFILE_APPLICATION,
 					org.eclipse.uml2.uml.Package.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newApplyingPackage,
-				UMLPackage.PROFILE_APPLICATION__APPLYING_PACKAGE, msgs);
+			msgs = basicSetApplyingPackage(newApplyingPackage, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -281,8 +294,8 @@
 			case UMLPackage.PROFILE_APPLICATION__APPLYING_PACKAGE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROFILE_APPLICATION__APPLYING_PACKAGE, msgs);
+				return basicSetApplyingPackage(
+					(org.eclipse.uml2.uml.Package) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -302,8 +315,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.PROFILE_APPLICATION__APPLYING_PACKAGE :
-				return eBasicSetContainer(null,
-					UMLPackage.PROFILE_APPLICATION__APPLYING_PACKAGE, msgs);
+				return basicSetApplyingPackage(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileImpl.java
index 87d1953..196a0ac 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProfileImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ProfileImpl.java,v 1.20 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ProfileImpl.java,v 1.21 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -483,8 +483,8 @@
 			case UMLPackage.PROFILE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROFILE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PROFILE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PROFILE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -545,8 +545,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.PROFILE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.PROFILE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PROFILE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.PROFILE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PropertyImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PropertyImpl.java
index 6d9d74a..e0188a3 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PropertyImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PropertyImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PropertyImpl.java,v 1.26 2006/02/22 23:49:05 khussey Exp $
+ * $Id: PropertyImpl.java,v 1.27 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -24,11 +24,12 @@
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
 import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
@@ -277,10 +278,16 @@
 
 		msgs = basicSetTemplateParameterGen(newTemplateParameter, msgs);
 
-		if (getOwningTemplateParameter() != null
-			&& getOwningTemplateParameter() != newTemplateParameter) {
+		Resource.Internal eInternalResource = eInternalResource();
 
-			setOwningTemplateParameter(null);
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter();
+
+			if (owningTemplateParameter != null
+				&& owningTemplateParameter != newTemplateParameter) {
+
+				setOwningTemplateParameter(null);
+			}
 		}
 
 		return msgs;
@@ -349,9 +356,30 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningTemplateParameter(
+			TemplateParameter newOwningTemplateParameter, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningTemplateParameter,
+			UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningTemplateParameter != null) {
+				Object templateParameter = eVirtualGet(UMLPackage.PROPERTY__TEMPLATE_PARAMETER);
+				if (newOwningTemplateParameter != templateParameter) {
+					setTemplateParameter(newOwningTemplateParameter);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningTemplateParameter(
 			TemplateParameter newOwningTemplateParameter) {
-		EObject oldOwningTemplateParameter = eContainer();
 		if (newOwningTemplateParameter != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningTemplateParameter))
@@ -366,9 +394,8 @@
 						this,
 						UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT,
 						TemplateParameter.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newOwningTemplateParameter,
-				UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER, msgs);
+			msgs = basicSetOwningTemplateParameter(newOwningTemplateParameter,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -376,10 +403,6 @@
 				UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER,
 				newOwningTemplateParameter, newOwningTemplateParameter));
 
-		if (newOwningTemplateParameter != null
-			|| oldOwningTemplateParameter == eVirtualGet(UMLPackage.PROPERTY__TEMPLATE_PARAMETER)) {
-			setTemplateParameter(newOwningTemplateParameter);
-		}
 	}
 
 	/**
@@ -822,9 +845,13 @@
 				msgs.add(notification);
 		}
 
-		if (getOwningAssociation() != null
-			&& getOwningAssociation() != newAssociation) {
-			setOwningAssociation(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Association owningAssociation = basicGetOwningAssociation();
+			if (owningAssociation != null
+				&& owningAssociation != newAssociation) {
+				setOwningAssociation(null);
+			}
 		}
 		return msgs;
 	}
@@ -872,6 +899,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetDatatype(DataType newDatatype,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newDatatype,
+			UMLPackage.PROPERTY__DATATYPE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setDatatype(DataType newDatatype) {
 		if (newDatatype != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PROPERTY__DATATYPE && newDatatype != null)) {
@@ -885,8 +925,7 @@
 				msgs = ((InternalEObject) newDatatype)
 					.eInverseAdd(this, UMLPackage.DATA_TYPE__OWNED_ATTRIBUTE,
 						DataType.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newDatatype,
-				UMLPackage.PROPERTY__DATATYPE, msgs);
+			msgs = basicSetDatatype(newDatatype, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1117,8 +1156,29 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningAssociation(
+			Association newOwningAssociation, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningAssociation,
+			UMLPackage.PROPERTY__OWNING_ASSOCIATION, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwningAssociation != null) {
+				Object association = eVirtualGet(UMLPackage.PROPERTY__ASSOCIATION);
+				if (newOwningAssociation != association) {
+					setAssociation(newOwningAssociation);
+				}
+			}
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningAssociation(Association newOwningAssociation) {
-		EObject oldOwningAssociation = eContainer();
 		if (newOwningAssociation != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PROPERTY__OWNING_ASSOCIATION && newOwningAssociation != null)) {
 			if (EcoreUtil.isAncestor(this, newOwningAssociation))
@@ -1131,8 +1191,7 @@
 				msgs = ((InternalEObject) newOwningAssociation).eInverseAdd(
 					this, UMLPackage.ASSOCIATION__OWNED_END, Association.class,
 					msgs);
-			msgs = eBasicSetContainer((InternalEObject) newOwningAssociation,
-				UMLPackage.PROPERTY__OWNING_ASSOCIATION, msgs);
+			msgs = basicSetOwningAssociation(newOwningAssociation, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1140,10 +1199,6 @@
 				UMLPackage.PROPERTY__OWNING_ASSOCIATION, newOwningAssociation,
 				newOwningAssociation));
 
-		if (newOwningAssociation != null
-			|| oldOwningAssociation == eVirtualGet(UMLPackage.PROPERTY__ASSOCIATION)) {
-			setAssociation(newOwningAssociation);
-		}
 	}
 
 	/**
@@ -1427,6 +1482,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetAssociationEnd(Property newAssociationEnd,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newAssociationEnd,
+			UMLPackage.PROPERTY__ASSOCIATION_END, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setAssociationEnd(Property newAssociationEnd) {
 		if (newAssociationEnd != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PROPERTY__ASSOCIATION_END && newAssociationEnd != null)) {
@@ -1439,8 +1507,7 @@
 			if (newAssociationEnd != null)
 				msgs = ((InternalEObject) newAssociationEnd).eInverseAdd(this,
 					UMLPackage.PROPERTY__QUALIFIER, Property.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newAssociationEnd,
-				UMLPackage.PROPERTY__ASSOCIATION_END, msgs);
+			msgs = basicSetAssociationEnd(newAssociationEnd, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1708,8 +1775,8 @@
 			case UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PROPERTY__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PROPERTY__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -1739,13 +1806,11 @@
 			case UMLPackage.PROPERTY__DATATYPE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROPERTY__DATATYPE, msgs);
+				return basicSetDatatype((DataType) otherEnd, msgs);
 			case UMLPackage.PROPERTY__OWNING_ASSOCIATION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROPERTY__OWNING_ASSOCIATION, msgs);
+				return basicSetOwningAssociation((Association) otherEnd, msgs);
 			case UMLPackage.PROPERTY__ASSOCIATION :
 				Association association = (Association) eVirtualGet(UMLPackage.PROPERTY__ASSOCIATION);
 				if (association != null)
@@ -1759,8 +1824,7 @@
 			case UMLPackage.PROPERTY__ASSOCIATION_END :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROPERTY__ASSOCIATION_END, msgs);
+				return basicSetAssociationEnd((Property) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -1789,8 +1853,7 @@
 			case UMLPackage.PROPERTY__LOWER_VALUE :
 				return basicSetLowerValue(null, msgs);
 			case UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.PROPERTY__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PROPERTY__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.PROPERTY__END :
@@ -1804,11 +1867,9 @@
 			case UMLPackage.PROPERTY__OWNED_TEMPLATE_SIGNATURE :
 				return basicSetOwnedTemplateSignature(null, msgs);
 			case UMLPackage.PROPERTY__DATATYPE :
-				return eBasicSetContainer(null, UMLPackage.PROPERTY__DATATYPE,
-					msgs);
+				return basicSetDatatype(null, msgs);
 			case UMLPackage.PROPERTY__OWNING_ASSOCIATION :
-				return eBasicSetContainer(null,
-					UMLPackage.PROPERTY__OWNING_ASSOCIATION, msgs);
+				return basicSetOwningAssociation(null, msgs);
 			case UMLPackage.PROPERTY__DEFAULT_VALUE :
 				return basicSetDefaultValue(null, msgs);
 			case UMLPackage.PROPERTY__ASSOCIATION :
@@ -1817,8 +1878,7 @@
 				return ((InternalEList) getQualifiers()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.PROPERTY__ASSOCIATION_END :
-				return eBasicSetContainer(null,
-					UMLPackage.PROPERTY__ASSOCIATION_END, msgs);
+				return basicSetAssociationEnd(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolConformanceImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolConformanceImpl.java
index 53b01c0..0ef99e4 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolConformanceImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolConformanceImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 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
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ProtocolConformanceImpl.java,v 1.8 2005/12/14 22:34:18 khussey Exp $
+ * $Id: ProtocolConformanceImpl.java,v 1.9 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -172,6 +172,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetSpecificMachine(
+			ProtocolStateMachine newSpecificMachine, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newSpecificMachine,
+			UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setSpecificMachine(ProtocolStateMachine newSpecificMachine) {
 		if (newSpecificMachine != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE && newSpecificMachine != null)) {
@@ -185,8 +198,7 @@
 				msgs = ((InternalEObject) newSpecificMachine).eInverseAdd(this,
 					UMLPackage.PROTOCOL_STATE_MACHINE__CONFORMANCE,
 					ProtocolStateMachine.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newSpecificMachine,
-				UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE, msgs);
+			msgs = basicSetSpecificMachine(newSpecificMachine, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -210,8 +222,8 @@
 			case UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE, msgs);
+				return basicSetSpecificMachine((ProtocolStateMachine) otherEnd,
+					msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -231,8 +243,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE :
-				return eBasicSetContainer(null,
-					UMLPackage.PROTOCOL_CONFORMANCE__SPECIFIC_MACHINE, msgs);
+				return basicSetSpecificMachine(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolStateMachineImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolStateMachineImpl.java
index 7476450..4ee33a9 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolStateMachineImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolStateMachineImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ProtocolStateMachineImpl.java,v 1.18 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ProtocolStateMachineImpl.java,v 1.19 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -254,10 +254,8 @@
 			case UMLPackage.PROTOCOL_STATE_MACHINE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.PROTOCOL_STATE_MACHINE__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.PROTOCOL_STATE_MACHINE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.PROTOCOL_STATE_MACHINE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -349,10 +347,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.PROTOCOL_STATE_MACHINE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.PROTOCOL_STATE_MACHINE__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.PROTOCOL_STATE_MACHINE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.PROTOCOL_STATE_MACHINE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolTransitionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolTransitionImpl.java
index d9a9bc5..78c37be 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolTransitionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ProtocolTransitionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ProtocolTransitionImpl.java,v 1.25 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ProtocolTransitionImpl.java,v 1.26 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -30,6 +30,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -150,9 +152,6 @@
 	 * @generated
 	 */
 	public void setGuard(Constraint newGuard) {
-		if (newGuard != null && !getOwnedRules().contains(newGuard)) {
-			getOwnedRules().add(newGuard);
-		}
 		Constraint guard = newGuard;
 		Object oldGuard = eVirtualSet(UMLPackage.PROTOCOL_TRANSITION__GUARD,
 			guard);
@@ -163,9 +162,18 @@
 					? null
 					: oldGuard, guard));
 
-		if (eVirtualGet(UMLPackage.PROTOCOL_TRANSITION__PRE_CONDITION) != null
-			&& eVirtualGet(UMLPackage.PROTOCOL_TRANSITION__PRE_CONDITION) != newGuard) {
-			setPreCondition(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Object preCondition = eVirtualGet(UMLPackage.PROTOCOL_TRANSITION__PRE_CONDITION);
+			if (preCondition != null && preCondition != newGuard) {
+				setPreCondition(null);
+			}
+			if (newGuard != null) {
+				EList ownedRule = getOwnedRules();
+				if (!ownedRule.contains(newGuard)) {
+					ownedRule.add(newGuard);
+				}
+			}
 		}
 	}
 
@@ -206,10 +214,6 @@
 	 * @generated
 	 */
 	public void setPostCondition(Constraint newPostCondition) {
-		if (newPostCondition != null
-			&& !getOwnedRules().contains(newPostCondition)) {
-			getOwnedRules().add(newPostCondition);
-		}
 		Constraint postCondition = newPostCondition;
 		Object oldPostCondition = eVirtualSet(
 			UMLPackage.PROTOCOL_TRANSITION__POST_CONDITION, postCondition);
@@ -220,6 +224,15 @@
 					? null
 					: oldPostCondition, postCondition));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newPostCondition != null) {
+				EList ownedRule = getOwnedRules();
+				if (!ownedRule.contains(newPostCondition)) {
+					ownedRule.add(newPostCondition);
+				}
+			}
+		}
 	}
 
 	/**
@@ -418,9 +431,14 @@
 					? null
 					: oldPreCondition, preCondition));
 
-		if (newPreCondition != null
-			|| oldPreCondition == eVirtualGet(UMLPackage.PROTOCOL_TRANSITION__GUARD)) {
-			setGuard(newPreCondition);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newPreCondition != null) {
+				Object guard = eVirtualGet(UMLPackage.PROTOCOL_TRANSITION__GUARD);
+				if (newPreCondition != guard) {
+					setGuard(newPreCondition);
+				}
+			}
 		}
 	}
 
@@ -482,8 +500,7 @@
 			case UMLPackage.PROTOCOL_TRANSITION__CONTAINER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PROTOCOL_TRANSITION__CONTAINER, msgs);
+				return basicSetContainer((Region) otherEnd, msgs);
 			case UMLPackage.PROTOCOL_TRANSITION__TARGET :
 				Vertex target = (Vertex) eVirtualGet(UMLPackage.PROTOCOL_TRANSITION__TARGET);
 				if (target != null)
@@ -529,8 +546,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.PROTOCOL_TRANSITION__CONTAINER :
-				return eBasicSetContainer(null,
-					UMLPackage.PROTOCOL_TRANSITION__CONTAINER, msgs);
+				return basicSetContainer(null, msgs);
 			case UMLPackage.PROTOCOL_TRANSITION__TARGET :
 				return basicSetTarget(null, msgs);
 			case UMLPackage.PROTOCOL_TRANSITION__EFFECT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PseudostateImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PseudostateImpl.java
index 7da46c1..3123208 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PseudostateImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/PseudostateImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: PseudostateImpl.java,v 1.10 2006/02/21 16:12:16 khussey Exp $
+ * $Id: PseudostateImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -134,6 +134,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetStateMachine(StateMachine newStateMachine,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newStateMachine,
+			UMLPackage.PSEUDOSTATE__STATE_MACHINE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setStateMachine(StateMachine newStateMachine) {
 		if (newStateMachine != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PSEUDOSTATE__STATE_MACHINE && newStateMachine != null)) {
@@ -147,8 +160,7 @@
 				msgs = ((InternalEObject) newStateMachine).eInverseAdd(this,
 					UMLPackage.STATE_MACHINE__CONNECTION_POINT,
 					StateMachine.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newStateMachine,
-				UMLPackage.PSEUDOSTATE__STATE_MACHINE, msgs);
+			msgs = basicSetStateMachine(newStateMachine, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -174,6 +186,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetState(State newState,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newState,
+			UMLPackage.PSEUDOSTATE__STATE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setState(State newState) {
 		if (newState != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.PSEUDOSTATE__STATE && newState != null)) {
@@ -186,8 +211,7 @@
 			if (newState != null)
 				msgs = ((InternalEObject) newState).eInverseAdd(this,
 					UMLPackage.STATE__CONNECTION_POINT, State.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newState,
-				UMLPackage.PSEUDOSTATE__STATE, msgs);
+			msgs = basicSetState(newState, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -315,18 +339,15 @@
 			case UMLPackage.PSEUDOSTATE__CONTAINER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PSEUDOSTATE__CONTAINER, msgs);
+				return basicSetContainer((Region) otherEnd, msgs);
 			case UMLPackage.PSEUDOSTATE__STATE_MACHINE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PSEUDOSTATE__STATE_MACHINE, msgs);
+				return basicSetStateMachine((StateMachine) otherEnd, msgs);
 			case UMLPackage.PSEUDOSTATE__STATE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.PSEUDOSTATE__STATE, msgs);
+				return basicSetState((State) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -357,14 +378,11 @@
 				return ((InternalEList) getIncomings()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.PSEUDOSTATE__CONTAINER :
-				return eBasicSetContainer(null,
-					UMLPackage.PSEUDOSTATE__CONTAINER, msgs);
+				return basicSetContainer(null, msgs);
 			case UMLPackage.PSEUDOSTATE__STATE_MACHINE :
-				return eBasicSetContainer(null,
-					UMLPackage.PSEUDOSTATE__STATE_MACHINE, msgs);
+				return basicSetStateMachine(null, msgs);
 			case UMLPackage.PSEUDOSTATE__STATE :
-				return eBasicSetContainer(null, UMLPackage.PSEUDOSTATE__STATE,
-					msgs);
+				return basicSetState(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RaiseExceptionActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RaiseExceptionActionImpl.java
index 38ea3c7..31ae6ff 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RaiseExceptionActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RaiseExceptionActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: RaiseExceptionActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: RaiseExceptionActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -235,11 +235,9 @@
 			case UMLPackage.RAISE_EXCEPTION_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.RAISE_EXCEPTION_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.RAISE_EXCEPTION_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.RAISE_EXCEPTION_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.RAISE_EXCEPTION_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.RAISE_EXCEPTION_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadExtentActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadExtentActionImpl.java
index 7d67a62..af88f6f 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadExtentActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadExtentActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadExtentActionImpl.java,v 1.14 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ReadExtentActionImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -292,11 +292,9 @@
 			case UMLPackage.READ_EXTENT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_EXTENT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_EXTENT_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_EXTENT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_EXTENT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_EXTENT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadIsClassifiedObjectActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadIsClassifiedObjectActionImpl.java
index fb8c14b..839da17 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadIsClassifiedObjectActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadIsClassifiedObjectActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadIsClassifiedObjectActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ReadIsClassifiedObjectActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -521,13 +521,9 @@
 			case UMLPackage.READ_IS_CLASSIFIED_OBJECT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_IS_CLASSIFIED_OBJECT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.READ_IS_CLASSIFIED_OBJECT_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_IS_CLASSIFIED_OBJECT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_IS_CLASSIFIED_OBJECT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_IS_CLASSIFIED_OBJECT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkActionImpl.java
index 18dd8b7..df1171a 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadLinkActionImpl.java,v 1.14 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ReadLinkActionImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -271,11 +271,9 @@
 			case UMLPackage.READ_LINK_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_LINK_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_LINK_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_LINK_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_LINK_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_LINK_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndActionImpl.java
index bc3c469..ac068d1 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadLinkObjectEndActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ReadLinkObjectEndActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -494,12 +494,9 @@
 			case UMLPackage.READ_LINK_OBJECT_END_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_LINK_OBJECT_END_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_LINK_OBJECT_END_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_LINK_OBJECT_END_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_LINK_OBJECT_END_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_LINK_OBJECT_END_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndQualifierActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndQualifierActionImpl.java
index 656b4ad..4110f5d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndQualifierActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadLinkObjectEndQualifierActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadLinkObjectEndQualifierActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ReadLinkObjectEndQualifierActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -539,14 +539,9 @@
 			case UMLPackage.READ_LINK_OBJECT_END_QUALIFIER_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_LINK_OBJECT_END_QUALIFIER_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.READ_LINK_OBJECT_END_QUALIFIER_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_LINK_OBJECT_END_QUALIFIER_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_LINK_OBJECT_END_QUALIFIER_ACTION__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_LINK_OBJECT_END_QUALIFIER_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadSelfActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadSelfActionImpl.java
index d1e34a1..92a26db 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadSelfActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadSelfActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadSelfActionImpl.java,v 1.14 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ReadSelfActionImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -258,11 +258,9 @@
 			case UMLPackage.READ_SELF_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_SELF_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_SELF_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_SELF_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_SELF_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_SELF_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadStructuralFeatureActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadStructuralFeatureActionImpl.java
index 6a517f4..0415cd0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadStructuralFeatureActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadStructuralFeatureActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadStructuralFeatureActionImpl.java,v 1.14 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ReadStructuralFeatureActionImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -251,13 +251,9 @@
 			case UMLPackage.READ_STRUCTURAL_FEATURE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_STRUCTURAL_FEATURE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.READ_STRUCTURAL_FEATURE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_STRUCTURAL_FEATURE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_STRUCTURAL_FEATURE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_STRUCTURAL_FEATURE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadVariableActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadVariableActionImpl.java
index d7e268d..7702cbc 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadVariableActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReadVariableActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReadVariableActionImpl.java,v 1.14 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ReadVariableActionImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -242,11 +242,9 @@
 			case UMLPackage.READ_VARIABLE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.READ_VARIABLE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_VARIABLE_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.READ_VARIABLE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.READ_VARIABLE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.READ_VARIABLE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReclassifyObjectActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReclassifyObjectActionImpl.java
index 427bd23..17e9281 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReclassifyObjectActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReclassifyObjectActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReclassifyObjectActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ReclassifyObjectActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -414,12 +414,9 @@
 			case UMLPackage.RECLASSIFY_OBJECT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.RECLASSIFY_OBJECT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.RECLASSIFY_OBJECT_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.RECLASSIFY_OBJECT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.RECLASSIFY_OBJECT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.RECLASSIFY_OBJECT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RedefinableTemplateSignatureImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RedefinableTemplateSignatureImpl.java
index 81ac17a..9efada8 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RedefinableTemplateSignatureImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RedefinableTemplateSignatureImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: RedefinableTemplateSignatureImpl.java,v 1.14 2006/02/22 20:48:17 khussey Exp $
+ * $Id: RedefinableTemplateSignatureImpl.java,v 1.15 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -152,6 +152,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetTemplate(TemplateableElement newTemplate,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newTemplate,
+			UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setTemplate(TemplateableElement newTemplate) {
 		if (newTemplate != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE && newTemplate != null)) {
@@ -165,8 +178,7 @@
 				msgs = ((InternalEObject) newTemplate).eInverseAdd(this,
 					UMLPackage.TEMPLATEABLE_ELEMENT__OWNED_TEMPLATE_SIGNATURE,
 					TemplateableElement.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newTemplate,
-				UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+			msgs = basicSetTemplate(newTemplate, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -377,8 +389,7 @@
 			case UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+				return basicSetTemplate((TemplateableElement) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -406,8 +417,7 @@
 				return ((InternalEList) getOwnedParameters()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE :
-				return eBasicSetContainer(null,
-					UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+				return basicSetTemplate(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReduceActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReduceActionImpl.java
index d383e58..563cb3a 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReduceActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReduceActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReduceActionImpl.java,v 1.10 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ReduceActionImpl.java,v 1.11 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -488,11 +488,9 @@
 			case UMLPackage.REDUCE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.REDUCE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.REDUCE_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.REDUCE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.REDUCE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.REDUCE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RegionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RegionImpl.java
index 525d683..d709399 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RegionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RegionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: RegionImpl.java,v 1.17 2006/02/22 23:49:05 khussey Exp $
+ * $Id: RegionImpl.java,v 1.18 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -438,6 +438,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetState(State newState,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newState,
+			UMLPackage.REGION__STATE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setState(State newState) {
 		if (newState != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.REGION__STATE && newState != null)) {
@@ -450,8 +463,7 @@
 			if (newState != null)
 				msgs = ((InternalEObject) newState).eInverseAdd(this,
 					UMLPackage.STATE__REGION, State.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newState,
-				UMLPackage.REGION__STATE, msgs);
+			msgs = basicSetState(newState, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -524,6 +536,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetStateMachine(StateMachine newStateMachine,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newStateMachine,
+			UMLPackage.REGION__STATE_MACHINE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setStateMachine(StateMachine newStateMachine) {
 		if (newStateMachine != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.REGION__STATE_MACHINE && newStateMachine != null)) {
@@ -536,8 +561,7 @@
 			if (newStateMachine != null)
 				msgs = ((InternalEObject) newStateMachine).eInverseAdd(this,
 					UMLPackage.STATE_MACHINE__REGION, StateMachine.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newStateMachine,
-				UMLPackage.REGION__STATE_MACHINE, msgs);
+			msgs = basicSetStateMachine(newStateMachine, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -702,13 +726,11 @@
 			case UMLPackage.REGION__STATE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd, UMLPackage.REGION__STATE,
-					msgs);
+				return basicSetState((State) otherEnd, msgs);
 			case UMLPackage.REGION__STATE_MACHINE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.REGION__STATE_MACHINE, msgs);
+				return basicSetStateMachine((StateMachine) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -748,10 +770,9 @@
 				return ((InternalEList) getTransitions()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.REGION__STATE :
-				return eBasicSetContainer(null, UMLPackage.REGION__STATE, msgs);
+				return basicSetState(null, msgs);
 			case UMLPackage.REGION__STATE_MACHINE :
-				return eBasicSetContainer(null,
-					UMLPackage.REGION__STATE_MACHINE, msgs);
+				return basicSetStateMachine(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveStructuralFeatureValueActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveStructuralFeatureValueActionImpl.java
index 079a54a..7e64e5e 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveStructuralFeatureValueActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveStructuralFeatureValueActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: RemoveStructuralFeatureValueActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: RemoveStructuralFeatureValueActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -329,15 +329,9 @@
 			case UMLPackage.REMOVE_STRUCTURAL_FEATURE_VALUE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.REMOVE_STRUCTURAL_FEATURE_VALUE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.REMOVE_STRUCTURAL_FEATURE_VALUE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.REMOVE_STRUCTURAL_FEATURE_VALUE_ACTION__ACTIVITY :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.REMOVE_STRUCTURAL_FEATURE_VALUE_ACTION__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.REMOVE_STRUCTURAL_FEATURE_VALUE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveVariableValueActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveVariableValueActionImpl.java
index 363819c..3c5f88d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveVariableValueActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/RemoveVariableValueActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: RemoveVariableValueActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: RemoveVariableValueActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -302,13 +302,9 @@
 			case UMLPackage.REMOVE_VARIABLE_VALUE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.REMOVE_VARIABLE_VALUE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.REMOVE_VARIABLE_VALUE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.REMOVE_VARIABLE_VALUE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.REMOVE_VARIABLE_VALUE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.REMOVE_VARIABLE_VALUE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReplyActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReplyActionImpl.java
index 3748bc8..a48dc96 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReplyActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ReplyActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ReplyActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: ReplyActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -397,11 +397,9 @@
 			case UMLPackage.REPLY_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.REPLY_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.REPLY_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.REPLY_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.REPLY_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.REPLY_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendObjectActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendObjectActionImpl.java
index 2672a87..e658597 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendObjectActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendObjectActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: SendObjectActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: SendObjectActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -362,11 +362,9 @@
 			case UMLPackage.SEND_OBJECT_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.SEND_OBJECT_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.SEND_OBJECT_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.SEND_OBJECT_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.SEND_OBJECT_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.SEND_OBJECT_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendSignalActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendSignalActionImpl.java
index 55011fe..e4c1405 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendSignalActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SendSignalActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: SendSignalActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: SendSignalActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -308,11 +308,9 @@
 			case UMLPackage.SEND_SIGNAL_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.SEND_SIGNAL_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.SEND_SIGNAL_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.SEND_SIGNAL_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.SEND_SIGNAL_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.SEND_SIGNAL_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SequenceNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SequenceNodeImpl.java
index df3ecfc..5161e2b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SequenceNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SequenceNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: SequenceNodeImpl.java,v 1.14 2006/02/22 23:07:15 khussey Exp $
+ * $Id: SequenceNodeImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -160,11 +160,9 @@
 			case UMLPackage.SEQUENCE_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.SEQUENCE_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.SEQUENCE_NODE__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.SEQUENCE_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.SEQUENCE_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.SEQUENCE_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
@@ -196,8 +194,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.SEQUENCE_NODE__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.SEQUENCE_NODE__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.SEQUENCE_NODE__VARIABLE :
 				return ((InternalEList) getVariables()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SignalImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SignalImpl.java
index c18a952..c05b3d5 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SignalImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SignalImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: SignalImpl.java,v 1.19 2006/02/22 23:49:06 khussey Exp $
+ * $Id: SignalImpl.java,v 1.20 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -231,8 +231,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.SIGNAL__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.SIGNAL__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.SIGNAL__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.SIGNAL__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SlotImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SlotImpl.java
index 6926818..737d7fa 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SlotImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SlotImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: SlotImpl.java,v 1.11 2006/02/22 23:07:14 khussey Exp $
+ * $Id: SlotImpl.java,v 1.12 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -109,6 +109,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningInstance(
+			InstanceSpecification newOwningInstance, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningInstance,
+			UMLPackage.SLOT__OWNING_INSTANCE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningInstance(InstanceSpecification newOwningInstance) {
 		if (newOwningInstance != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.SLOT__OWNING_INSTANCE && newOwningInstance != null)) {
@@ -122,8 +135,7 @@
 				msgs = ((InternalEObject) newOwningInstance).eInverseAdd(this,
 					UMLPackage.INSTANCE_SPECIFICATION__SLOT,
 					InstanceSpecification.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newOwningInstance,
-				UMLPackage.SLOT__OWNING_INSTANCE, msgs);
+			msgs = basicSetOwningInstance(newOwningInstance, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -259,8 +271,8 @@
 			case UMLPackage.SLOT__OWNING_INSTANCE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.SLOT__OWNING_INSTANCE, msgs);
+				return basicSetOwningInstance((InstanceSpecification) otherEnd,
+					msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -283,8 +295,7 @@
 				return ((InternalEList) getValues())
 					.basicRemove(otherEnd, msgs);
 			case UMLPackage.SLOT__OWNING_INSTANCE :
-				return eBasicSetContainer(null,
-					UMLPackage.SLOT__OWNING_INSTANCE, msgs);
+				return basicSetOwningInstance(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StartClassifierBehaviorActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StartClassifierBehaviorActionImpl.java
index 8d80402..c5004dc 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StartClassifierBehaviorActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StartClassifierBehaviorActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StartClassifierBehaviorActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: StartClassifierBehaviorActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -265,13 +265,9 @@
 			case UMLPackage.START_CLASSIFIER_BEHAVIOR_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.START_CLASSIFIER_BEHAVIOR_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.START_CLASSIFIER_BEHAVIOR_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.START_CLASSIFIER_BEHAVIOR_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.START_CLASSIFIER_BEHAVIOR_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.START_CLASSIFIER_BEHAVIOR_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateImpl.java
index 58c1b82..4ff300e 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StateImpl.java,v 1.22 2006/02/22 23:49:06 khussey Exp $
+ * $Id: StateImpl.java,v 1.23 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -442,6 +442,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetContainer(Region newContainer,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newContainer,
+			UMLPackage.STATE__CONTAINER, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setContainer(Region newContainer) {
 		if (newContainer != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.STATE__CONTAINER && newContainer != null)) {
@@ -454,8 +467,7 @@
 			if (newContainer != null)
 				msgs = ((InternalEObject) newContainer).eInverseAdd(this,
 					UMLPackage.REGION__SUBVERTEX, Region.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newContainer,
-				UMLPackage.STATE__CONTAINER, msgs);
+			msgs = basicSetContainer(newContainer, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -1486,8 +1498,7 @@
 			case UMLPackage.STATE__CONTAINER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STATE__CONTAINER, msgs);
+				return basicSetContainer((Region) otherEnd, msgs);
 			case UMLPackage.STATE__SUBMACHINE :
 				StateMachine submachine = (StateMachine) eVirtualGet(UMLPackage.STATE__SUBMACHINE);
 				if (submachine != null)
@@ -1542,8 +1553,7 @@
 				return ((InternalEList) getIncomings()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.STATE__CONTAINER :
-				return eBasicSetContainer(null, UMLPackage.STATE__CONTAINER,
-					msgs);
+				return basicSetContainer(null, msgs);
 			case UMLPackage.STATE__SUBMACHINE :
 				return basicSetSubmachine(null, msgs);
 			case UMLPackage.STATE__CONNECTION :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateInvariantImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateInvariantImpl.java
index a77fea6..8ebe814 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateInvariantImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateInvariantImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StateInvariantImpl.java,v 1.14 2006/02/22 23:49:05 khussey Exp $
+ * $Id: StateInvariantImpl.java,v 1.15 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -292,11 +292,9 @@
 				return ((InternalEList) getGeneralOrderings()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.STATE_INVARIANT__ENCLOSING_INTERACTION :
-				return eBasicSetContainer(null,
-					UMLPackage.STATE_INVARIANT__ENCLOSING_INTERACTION, msgs);
+				return basicSetEnclosingInteraction(null, msgs);
 			case UMLPackage.STATE_INVARIANT__ENCLOSING_OPERAND :
-				return eBasicSetContainer(null,
-					UMLPackage.STATE_INVARIANT__ENCLOSING_OPERAND, msgs);
+				return basicSetEnclosingOperand(null, msgs);
 			case UMLPackage.STATE_INVARIANT__INVARIANT :
 				return basicSetInvariant(null, msgs);
 		}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateMachineImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateMachineImpl.java
index 7e23fc8..566414c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateMachineImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StateMachineImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StateMachineImpl.java,v 1.20 2006/02/22 23:49:05 khussey Exp $
+ * $Id: StateMachineImpl.java,v 1.21 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -465,8 +465,8 @@
 			case UMLPackage.STATE_MACHINE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STATE_MACHINE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.STATE_MACHINE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.STATE_MACHINE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -555,8 +555,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.STATE_MACHINE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.STATE_MACHINE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.STATE_MACHINE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.STATE_MACHINE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StereotypeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StereotypeImpl.java
index 7189ac1..f2cf1d5 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StereotypeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StereotypeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StereotypeImpl.java,v 1.18 2006/02/21 21:39:47 khussey Exp $
+ * $Id: StereotypeImpl.java,v 1.19 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -259,8 +259,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.STEREOTYPE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.STEREOTYPE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.STEREOTYPE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.STEREOTYPE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StringExpressionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StringExpressionImpl.java
index 69fb134..a219cbe 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StringExpressionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StringExpressionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StringExpressionImpl.java,v 1.12 2006/02/22 23:49:05 khussey Exp $
+ * $Id: StringExpressionImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -373,6 +373,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetOwningExpression(
+			StringExpression newOwningExpression, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newOwningExpression,
+			UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setOwningExpression(StringExpression newOwningExpression) {
 		if (newOwningExpression != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION && newOwningExpression != null)) {
@@ -386,8 +399,7 @@
 				msgs = ((InternalEObject) newOwningExpression).eInverseAdd(
 					this, UMLPackage.STRING_EXPRESSION__SUB_EXPRESSION,
 					StringExpression.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newOwningExpression,
-				UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION, msgs);
+			msgs = basicSetOwningExpression(newOwningExpression, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -475,9 +487,8 @@
 			case UMLPackage.STRING_EXPRESSION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STRING_EXPRESSION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.STRING_EXPRESSION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.STRING_EXPRESSION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -507,8 +518,8 @@
 			case UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION, msgs);
+				return basicSetOwningExpression((StringExpression) otherEnd,
+					msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -533,9 +544,7 @@
 			case UMLPackage.STRING_EXPRESSION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.STRING_EXPRESSION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.STRING_EXPRESSION__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.STRING_EXPRESSION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.STRING_EXPRESSION__OPERAND :
@@ -550,8 +559,7 @@
 				return ((InternalEList) getSubExpressions()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION :
-				return eBasicSetContainer(null,
-					UMLPackage.STRING_EXPRESSION__OWNING_EXPRESSION, msgs);
+				return basicSetOwningExpression(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuralFeatureActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuralFeatureActionImpl.java
index 43d46cd..4628594 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuralFeatureActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuralFeatureActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StructuralFeatureActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: StructuralFeatureActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -346,12 +346,9 @@
 			case UMLPackage.STRUCTURAL_FEATURE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.STRUCTURAL_FEATURE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.STRUCTURAL_FEATURE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.STRUCTURAL_FEATURE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.STRUCTURAL_FEATURE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.STRUCTURAL_FEATURE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredActivityNodeImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredActivityNodeImpl.java
index 079bbc9..fd4cfb2 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredActivityNodeImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredActivityNodeImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StructuredActivityNodeImpl.java,v 1.20 2006/02/22 23:49:05 khussey Exp $
+ * $Id: StructuredActivityNodeImpl.java,v 1.21 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -1023,14 +1023,12 @@
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_STRUCTURED_NODE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(
+					(StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STRUCTURED_ACTIVITY_NODE__ACTIVITY, msgs);
+				return basicSetActivity((Activity) otherEnd, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings())
 					.basicAdd(otherEnd, msgs);
@@ -1057,8 +1055,7 @@
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_ACTIVITY :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_ACTIVITY, msgs);
+				return basicSetInActivity((Activity) otherEnd, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__VARIABLE :
 				return ((InternalEList) getVariables())
 					.basicAdd(otherEnd, msgs);
@@ -1090,12 +1087,9 @@
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.STRUCTURED_ACTIVITY_NODE__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
@@ -1127,8 +1121,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.STRUCTURED_ACTIVITY_NODE__IN_ACTIVITY, msgs);
+				return basicSetInActivity(null, msgs);
 			case UMLPackage.STRUCTURED_ACTIVITY_NODE__VARIABLE :
 				return ((InternalEList) getVariables()).basicRemove(otherEnd,
 					msgs);
@@ -1802,6 +1795,17 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetInActivity(Activity newInActivity,
+			NotificationChain msgs) {
+		setActivity(newInActivity);
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setInActivity(Activity newInActivity) {
 		setActivity(newInActivity);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredClassifierImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredClassifierImpl.java
index 5c8b543..06a1ed9 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredClassifierImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/StructuredClassifierImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: StructuredClassifierImpl.java,v 1.20 2006/02/22 23:49:06 khussey Exp $
+ * $Id: StructuredClassifierImpl.java,v 1.21 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -486,10 +486,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.STRUCTURED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.STRUCTURED_CLASSIFIER__OWNING_TEMPLATE_PARAMETER,
-					msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.STRUCTURED_CLASSIFIER__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.STRUCTURED_CLASSIFIER__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SubstitutionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SubstitutionImpl.java
index bc9c884..047284b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SubstitutionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/SubstitutionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: SubstitutionImpl.java,v 1.11 2006/02/21 16:12:17 khussey Exp $
+ * $Id: SubstitutionImpl.java,v 1.12 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -23,6 +23,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -150,9 +152,6 @@
 	 * @generated
 	 */
 	public void setContract(Classifier newContract) {
-		if (newContract != null && !getSuppliers().contains(newContract)) {
-			getSuppliers().add(newContract);
-		}
 		Classifier contract = newContract;
 		Object oldContract = eVirtualSet(UMLPackage.SUBSTITUTION__CONTRACT,
 			contract);
@@ -163,6 +162,15 @@
 					? null
 					: oldContract, contract));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newContract != null) {
+				EList supplier = getSuppliers();
+				if (!supplier.contains(newContract)) {
+					supplier.add(newContract);
+				}
+			}
+		}
 	}
 
 	/**
@@ -192,11 +200,29 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setSubstitutingClassifier(Classifier newSubstitutingClassifier) {
-		if (newSubstitutingClassifier != null
-			&& !getClients().contains(newSubstitutingClassifier)) {
-			getClients().add(newSubstitutingClassifier);
+	public NotificationChain basicSetSubstitutingClassifier(
+			Classifier newSubstitutingClassifier, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newSubstitutingClassifier,
+			UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER, msgs);
+
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newSubstitutingClassifier != null) {
+				EList client = getClients();
+				if (!client.contains(newSubstitutingClassifier)) {
+					client.add(newSubstitutingClassifier);
+				}
+			}
 		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setSubstitutingClassifier(Classifier newSubstitutingClassifier) {
 		if (newSubstitutingClassifier != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER && newSubstitutingClassifier != null)) {
 			if (EcoreUtil.isAncestor(this, newSubstitutingClassifier))
@@ -209,9 +235,8 @@
 				msgs = ((InternalEObject) newSubstitutingClassifier)
 					.eInverseAdd(this, UMLPackage.CLASSIFIER__SUBSTITUTION,
 						Classifier.class, msgs);
-			msgs = eBasicSetContainer(
-				(InternalEObject) newSubstitutingClassifier,
-				UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER, msgs);
+			msgs = basicSetSubstitutingClassifier(newSubstitutingClassifier,
+				msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -238,8 +263,8 @@
 			case UMLPackage.SUBSTITUTION__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.SUBSTITUTION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.SUBSTITUTION__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.SUBSTITUTION__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -254,8 +279,8 @@
 			case UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER, msgs);
+				return basicSetSubstitutingClassifier((Classifier) otherEnd,
+					msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -280,8 +305,7 @@
 			case UMLPackage.SUBSTITUTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.SUBSTITUTION__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.SUBSTITUTION__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.SUBSTITUTION__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.SUBSTITUTION__CLIENT :
@@ -290,8 +314,7 @@
 			case UMLPackage.SUBSTITUTION__MAPPING :
 				return basicSetMapping(null, msgs);
 			case UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER :
-				return eBasicSetContainer(null,
-					UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER, msgs);
+				return basicSetSubstitutingClassifier(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateBindingImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateBindingImpl.java
index 617ccd4..89f0630 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateBindingImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateBindingImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TemplateBindingImpl.java,v 1.10 2006/02/21 16:12:16 khussey Exp $
+ * $Id: TemplateBindingImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -227,6 +227,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetBoundElement(
+			TemplateableElement newBoundElement, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newBoundElement,
+			UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setBoundElement(TemplateableElement newBoundElement) {
 		if (newBoundElement != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT && newBoundElement != null)) {
@@ -240,8 +253,7 @@
 				msgs = ((InternalEObject) newBoundElement).eInverseAdd(this,
 					UMLPackage.TEMPLATEABLE_ELEMENT__TEMPLATE_BINDING,
 					TemplateableElement.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newBoundElement,
-				UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT, msgs);
+			msgs = basicSetBoundElement(newBoundElement, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -290,8 +302,8 @@
 			case UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT, msgs);
+				return basicSetBoundElement((TemplateableElement) otherEnd,
+					msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -314,8 +326,7 @@
 				return ((InternalEList) getParameterSubstitutions())
 					.basicRemove(otherEnd, msgs);
 			case UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT :
-				return eBasicSetContainer(null,
-					UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT, msgs);
+				return basicSetBoundElement(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterImpl.java
index 0a151fa..3832550 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TemplateParameterImpl.java,v 1.10 2006/02/22 20:48:17 khussey Exp $
+ * $Id: TemplateParameterImpl.java,v 1.11 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -27,6 +27,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
 
@@ -156,9 +158,13 @@
 				msgs.add(notification);
 		}
 
-		if (eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != null
-			&& eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT) != newParameteredElement) {
-			setOwnedParameteredElement(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Object ownedParameteredElement = eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT);
+			if (ownedParameteredElement != null
+				&& ownedParameteredElement != newParameteredElement) {
+				setOwnedParameteredElement(null);
+			}
 		}
 		return msgs;
 	}
@@ -236,9 +242,12 @@
 					? null
 					: oldDefault, default_));
 
-		if (eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__OWNED_DEFAULT) != null
-			&& eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__OWNED_DEFAULT) != newDefault) {
-			setOwnedDefault(null);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			Object ownedDefault = eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__OWNED_DEFAULT);
+			if (ownedDefault != null && ownedDefault != newDefault) {
+				setOwnedDefault(null);
+			}
 		}
 	}
 
@@ -258,6 +267,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetSignature(TemplateSignature newSignature,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newSignature,
+			UMLPackage.TEMPLATE_PARAMETER__SIGNATURE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setSignature(TemplateSignature newSignature) {
 		if (newSignature != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.TEMPLATE_PARAMETER__SIGNATURE && newSignature != null)) {
@@ -271,8 +293,7 @@
 				msgs = ((InternalEObject) newSignature).eInverseAdd(this,
 					UMLPackage.TEMPLATE_SIGNATURE__OWNED_PARAMETER,
 					TemplateSignature.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newSignature,
-				UMLPackage.TEMPLATE_PARAMETER__SIGNATURE, msgs);
+			msgs = basicSetSignature(newSignature, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -353,9 +374,14 @@
 				msgs.add(notification);
 		}
 
-		if (newOwnedParameteredElement != null
-			|| oldOwnedParameteredElement == eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__PARAMETERED_ELEMENT)) {
-			setParameteredElement(newOwnedParameteredElement);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwnedParameteredElement != null) {
+				Object parameteredElement = eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__PARAMETERED_ELEMENT);
+				if (newOwnedParameteredElement != parameteredElement) {
+					setParameteredElement(newOwnedParameteredElement);
+				}
+			}
 		}
 		return msgs;
 	}
@@ -468,9 +494,14 @@
 				msgs.add(notification);
 		}
 
-		if (newOwnedDefault != null
-			|| oldOwnedDefault == eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__DEFAULT)) {
-			setDefault(newOwnedDefault);
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newOwnedDefault != null) {
+				Object default_ = eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__DEFAULT);
+				if (newOwnedDefault != default_) {
+					setDefault(newOwnedDefault);
+				}
+			}
 		}
 		return msgs;
 	}
@@ -541,8 +572,7 @@
 			case UMLPackage.TEMPLATE_PARAMETER__SIGNATURE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.TEMPLATE_PARAMETER__SIGNATURE, msgs);
+				return basicSetSignature((TemplateSignature) otherEnd, msgs);
 			case UMLPackage.TEMPLATE_PARAMETER__PARAMETERED_ELEMENT :
 				ParameterableElement parameteredElement = (ParameterableElement) eVirtualGet(UMLPackage.TEMPLATE_PARAMETER__PARAMETERED_ELEMENT);
 				if (parameteredElement != null)
@@ -583,8 +613,7 @@
 				return ((InternalEList) getOwnedComments()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.TEMPLATE_PARAMETER__SIGNATURE :
-				return eBasicSetContainer(null,
-					UMLPackage.TEMPLATE_PARAMETER__SIGNATURE, msgs);
+				return basicSetSignature(null, msgs);
 			case UMLPackage.TEMPLATE_PARAMETER__PARAMETERED_ELEMENT :
 				return basicSetParameteredElement(null, msgs);
 			case UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterSubstitutionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterSubstitutionImpl.java
index f2c4b8a..03b8e81 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterSubstitutionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateParameterSubstitutionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TemplateParameterSubstitutionImpl.java,v 1.11 2006/02/22 20:48:17 khussey Exp $
+ * $Id: TemplateParameterSubstitutionImpl.java,v 1.12 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -220,6 +220,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetTemplateBinding(
+			TemplateBinding newTemplateBinding, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newTemplateBinding,
+			UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setTemplateBinding(TemplateBinding newTemplateBinding) {
 		if (newTemplateBinding != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING && newTemplateBinding != null)) {
@@ -233,9 +246,7 @@
 				msgs = ((InternalEObject) newTemplateBinding).eInverseAdd(this,
 					UMLPackage.TEMPLATE_BINDING__PARAMETER_SUBSTITUTION,
 					TemplateBinding.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newTemplateBinding,
-				UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING,
-				msgs);
+			msgs = basicSetTemplateBinding(newTemplateBinding, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -270,10 +281,7 @@
 			case UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(
-					otherEnd,
-					UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING,
-					msgs);
+				return basicSetTemplateBinding((TemplateBinding) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -296,10 +304,7 @@
 				return ((InternalEList) getOwnedActuals()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__TEMPLATE_BINDING,
-					msgs);
+				return basicSetTemplateBinding(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateSignatureImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateSignatureImpl.java
index d13eb6d..8a95a7e 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateSignatureImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TemplateSignatureImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TemplateSignatureImpl.java,v 1.11 2006/02/22 20:48:16 khussey Exp $
+ * $Id: TemplateSignatureImpl.java,v 1.12 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -131,6 +131,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetTemplate(TemplateableElement newTemplate,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newTemplate,
+			UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setTemplate(TemplateableElement newTemplate) {
 		if (newTemplate != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE && newTemplate != null)) {
@@ -144,8 +157,7 @@
 				msgs = ((InternalEObject) newTemplate).eInverseAdd(this,
 					UMLPackage.TEMPLATEABLE_ELEMENT__OWNED_TEMPLATE_SIGNATURE,
 					TemplateableElement.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newTemplate,
-				UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+			msgs = basicSetTemplate(newTemplate, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -225,8 +237,7 @@
 			case UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+				return basicSetTemplate((TemplateableElement) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -249,8 +260,7 @@
 				return ((InternalEList) getOwnedParameters()).basicRemove(
 					otherEnd, msgs);
 			case UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE :
-				return eBasicSetContainer(null,
-					UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE, msgs);
+				return basicSetTemplate(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TestIdentityActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TestIdentityActionImpl.java
index 8f4af05..17d1ec7 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TestIdentityActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TestIdentityActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TestIdentityActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: TestIdentityActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -509,11 +509,9 @@
 			case UMLPackage.TEST_IDENTITY_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.TEST_IDENTITY_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.TEST_IDENTITY_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.TEST_IDENTITY_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.TEST_IDENTITY_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.TEST_IDENTITY_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TimeEventImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TimeEventImpl.java
index e8988c5..f6f6d4c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TimeEventImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TimeEventImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TimeEventImpl.java,v 1.13 2006/02/22 23:07:14 khussey Exp $
+ * $Id: TimeEventImpl.java,v 1.14 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -289,8 +289,7 @@
 			case UMLPackage.TIME_EVENT__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.TIME_EVENT__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.TIME_EVENT__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.TIME_EVENT__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.TIME_EVENT__WHEN :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TransitionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TransitionImpl.java
index b9cc07d..7e1e28b 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TransitionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/TransitionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: TransitionImpl.java,v 1.16 2006/02/22 23:49:05 khussey Exp $
+ * $Id: TransitionImpl.java,v 1.17 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -29,6 +29,8 @@
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.eclipse.emf.ecore.resource.Resource;
+
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EcoreEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -371,6 +373,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetContainer(Region newContainer,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newContainer,
+			UMLPackage.TRANSITION__CONTAINER, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setContainer(Region newContainer) {
 		if (newContainer != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.TRANSITION__CONTAINER && newContainer != null)) {
@@ -383,8 +398,7 @@
 			if (newContainer != null)
 				msgs = ((InternalEObject) newContainer).eInverseAdd(this,
 					UMLPackage.REGION__TRANSITION, Region.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newContainer,
-				UMLPackage.TRANSITION__CONTAINER, msgs);
+			msgs = basicSetContainer(newContainer, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -553,9 +567,6 @@
 	 * @generated
 	 */
 	public void setGuard(Constraint newGuard) {
-		if (newGuard != null && !getOwnedRules().contains(newGuard)) {
-			getOwnedRules().add(newGuard);
-		}
 		Constraint guard = newGuard;
 		Object oldGuard = eVirtualSet(UMLPackage.TRANSITION__GUARD, guard);
 		if (eNotificationRequired())
@@ -564,6 +575,15 @@
 					? null
 					: oldGuard, guard));
 
+		Resource.Internal eInternalResource = eInternalResource();
+		if (eInternalResource == null || !eInternalResource.isLoading()) {
+			if (newGuard != null) {
+				EList ownedRule = getOwnedRules();
+				if (!ownedRule.contains(newGuard)) {
+					ownedRule.add(newGuard);
+				}
+			}
+		}
 	}
 
 	/**
@@ -987,8 +1007,7 @@
 			case UMLPackage.TRANSITION__CONTAINER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.TRANSITION__CONTAINER, msgs);
+				return basicSetContainer((Region) otherEnd, msgs);
 			case UMLPackage.TRANSITION__TARGET :
 				Vertex target = (Vertex) eVirtualGet(UMLPackage.TRANSITION__TARGET);
 				if (target != null)
@@ -1034,8 +1053,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.TRANSITION__CONTAINER :
-				return eBasicSetContainer(null,
-					UMLPackage.TRANSITION__CONTAINER, msgs);
+				return basicSetContainer(null, msgs);
 			case UMLPackage.TRANSITION__TARGET :
 				return basicSetTarget(null, msgs);
 			case UMLPackage.TRANSITION__EFFECT :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UnmarshallActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UnmarshallActionImpl.java
index 0f8e5c1..2bd2c63 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UnmarshallActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UnmarshallActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: UnmarshallActionImpl.java,v 1.15 2006/02/22 23:49:06 khussey Exp $
+ * $Id: UnmarshallActionImpl.java,v 1.16 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -425,11 +425,9 @@
 			case UMLPackage.UNMARSHALL_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.UNMARSHALL_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.UNMARSHALL_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.UNMARSHALL_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.UNMARSHALL_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.UNMARSHALL_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UseCaseImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UseCaseImpl.java
index 686e7a6..80cb058 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UseCaseImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/UseCaseImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: UseCaseImpl.java,v 1.17 2006/02/22 23:49:05 khussey Exp $
+ * $Id: UseCaseImpl.java,v 1.18 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -430,8 +430,8 @@
 			case UMLPackage.USE_CASE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.USE_CASE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.USE_CASE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.USE_CASE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -509,8 +509,7 @@
 				return ((InternalEList) getOwnedRules()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.USE_CASE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.USE_CASE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.USE_CASE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.USE_CASE__TEMPLATE_BINDING :
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValuePinImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValuePinImpl.java
index c90bc9c..61ce073 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValuePinImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValuePinImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ValuePinImpl.java,v 1.15 2006/02/22 23:07:14 khussey Exp $
+ * $Id: ValuePinImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -212,11 +212,9 @@
 			case UMLPackage.VALUE_PIN__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.VALUE_PIN__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.VALUE_PIN__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.VALUE_PIN__ACTIVITY :
-				return eBasicSetContainer(null, UMLPackage.VALUE_PIN__ACTIVITY,
-					msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.VALUE_PIN__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValueSpecificationActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValueSpecificationActionImpl.java
index ba14fce..523d818 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValueSpecificationActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/ValueSpecificationActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: ValueSpecificationActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: ValueSpecificationActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -359,12 +359,9 @@
 			case UMLPackage.VALUE_SPECIFICATION_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.VALUE_SPECIFICATION_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.VALUE_SPECIFICATION_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.VALUE_SPECIFICATION_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.VALUE_SPECIFICATION_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.VALUE_SPECIFICATION_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VariableImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VariableImpl.java
index 1dd8603..753c030 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VariableImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VariableImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: VariableImpl.java,v 1.18 2006/02/22 23:07:15 khussey Exp $
+ * $Id: VariableImpl.java,v 1.19 2006/03/01 17:56:38 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -526,6 +526,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetActivityScope(Activity newActivityScope,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newActivityScope,
+			UMLPackage.VARIABLE__ACTIVITY_SCOPE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setActivityScope(Activity newActivityScope) {
 		if (newActivityScope != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.VARIABLE__ACTIVITY_SCOPE && newActivityScope != null)) {
@@ -538,8 +551,7 @@
 			if (newActivityScope != null)
 				msgs = ((InternalEObject) newActivityScope).eInverseAdd(this,
 					UMLPackage.ACTIVITY__VARIABLE, Activity.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newActivityScope,
-				UMLPackage.VARIABLE__ACTIVITY_SCOPE, msgs);
+			msgs = basicSetActivityScope(newActivityScope, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -565,6 +577,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetScope(StructuredActivityNode newScope,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newScope,
+			UMLPackage.VARIABLE__SCOPE, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setScope(StructuredActivityNode newScope) {
 		if (newScope != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.VARIABLE__SCOPE && newScope != null)) {
@@ -578,8 +603,7 @@
 				msgs = ((InternalEObject) newScope).eInverseAdd(this,
 					UMLPackage.STRUCTURED_ACTIVITY_NODE__VARIABLE,
 					StructuredActivityNode.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newScope,
-				UMLPackage.VARIABLE__SCOPE, msgs);
+			msgs = basicSetScope(newScope, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -720,8 +744,8 @@
 			case UMLPackage.VARIABLE__OWNING_TEMPLATE_PARAMETER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.VARIABLE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(
+					(TemplateParameter) otherEnd, msgs);
 			case UMLPackage.VARIABLE__TEMPLATE_PARAMETER :
 				TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.VARIABLE__TEMPLATE_PARAMETER);
 				if (templateParameter != null)
@@ -736,13 +760,11 @@
 			case UMLPackage.VARIABLE__SCOPE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd, UMLPackage.VARIABLE__SCOPE,
-					msgs);
+				return basicSetScope((StructuredActivityNode) otherEnd, msgs);
 			case UMLPackage.VARIABLE__ACTIVITY_SCOPE :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.VARIABLE__ACTIVITY_SCOPE, msgs);
+				return basicSetActivityScope((Activity) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -767,8 +789,7 @@
 			case UMLPackage.VARIABLE__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.VARIABLE__OWNING_TEMPLATE_PARAMETER :
-				return eBasicSetContainer(null,
-					UMLPackage.VARIABLE__OWNING_TEMPLATE_PARAMETER, msgs);
+				return basicSetOwningTemplateParameter(null, msgs);
 			case UMLPackage.VARIABLE__TEMPLATE_PARAMETER :
 				return basicSetTemplateParameter(null, msgs);
 			case UMLPackage.VARIABLE__END :
@@ -778,11 +799,9 @@
 			case UMLPackage.VARIABLE__LOWER_VALUE :
 				return basicSetLowerValue(null, msgs);
 			case UMLPackage.VARIABLE__SCOPE :
-				return eBasicSetContainer(null, UMLPackage.VARIABLE__SCOPE,
-					msgs);
+				return basicSetScope(null, msgs);
 			case UMLPackage.VARIABLE__ACTIVITY_SCOPE :
-				return eBasicSetContainer(null,
-					UMLPackage.VARIABLE__ACTIVITY_SCOPE, msgs);
+				return basicSetActivityScope(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VertexImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VertexImpl.java
index 5c29a5b..42c5481 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VertexImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/VertexImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: VertexImpl.java,v 1.12 2006/02/22 20:48:17 khussey Exp $
+ * $Id: VertexImpl.java,v 1.13 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -180,6 +180,19 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public NotificationChain basicSetContainer(Region newContainer,
+			NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject) newContainer,
+			UMLPackage.VERTEX__CONTAINER, msgs);
+
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public void setContainer(Region newContainer) {
 		if (newContainer != eInternalContainer()
 			|| (eContainerFeatureID != UMLPackage.VERTEX__CONTAINER && newContainer != null)) {
@@ -192,8 +205,7 @@
 			if (newContainer != null)
 				msgs = ((InternalEObject) newContainer).eInverseAdd(this,
 					UMLPackage.REGION__SUBVERTEX, Region.class, msgs);
-			msgs = eBasicSetContainer((InternalEObject) newContainer,
-				UMLPackage.VERTEX__CONTAINER, msgs);
+			msgs = basicSetContainer(newContainer, msgs);
 			if (msgs != null)
 				msgs.dispatch();
 		} else if (eNotificationRequired())
@@ -234,8 +246,7 @@
 			case UMLPackage.VERTEX__CONTAINER :
 				if (eInternalContainer() != null)
 					msgs = eBasicRemoveFromContainer(msgs);
-				return eBasicSetContainer(otherEnd,
-					UMLPackage.VERTEX__CONTAINER, msgs);
+				return basicSetContainer((Region) otherEnd, msgs);
 		}
 		return eDynamicInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -266,8 +277,7 @@
 				return ((InternalEList) getIncomings()).basicRemove(otherEnd,
 					msgs);
 			case UMLPackage.VERTEX__CONTAINER :
-				return eBasicSetContainer(null, UMLPackage.VERTEX__CONTAINER,
-					msgs);
+				return basicSetContainer(null, msgs);
 		}
 		return eDynamicInverseRemove(otherEnd, featureID, msgs);
 	}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteStructuralFeatureActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteStructuralFeatureActionImpl.java
index a45feb8..e07e57c 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteStructuralFeatureActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteStructuralFeatureActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: WriteStructuralFeatureActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: WriteStructuralFeatureActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -264,13 +264,9 @@
 			case UMLPackage.WRITE_STRUCTURAL_FEATURE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.WRITE_STRUCTURAL_FEATURE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(
-					null,
-					UMLPackage.WRITE_STRUCTURAL_FEATURE_ACTION__IN_STRUCTURED_NODE,
-					msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.WRITE_STRUCTURAL_FEATURE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.WRITE_STRUCTURAL_FEATURE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.WRITE_STRUCTURAL_FEATURE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteVariableActionImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteVariableActionImpl.java
index 9198a58..a6922c3 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteVariableActionImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/impl/WriteVariableActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - initial API and implementation
  *
- * $Id: WriteVariableActionImpl.java,v 1.15 2006/02/22 23:49:05 khussey Exp $
+ * $Id: WriteVariableActionImpl.java,v 1.16 2006/03/01 17:56:37 khussey Exp $
  */
 package org.eclipse.uml2.uml.internal.impl;
 
@@ -256,11 +256,9 @@
 			case UMLPackage.WRITE_VARIABLE_ACTION__NAME_EXPRESSION :
 				return basicSetNameExpression(null, msgs);
 			case UMLPackage.WRITE_VARIABLE_ACTION__IN_STRUCTURED_NODE :
-				return eBasicSetContainer(null,
-					UMLPackage.WRITE_VARIABLE_ACTION__IN_STRUCTURED_NODE, msgs);
+				return basicSetInStructuredNode(null, msgs);
 			case UMLPackage.WRITE_VARIABLE_ACTION__ACTIVITY :
-				return eBasicSetContainer(null,
-					UMLPackage.WRITE_VARIABLE_ACTION__ACTIVITY, msgs);
+				return basicSetActivity(null, msgs);
 			case UMLPackage.WRITE_VARIABLE_ACTION__OUTGOING :
 				return ((InternalEList) getOutgoings()).basicRemove(otherEnd,
 					msgs);