*** empty log message ***
diff --git a/deprecated/examples/org.eclipse.uml2.examples.ui/src/org/eclipse/uml2/examples/ui/actions/ApplyProfileAction.java b/deprecated/examples/org.eclipse.uml2.examples.ui/src/org/eclipse/uml2/examples/ui/actions/ApplyProfileAction.java
index e2f4aee..ee43cbb 100644
--- a/deprecated/examples/org.eclipse.uml2.examples.ui/src/org/eclipse/uml2/examples/ui/actions/ApplyProfileAction.java
+++ b/deprecated/examples/org.eclipse.uml2.examples.ui/src/org/eclipse/uml2/examples/ui/actions/ApplyProfileAction.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: ApplyProfileAction.java,v 1.2 2004/05/04 19:16:52 khussey Exp $
+ * $Id: ApplyProfileAction.java,v 1.3 2004/06/17 01:08:46 khussey Exp $
  */
 package org.eclipse.uml2.examples.ui.actions;
 
@@ -24,6 +24,7 @@
 import org.eclipse.emf.common.command.UnexecutableCommand;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.edit.domain.EditingDomain;
 import org.eclipse.emf.edit.ui.celleditor.FeatureEditorDialog;
@@ -76,6 +77,8 @@
 			final org.eclipse.uml2.Package package_ = (org.eclipse.uml2.Package) collection
 				.toArray()[0];
 
+			ResourceSet resourceSet = package_.eResource().getResourceSet();
+
 			List choiceOfValues = new ArrayList();
 
 			IEditorReference[] editorReferences = editorPart.getSite()
@@ -84,22 +87,26 @@
 			for (int i = 0; i < editorReferences.length; i++) {
 
 				if ("org.eclipse.uml2.presentation.UML2EditorID" //$NON-NLS-1$
-				.equals(editorReferences[i].getId())) {
+					.equals(editorReferences[i].getId())) {
 
 					Resource resource = (Resource) ((UML2Editor) editorReferences[i]
 						.getEditor(true)).getEditingDomain().getResourceSet()
 						.getResources().get(0);
 
-					if (package_.eResource().getResourceSet() != resource
-						.getResourceSet()) {
+					if (resourceSet != resource.getResourceSet()) {
+
+						resource = resourceSet.getResource(resource.getURI(),
+							true);
 
 						Profile profile = (Profile) (null == resource
-							? null : EcoreUtil.getObjectByType(resource
-								.getContents(), UML2Package.eINSTANCE
-								.getProfile()));
+							? null
+							: EcoreUtil.getObjectByType(resource.getContents(),
+								UML2Package.eINSTANCE.getProfile()));
 
-						if (null != profile && profile.isDefined()
-							&& !package_.isApplied(profile)) {
+						if (null != profile
+							&& profile.isDefined()
+							&& package_.getAppliedVersion(profile) != profile
+								.getVersion()) {
 
 							choiceOfValues.add(profile);
 						}
@@ -107,7 +114,7 @@
 				}
 			}
 
-			String[] uris = new String[] {UML2Resource.BASIC_PROFILE_URI,
+			String[] uris = new String[]{UML2Resource.BASIC_PROFILE_URI,
 				UML2Resource.INTERMEDIATE_PROFILE_URI,
 				UML2Resource.COMPLETE_PROFILE_URI,
 				"pathmap://UML2_PROFILES/Ecore.profile.uml2"}; //$NON-NLS-1$
@@ -115,15 +122,18 @@
 			for (int i = 0; i < uris.length; i++) {
 
 				try {
-					Resource resource = package_.eResource().getResourceSet()
-						.getResource(URI.createURI(uris[i]), true);
+					Resource resource = resourceSet.getResource(URI
+						.createURI(uris[i]), true);
 
 					Profile profile = (Profile) (null == resource
-						? null : EcoreUtil.getObjectByType(resource
-							.getContents(), UML2Package.eINSTANCE.getProfile()));
+						? null
+						: EcoreUtil.getObjectByType(resource.getContents(),
+							UML2Package.eINSTANCE.getProfile()));
 
-					if (null != profile && profile.isDefined()
-						&& !package_.isApplied(profile)) {
+					if (null != profile
+						&& profile.isDefined()
+						&& package_.getAppliedVersion(profile) != profile
+							.getVersion()) {
 
 						choiceOfValues.add(profile);
 					}
@@ -144,9 +154,9 @@
 				"_UI_ApplyProfileActionCommand_label"); //$NON-NLS-1$
 
 			final FeatureEditorDialog dialog = new FeatureEditorDialog(
-					editorPart.getSite().getShell(), getLabelProvider(),
-					package_, UML2Package.eINSTANCE.getProfile(),
-					Collections.EMPTY_LIST, label, choiceOfValues);
+				editorPart.getSite().getShell(), getLabelProvider(), package_,
+				UML2Package.eINSTANCE.getProfile(), Collections.EMPTY_LIST,
+				label, choiceOfValues);
 			dialog.open();
 
 			if (FeatureEditorDialog.OK == dialog.getReturnCode()) {
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActionImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActionImpl.java
index 2095e6c..e3085bf 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActionImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: ActionImpl.java,v 1.5 2004/06/02 05:02:26 khussey Exp $
+ * $Id: ActionImpl.java,v 1.6 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
@@ -29,6 +29,7 @@
 import org.eclipse.emf.ecore.util.InternalEList;
 import org.eclipse.uml2.Action;
 import org.eclipse.uml2.Activity;
+import org.eclipse.uml2.Behavior;
 import org.eclipse.uml2.Classifier;
 import org.eclipse.uml2.Constraint;
 import org.eclipse.uml2.InputPin;
@@ -230,8 +231,9 @@
 	 * @generated NOT
 	 */
 	public Classifier basicGetContext() {
-		// TODO: implement this derived basic getter to return the 'Context' reference
-		return null;
+		return Behavior.class.isInstance(eContainer)
+			? ((Behavior) eContainer).getContext()
+			: null;
 	}
 
 	/**
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActivityGroupImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActivityGroupImpl.java
index a7802fe..0ec1b38 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActivityGroupImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ActivityGroupImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: ActivityGroupImpl.java,v 1.4 2004/06/02 05:02:26 khussey Exp $
+ * $Id: ActivityGroupImpl.java,v 1.5 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
@@ -155,7 +155,6 @@
 	 * @generated NOT
 	 */
 	public EList getContainedEdges() {
-		// TODO: implement this method
 		return new BasicEList.UnmodifiableEList(0, Collections.EMPTY_LIST.toArray());
 	}
 
@@ -165,7 +164,6 @@
 	 * @generated NOT
 	 */
 	public EList getContainedNodes() {
-		// TODO: implement this method
 		return new BasicEList.UnmodifiableEList(0, Collections.EMPTY_LIST.toArray());
 	}
 
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ClassImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ClassImpl.java
index 1200213..4ee8941 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ClassImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ClassImpl.java
@@ -8,13 +8,12 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: ClassImpl.java,v 1.17 2004/06/16 22:32:13 khussey Exp $
+ * $Id: ClassImpl.java,v 1.18 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -26,13 +25,17 @@
 import org.eclipse.emf.common.util.BasicEList;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.EcoreEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.uml2.Association;
 import org.eclipse.uml2.Behavior;
 import org.eclipse.uml2.Classifier;
 import org.eclipse.uml2.CollaborationOccurrence;
@@ -496,15 +499,59 @@
 	 * @generated NOT
 	 */
 	public EList getExtensions() {
-		// TODO: implement this derived getter to return the 'Extension' reference list
-		return new EcoreEList.UnmodifiableEList(this, UML2Package.eINSTANCE.getClass_Extension(), 0, Collections.EMPTY_LIST.toArray());
+		EList result = (EList) getCacheAdapter().get(this,
+			UML2Package.eINSTANCE.getClass_Extension());
+
+		if (null == result) {
+			List extensions = new ArrayList();
+
+			if (isMetaclass()) {
+
+				ResourceSet resourceSet = null == eResource()
+					? null
+					: eResource().getResourceSet();
+
+				if (null != resourceSet) {
+
+					for (Iterator settings = EcoreUtil.UsageCrossReferencer
+						.find(this, resourceSet).iterator(); settings.hasNext();) {
+
+						EStructuralFeature.Setting setting = (EStructuralFeature.Setting) settings
+							.next();
+
+						if (UML2Package.eINSTANCE.getTypedElement_Type() == setting
+							.getEStructuralFeature()) {
+
+							EObject eObject = setting.getEObject();
+
+							if (Property.class.isInstance(eObject)) {
+								Association association = ((Property) eObject)
+									.getAssociation();
+
+								if (Extension.class.isInstance(association)) {
+									extensions.add(association);
+								}
+							}
+						}
+					}
+				}
+			}
+
+			result = new EcoreEList.UnmodifiableEList(this,
+				UML2Package.eINSTANCE.getClass_Extension(), extensions.size(),
+				extensions.toArray());
+			getCacheAdapter().put(this,
+				UML2Package.eINSTANCE.getClass_Extension(), result);
+		}
+
+		return result;
 	}
 
     /**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
-     */
+	 */
     public Extension getExtension(String unqualifiedName) {
     	for (Iterator i = getExtensions().iterator(); i.hasNext(); ) {
     		Extension namedExtension = (Extension) i.next();
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ConnectorEndImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ConnectorEndImpl.java
index a39ab30..a8be90f 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ConnectorEndImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/ConnectorEndImpl.java
@@ -8,11 +8,12 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: ConnectorEndImpl.java,v 1.3 2004/05/20 03:20:03 khussey Exp $
+ * $Id: ConnectorEndImpl.java,v 1.4 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
 import java.util.Collection;
+import java.util.List;
 
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
@@ -21,7 +22,9 @@
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.uml2.Association;
 import org.eclipse.uml2.ConnectableElement;
+import org.eclipse.uml2.Connector;
 import org.eclipse.uml2.ConnectorEnd;
 import org.eclipse.uml2.Property;
 import org.eclipse.uml2.UML2Package;
@@ -104,13 +107,27 @@
 	 * @generated NOT
 	 */
 	public Property basicGetDefiningEnd() {
-		// TODO: implement this derived basic getter to return the 'Defining End' reference
+
+		if (Connector.class.isInstance(eContainer)) {
+			Connector connector = (Connector) eContainer;
+			Association type = connector.getType();
+
+			if (null != type) {
+				List ends = connector.getEnds();
+				List memberEnds = type.getMemberEnds();
+
+				if (ends.size() == memberEnds.size()) {
+					return (Property) memberEnds.get(ends.indexOf(this));
+				}
+			}
+		}
+
 		return null;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	public ConnectableElement getRole() {
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/OpaqueExpressionImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/OpaqueExpressionImpl.java
index e56db95..3d605da 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/OpaqueExpressionImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/OpaqueExpressionImpl.java
@@ -8,11 +8,12 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: OpaqueExpressionImpl.java,v 1.3 2004/05/20 03:20:02 khussey Exp $
+ * $Id: OpaqueExpressionImpl.java,v 1.4 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
 import java.util.Collection;
+import java.util.List;
 
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
@@ -181,7 +182,16 @@
 	 * @generated NOT
 	 */
 	public Parameter basicGetResult() {
-		// TODO: implement this derived basic getter to return the 'Result' reference
+		Behavior behavior = getBehavior();
+
+		if (null != behavior) {
+			List returnResults = behavior.getReturnResults();
+
+			if (1 == returnResults.size()) {
+				return (Parameter) returnResults.get(0);
+			}
+		}
+
 		return null;
 	}
 
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/RegionImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/RegionImpl.java
index 72156e3..e142820 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/RegionImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/RegionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: RegionImpl.java,v 1.6 2004/06/02 05:02:26 khussey Exp $
+ * $Id: RegionImpl.java,v 1.7 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
@@ -16,6 +16,7 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -25,6 +26,7 @@
 import org.eclipse.emf.common.util.DiagnosticChain;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
@@ -406,8 +408,41 @@
 	 * @generated NOT
 	 */
 	public EList getRedefinitionContexts() {
-		// TODO: implement this derived redefinition getter
-		return new EcoreEList.UnmodifiableEList(this, UML2Package.eINSTANCE.getRedefinableElement_RedefinitionContext(), 0, Collections.EMPTY_LIST.toArray());
+		EList result = (EList) getCacheAdapter().get(this,
+			UML2Package.eINSTANCE.getRedefinableElement_RedefinitionContext());
+
+		if (null == result) {
+			EObject container = eContainer;
+
+			while (null != container
+				&& !StateMachine.class.isInstance(container)) {
+
+				container = container.eContainer();
+			}
+
+			List redefinitionContexts = Collections.EMPTY_LIST;
+
+			if (null != container) {
+				StateMachine containingStateMachine = (StateMachine) container;
+
+				redefinitionContexts = Collections
+					.singletonList(null != containingStateMachine.getContext()
+						&& containingStateMachine.general().isEmpty()
+						? containingStateMachine.getContext()
+						: containingStateMachine);
+			}
+
+			result = new EcoreEList.UnmodifiableEList(this,
+				UML2Package.eINSTANCE
+					.getRedefinableElement_RedefinitionContext(),
+				redefinitionContexts.size(), redefinitionContexts.toArray());
+			getCacheAdapter().put(
+				this,
+				UML2Package.eINSTANCE
+					.getRedefinableElement_RedefinitionContext(), result);
+		}
+
+		return result;
 	}
 
 	/**
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/StateImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/StateImpl.java
index cdced84..dc1a164 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/StateImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/StateImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: StateImpl.java,v 1.6 2004/06/02 05:02:25 khussey Exp $
+ * $Id: StateImpl.java,v 1.7 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
@@ -16,6 +16,7 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -25,6 +26,7 @@
 import org.eclipse.emf.common.util.DiagnosticChain;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
@@ -871,8 +873,41 @@
 	 * @generated NOT
 	 */
 	public EList getRedefinitionContexts() {
-		// TODO: implement this derived redefinition getter
-		return new EcoreEList.UnmodifiableEList(this, UML2Package.eINSTANCE.getRedefinableElement_RedefinitionContext(), 0, Collections.EMPTY_LIST.toArray());
+		EList result = (EList) getCacheAdapter().get(this,
+			UML2Package.eINSTANCE.getRedefinableElement_RedefinitionContext());
+
+		if (null == result) {
+			EObject container = eContainer;
+
+			while (null != container
+				&& !StateMachine.class.isInstance(container)) {
+
+				container = container.eContainer();
+			}
+
+			List redefinitionContexts = Collections.EMPTY_LIST;
+
+			if (null != container) {
+				StateMachine containingStateMachine = (StateMachine) container;
+
+				redefinitionContexts = Collections
+					.singletonList(null != containingStateMachine.getContext()
+						&& containingStateMachine.general().isEmpty()
+						? containingStateMachine.getContext()
+						: containingStateMachine);
+			}
+
+			result = new EcoreEList.UnmodifiableEList(this,
+				UML2Package.eINSTANCE
+					.getRedefinableElement_RedefinitionContext(),
+				redefinitionContexts.size(), redefinitionContexts.toArray());
+			getCacheAdapter().put(
+				this,
+				UML2Package.eINSTANCE
+					.getRedefinableElement_RedefinitionContext(), result);
+		}
+
+		return result;
 	}
 
 	/**
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/TransitionImpl.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/TransitionImpl.java
index 4a9baba..4388e71 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/TransitionImpl.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/impl/TransitionImpl.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: TransitionImpl.java,v 1.5 2004/06/02 05:02:26 khussey Exp $
+ * $Id: TransitionImpl.java,v 1.6 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.impl;
 
@@ -16,6 +16,7 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Set;
 
 import org.eclipse.emf.common.notify.Notification;
@@ -23,6 +24,7 @@
 import org.eclipse.emf.common.util.BasicEList;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
@@ -34,6 +36,7 @@
 import org.eclipse.uml2.Constraint;
 import org.eclipse.uml2.Element;
 import org.eclipse.uml2.Region;
+import org.eclipse.uml2.StateMachine;
 import org.eclipse.uml2.StringExpression;
 import org.eclipse.uml2.TemplateSignature;
 import org.eclipse.uml2.Transition;
@@ -537,8 +540,41 @@
 	 * @generated NOT
 	 */
 	public EList getRedefinitionContexts() {
-		// TODO: implement this derived redefinition getter
-		return new EcoreEList.UnmodifiableEList(this, UML2Package.eINSTANCE.getRedefinableElement_RedefinitionContext(), 0, Collections.EMPTY_LIST.toArray());
+		EList result = (EList) getCacheAdapter().get(this,
+			UML2Package.eINSTANCE.getRedefinableElement_RedefinitionContext());
+
+		if (null == result) {
+			EObject container = eContainer;
+
+			while (null != container
+				&& !StateMachine.class.isInstance(container)) {
+
+				container = container.eContainer();
+			}
+
+			List redefinitionContexts = Collections.EMPTY_LIST;
+
+			if (null != container) {
+				StateMachine containingStateMachine = (StateMachine) container;
+
+				redefinitionContexts = Collections
+					.singletonList(null != containingStateMachine.getContext()
+						&& containingStateMachine.general().isEmpty()
+						? containingStateMachine.getContext()
+						: containingStateMachine);
+			}
+
+			result = new EcoreEList.UnmodifiableEList(this,
+				UML2Package.eINSTANCE
+					.getRedefinableElement_RedefinitionContext(),
+				redefinitionContexts.size(), redefinitionContexts.toArray());
+			getCacheAdapter().put(
+				this,
+				UML2Package.eINSTANCE
+					.getRedefinableElement_RedefinitionContext(), result);
+		}
+
+		return result;
 	}
 
 	/**
diff --git a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/util/CacheAdapter.java b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/util/CacheAdapter.java
index 8f2e3b0..1716fbc 100644
--- a/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/util/CacheAdapter.java
+++ b/deprecated/plugins/org.eclipse.uml2/src/org/eclipse/uml2/util/CacheAdapter.java
@@ -8,7 +8,7 @@
  * Contributors:
  *   IBM - Initial API and implementation
  *
- * $Id: CacheAdapter.java,v 1.5 2004/06/02 19:52:53 khussey Exp $
+ * $Id: CacheAdapter.java,v 1.6 2004/06/17 01:09:03 khussey Exp $
  */
 package org.eclipse.uml2.util;
 
@@ -20,7 +20,6 @@
 
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EAnnotation;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EcorePackage;
 import org.eclipse.emf.ecore.resource.Resource;
@@ -44,29 +43,30 @@
 	public void notifyChanged(Notification msg) {
 		super.notifyChanged(msg);
 
-		if (EcorePackage.eINSTANCE.getEModelElement_EAnnotations() == msg
-			.getFeature()) {
+		Object feature = msg.getFeature();
+
+		if (EcorePackage.eINSTANCE.getEModelElement_EAnnotations() == feature
+			|| EcorePackage.eINSTANCE.getEAnnotation_Details() == feature) {
 
 			switch (msg.getEventType()) {
 				case Notification.ADD :
-					((EAnnotation) msg.getNewValue()).eAdapters().add(this);
+					((EObject) msg.getNewValue()).eAdapters().add(this);
 					break;
 				case Notification.ADD_MANY :
 					for (Iterator newValues = ((List) msg.getNewValue())
 						.iterator(); newValues.hasNext();) {
 
-						((EAnnotation) newValues.next()).eAdapters().add(this);
+						((EObject) newValues.next()).eAdapters().add(this);
 					}
 					break;
 				case Notification.REMOVE :
-					((EAnnotation) msg.getOldValue()).eAdapters().remove(this);
+					((EObject) msg.getOldValue()).eAdapters().remove(this);
 					break;
 				case Notification.REMOVE_MANY :
 					for (Iterator oldValues = ((List) msg.getOldValue())
 						.iterator(); oldValues.hasNext();) {
 
-						((EAnnotation) oldValues.next()).eAdapters().remove(
-							this);
+						((EObject) oldValues.next()).eAdapters().remove(this);
 					}
 					break;
 			}