[397139] Ensuring redefined node properties are included in unions.
diff --git a/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/ConditionalNodeItemProvider.java b/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/ConditionalNodeItemProvider.java
index 818819d..f59a424 100644
--- a/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/ConditionalNodeItemProvider.java
+++ b/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/ConditionalNodeItemProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2005, 2012 IBM Corporation, Embarcadero Technologies, CEA, 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
@@ -9,13 +9,13 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 215418, 204200
  *   Kenn Hussey - 323181
- *   Kenn Hussey (CEA) - 327039
+ *   Kenn Hussey (CEA) - 327039, 397139
  *
- * $Id: ConditionalNodeItemProvider.java,v 1.11 2010/09/28 21:00:19 khussey Exp $
  */
 package org.eclipse.uml2.uml.edit.providers;
 
 import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.emf.common.notify.AdapterFactory;
@@ -23,6 +23,7 @@
 
 import org.eclipse.emf.ecore.EStructuralFeature;
 
+import org.eclipse.emf.edit.command.CommandParameter;
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
 import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -167,16 +168,22 @@
 	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @generated
+	 * @generated NOT
 	 */
 	@Override
 	public Collection<? extends EStructuralFeature> getChildrenFeatures(
 			Object object) {
+
 		if (childrenFeatures == null) {
 			super.getChildrenFeatures(object);
+
+			childrenFeatures
+				.remove(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT);
+
 			childrenFeatures.add(UMLPackage.Literals.CONDITIONAL_NODE__CLAUSE);
 			childrenFeatures.add(UMLPackage.Literals.CONDITIONAL_NODE__RESULT);
 		}
+
 		return childrenFeatures;
 	}
 
@@ -259,13 +266,27 @@
 	 * that can be created under this object.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @generated
+	 * @generated NOT
 	 */
 	@Override
 	protected void collectNewChildDescriptors(
 			Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
 
+		for (Iterator<Object> childDescriptorIterator = newChildDescriptors
+			.iterator(); childDescriptorIterator.hasNext();) {
+			Object commandParameter = childDescriptorIterator.next();
+
+			if (commandParameter instanceof CommandParameter) {
+
+				if (((CommandParameter) commandParameter).feature
+					.equals(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT)) {
+
+					childDescriptorIterator.remove();
+				}
+			}
+		}
+
 		newChildDescriptors.add(createChildParameter(
 			UMLPackage.Literals.CONDITIONAL_NODE__CLAUSE,
 			UMLFactory.eINSTANCE.createClause()));
diff --git a/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/LoopNodeItemProvider.java b/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/LoopNodeItemProvider.java
index 9dfcc65..7b6f6d5 100644
--- a/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/LoopNodeItemProvider.java
+++ b/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/LoopNodeItemProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2005, 2012 IBM Corporation, Embarcadero Technologies, CEA, 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
@@ -9,13 +9,13 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 215418, 204200
  *   Kenn Hussey - 323181
- *   Kenn Hussey (CEA) - 327039
+ *   Kenn Hussey (CEA) - 327039, 397139
  *
- * $Id: LoopNodeItemProvider.java,v 1.12 2010/09/28 21:00:19 khussey Exp $
  */
 package org.eclipse.uml2.uml.edit.providers;
 
 import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.emf.common.notify.AdapterFactory;
@@ -23,6 +23,7 @@
 
 import org.eclipse.emf.ecore.EStructuralFeature;
 
+import org.eclipse.emf.edit.command.CommandParameter;
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
 import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -265,17 +266,25 @@
 	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @generated
+	 * @generated NOT
 	 */
 	@Override
 	public Collection<? extends EStructuralFeature> getChildrenFeatures(
 			Object object) {
+
 		if (childrenFeatures == null) {
 			super.getChildrenFeatures(object);
+
+			childrenFeatures
+				.remove(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT);
+			childrenFeatures
+				.remove(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT);
+
 			childrenFeatures
 				.add(UMLPackage.Literals.LOOP_NODE__LOOP_VARIABLE_INPUT);
 			childrenFeatures.add(UMLPackage.Literals.LOOP_NODE__RESULT);
 		}
+
 		return childrenFeatures;
 	}
 
@@ -357,13 +366,30 @@
 	 * that can be created under this object.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @generated
+	 * @generated NOT
 	 */
 	@Override
 	protected void collectNewChildDescriptors(
 			Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
 
+		for (Iterator<Object> childDescriptorIterator = newChildDescriptors
+			.iterator(); childDescriptorIterator.hasNext();) {
+			Object commandParameter = childDescriptorIterator.next();
+
+			if (commandParameter instanceof CommandParameter) {
+				Object feature = ((CommandParameter) commandParameter).feature;
+
+				if (feature
+					.equals(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT)
+					|| feature
+						.equals(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT)) {
+
+					childDescriptorIterator.remove();
+				}
+			}
+		}
+
 		newChildDescriptors.add(createChildParameter(
 			UMLPackage.Literals.LOOP_NODE__LOOP_VARIABLE_INPUT,
 			UMLFactory.eINSTANCE.createInputPin()));
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 4e1f4a8..745fc8e 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2005, 2012 IBM Corporation, Embarcadero Technologies, CEA, 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
@@ -9,7 +9,7 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 204200
  *   Kenn Hussey - 286329, 323181
- *   Kenn Hussey (CEA) - 327039, 351774
+ *   Kenn Hussey (CEA) - 327039, 351774, 397139
  *
  */
 package org.eclipse.uml2.uml.internal.impl;
@@ -1284,4 +1284,26 @@
 		return false;
 	}
 
+	protected static final int[] OUTPUT_ESUBSETS = new int[]{UMLPackage.CONDITIONAL_NODE__RESULT};
+
+	@Override
+	public EList<OutputPin> getOutputs() {
+		CacheAdapter cache = getCacheAdapter();
+		if (cache != null) {
+			Resource eResource = eResource();
+			@SuppressWarnings("unchecked")
+			EList<OutputPin> outputs = (EList<OutputPin>) cache.get(eResource,
+				this, UMLPackage.Literals.ACTION__OUTPUT);
+			if (outputs == null) {
+				cache.put(eResource, this, UMLPackage.Literals.ACTION__OUTPUT,
+					outputs = new DerivedUnionEObjectEList<OutputPin>(
+						OutputPin.class, this,
+						UMLPackage.CONDITIONAL_NODE__OUTPUT, OUTPUT_ESUBSETS));
+			}
+			return outputs;
+		}
+		return new DerivedUnionEObjectEList<OutputPin>(OutputPin.class, this,
+			UMLPackage.CONDITIONAL_NODE__OUTPUT, OUTPUT_ESUBSETS);
+	}
+
 } //ConditionalNodeImpl
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 b01feac..04bd558 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2005, 2012 IBM Corporation, Embarcadero Technologies, CEA, 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
@@ -9,7 +9,7 @@
  *   IBM - initial API and implementation
  *   Kenn Hussey (Embarcadero Technologies) - 204200
  *   Kenn Hussey - 286329, 323181
- *   Kenn Hussey (CEA) - 327039, 351774
+ *   Kenn Hussey (CEA) - 327039, 351774, 397139
  *
  */
 package org.eclipse.uml2.uml.internal.impl;
@@ -31,10 +31,13 @@
 
 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.EObjectResolvingEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 
+import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.common.util.DerivedUnionEObjectEList;
 import org.eclipse.uml2.uml.Activity;
 import org.eclipse.uml2.uml.ActivityEdge;
 import org.eclipse.uml2.uml.ActivityNode;
@@ -1583,4 +1586,48 @@
 		return false;
 	}
 
+	protected static final int[] INPUT_ESUBSETS = new int[]{UMLPackage.LOOP_NODE__LOOP_VARIABLE_INPUT};
+
+	@Override
+	public EList<InputPin> getInputs() {
+		CacheAdapter cache = getCacheAdapter();
+		if (cache != null) {
+			Resource eResource = eResource();
+			@SuppressWarnings("unchecked")
+			EList<InputPin> inputs = (EList<InputPin>) cache.get(eResource,
+				this, UMLPackage.Literals.ACTION__INPUT);
+			if (inputs == null) {
+				cache.put(eResource, this, UMLPackage.Literals.ACTION__INPUT,
+					inputs = new DerivedUnionEObjectEList<InputPin>(
+						InputPin.class, this, UMLPackage.LOOP_NODE__INPUT,
+						INPUT_ESUBSETS));
+			}
+			return inputs;
+		}
+		return new DerivedUnionEObjectEList<InputPin>(InputPin.class, this,
+			UMLPackage.LOOP_NODE__INPUT, INPUT_ESUBSETS);
+	}
+
+	protected static final int[] OUTPUT_ESUBSETS = new int[]{UMLPackage.LOOP_NODE__RESULT};
+
+	@Override
+	public EList<OutputPin> getOutputs() {
+		CacheAdapter cache = getCacheAdapter();
+		if (cache != null) {
+			Resource eResource = eResource();
+			@SuppressWarnings("unchecked")
+			EList<OutputPin> outputs = (EList<OutputPin>) cache.get(eResource,
+				this, UMLPackage.Literals.ACTION__OUTPUT);
+			if (outputs == null) {
+				cache.put(eResource, this, UMLPackage.Literals.ACTION__OUTPUT,
+					outputs = new DerivedUnionEObjectEList<OutputPin>(
+						OutputPin.class, this, UMLPackage.LOOP_NODE__OUTPUT,
+						OUTPUT_ESUBSETS));
+			}
+			return outputs;
+		}
+		return new DerivedUnionEObjectEList<OutputPin>(OutputPin.class, this,
+			UMLPackage.LOOP_NODE__OUTPUT, OUTPUT_ESUBSETS);
+	}
+
 } //LoopNodeImpl