[507406] Adjust returns of redefined properties
diff --git a/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLEcoreTechnology.java b/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLEcoreTechnology.java
index c4fcd13..2bc6fec 100644
--- a/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLEcoreTechnology.java
+++ b/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLEcoreTechnology.java
@@ -87,6 +87,10 @@
 				}
 			}
 		}
+		List<Property> redefinedProperties = property.getRedefinedProperties();
+		if (redefinedProperties.size() > 0) {
+			return new UMLRedefinedNavigationProperty(environmentFactory.getCompleteModel(), property);
+		}
 		return super.createExplicitNavigationPropertyImplementation(environmentFactory, asNavigationExp, sourceValue, property);
 	}
 
diff --git a/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLRedefinedNavigationProperty.java b/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLRedefinedNavigationProperty.java
new file mode 100644
index 0000000..8c42a42
--- /dev/null
+++ b/plugins/org.eclipse.ocl.pivot.uml/src/org/eclipse/ocl/pivot/uml/internal/utilities/UMLRedefinedNavigationProperty.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     E.D.Willink - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ocl.pivot.uml.internal.utilities;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.pivot.CollectionType;
+import org.eclipse.ocl.pivot.CompleteClass;
+import org.eclipse.ocl.pivot.CompleteModel;
+import org.eclipse.ocl.pivot.Property;
+import org.eclipse.ocl.pivot.Type;
+import org.eclipse.ocl.pivot.evaluation.Executor;
+import org.eclipse.ocl.pivot.ids.CollectionTypeId;
+import org.eclipse.ocl.pivot.ids.TypeId;
+import org.eclipse.ocl.pivot.internal.library.ExplicitNavigationProperty;
+import org.eclipse.ocl.pivot.utilities.ValueUtil;
+import org.eclipse.ocl.pivot.values.CollectionValue;
+import org.eclipse.ocl.pivot.values.InvalidValueException;
+
+/**
+ * The static instance of UMLRedefinedNavigationProperty supports evaluation of
+ * a property call that navigates a relationship that uses a UML redefinition.
+ */
+class UMLRedefinedNavigationProperty extends ExplicitNavigationProperty
+{
+	protected final @NonNull Property baseProperty;
+	
+	public UMLRedefinedNavigationProperty(@NonNull CompleteModel completeModel, @NonNull Property property) {
+		super(property);
+		CompleteClass baseCompleteClass = completeModel.getCompleteClass(property.getOwningClass());
+		Property baseProperty = property;
+		for (@NonNull Property aProperty : property.getRedefinedProperties()) {
+			CompleteClass aCompleteClass = completeModel.getCompleteClass(aProperty.getOwningClass());
+			if (baseCompleteClass.conformsTo(aCompleteClass)) {
+				baseCompleteClass = aCompleteClass;
+				baseProperty = aProperty;
+			}
+		}
+		this.baseProperty = baseProperty;
+	}
+	
+	@Override
+	public @Nullable Object evaluate(@NonNull Executor executor, @NonNull TypeId returnTypeId, @Nullable Object sourceValue) {
+		Object unredefinedResult = super.evaluate(executor, returnTypeId, sourceValue);
+		Type unredefinedType = baseProperty.getType();
+		Type redefinedType = property.getType();
+		if (unredefinedType instanceof CollectionType) {
+			if (!(redefinedType instanceof CollectionType)) {
+				CollectionValue asCollectionValue = ValueUtil.asCollectionValue(unredefinedResult);
+				int intSize = asCollectionValue.intSize();
+				switch (intSize) {
+					case 0: {
+						return null;
+					}
+					case 1: {
+						return asCollectionValue.getElements().iterator().next();
+					}
+					default: {
+						throw new InvalidValueException("Too many values for redefined ''{0}''", property);
+					}
+				}
+			}
+			else {
+				return unredefinedResult;
+			}
+		}
+		else {
+			if (redefinedType instanceof CollectionType) {
+				CollectionType collectionType = (CollectionType) redefinedType;
+				CollectionTypeId typeId = collectionType.getTypeId();
+				List<Object> valueAsList = Collections.singletonList(unredefinedResult);
+				return executor.getIdResolver().createCollectionOfAll(typeId, valueAsList);
+			}
+			else {
+				return unredefinedResult;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/UMLConsoleTests.java b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/UMLConsoleTests.java
index e962264..1c1e02b 100644
--- a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/UMLConsoleTests.java
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/UMLConsoleTests.java
@@ -116,6 +116,23 @@
 		consolePage.cancelValidation();
 	}
 
+	public void testConsole_Bug507406() throws Exception {
+		ResourceSet resourceSet = new ResourceSetImpl();		// Emulate the separate UML Editor's AdapterFactoryEditingDomainResourceSet
+
+		URI testModelURI = getProjectFileURI("Bug507406.uml");
+        Resource umlResource = resourceSet.getResource(testModelURI, true);
+        org.eclipse.uml2.uml.Model model = (org.eclipse.uml2.uml.Model)umlResource.getContents().get(0);
+        org.eclipse.uml2.uml.Interaction interaction1 = (org.eclipse.uml2.uml.Interaction)model.getOwnedType("Interaction1");
+        org.eclipse.uml2.uml.Message message = interaction1.getMessage("Message");
+        //
+		assertConsoleResult(consolePage, message, "self", "RootElement::Interaction1::Message\n");
+		assertConsoleResult(consolePage, message, "self.receiveEvent", "RootElement::Interaction1::MessageRecv\n");
+		assertConsoleResult(consolePage, message, "self.receiveEvent.oclAsType(MessageOccurrenceSpecification).covered", "RootElement::Interaction1::Lifeline0\n");
+		assertConsoleResult(consolePage, message, "self.receiveEvent.oclAsType(MessageOccurrenceSpecification).covered.extension_MyLifeline2", "Lifeline0$MyLifeline2\n");
+		//
+		consolePage.cancelValidation();
+	}
+
 	@SuppressWarnings({"unused"})
 	public void testConsole_UML() throws Exception {
 		doDelete(PLUGIN_ID);
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/models/Bug507406.uml b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/models/Bug507406.uml
new file mode 100644
index 0000000..5dd529d
--- /dev/null
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/models/Bug507406.uml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:RootElement="http:///schemas/RootElement/_csK7UKgLEeak5_xkUKtnhA/2" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/RootElement/_csK7UKgLEeak5_xkUKtnhA/2 Bug507406Profile.uml#_csMwgKgLEeak5_xkUKtnhA">
+  <uml:Model xmi:id="_xgXYcKgKEeak5_xkUKtnhA" name="RootElement">
+    <packagedElement xmi:type="uml:Interaction" xmi:id="_xh0xAKgKEeak5_xkUKtnhA" name="Interaction1">
+      <lifeline xmi:type="uml:Lifeline" xmi:id="_zrqLUKgKEeak5_xkUKtnhA" name="Lifeline" coveredBy="_3R0ZsKgKEeak5_xkUKtnhA"/>
+      <lifeline xmi:type="uml:Lifeline" xmi:id="_0JNC8KgKEeak5_xkUKtnhA" name="Lifeline0" coveredBy="_3R1AwKgKEeak5_xkUKtnhA"/>
+      <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_3R0ZsKgKEeak5_xkUKtnhA" name="MessageSend" covered="_zrqLUKgKEeak5_xkUKtnhA" message="_3RxWYKgKEeak5_xkUKtnhA"/>
+      <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_3R1AwKgKEeak5_xkUKtnhA" name="MessageRecv" covered="_0JNC8KgKEeak5_xkUKtnhA" message="_3RxWYKgKEeak5_xkUKtnhA"/>
+      <message xmi:type="uml:Message" xmi:id="_3RxWYKgKEeak5_xkUKtnhA" name="Message" messageSort="asynchCall" receiveEvent="_3R1AwKgKEeak5_xkUKtnhA" sendEvent="_3R0ZsKgKEeak5_xkUKtnhA"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_xj9fAKgKEeak5_xkUKtnhA">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dghwcKgLEeak5_xkUKtnhA" source="PapyrusVersion">
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dghwcagLEeak5_xkUKtnhA" key="Version" value="0.0.3"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dghwcqgLEeak5_xkUKtnhA" key="Comment" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dghwc6gLEeak5_xkUKtnhA" key="Copyright" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dghwdKgLEeak5_xkUKtnhA" key="Date" value="2016-11-11"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dghwdagLEeak5_xkUKtnhA" key="Author" value=""/>
+      </eAnnotations>
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xj-tIKgKEeak5_xkUKtnhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="Bug507406Profile.uml#_csMwgKgLEeak5_xkUKtnhA"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="Bug507406Profile.uml#_t32PEKgJEeatLuJHQg7WhA"/>
+    </profileApplication>
+  </uml:Model>
+  <RootElement:MyLifeline2 xmi:id="_1Lke4KgKEeak5_xkUKtnhA" base_Lifeline="_0JNC8KgKEeak5_xkUKtnhA"/>
+  <RootElement:MyLifeline1 xmi:id="_2W-iEKgKEeak5_xkUKtnhA" base_Lifeline="_zrqLUKgKEeak5_xkUKtnhA"/>
+  <RootElement:MyMessage xmi:id="_3zoGQKgKEeak5_xkUKtnhA" base_Message="_3RxWYKgKEeak5_xkUKtnhA"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/models/Bug507406Profile.uml b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/models/Bug507406Profile.uml
new file mode 100644
index 0000000..2fea727
--- /dev/null
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/models/Bug507406Profile.uml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_t32PEKgJEeatLuJHQg7WhA" name="RootElement" metaclassReference="_xFhE8KgJEeatLuJHQg7WhA _zDZG4KgJEeatLuJHQg7WhA">
+  <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8-OYUagJEeatLuJHQg7WhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+    <contents xmi:type="ecore:EPackage" xmi:id="_csMwgKgLEeak5_xkUKtnhA" name="RootElement" nsURI="http:///schemas/RootElement/_csK7UKgLEeak5_xkUKtnhA/2" nsPrefix="RootElement">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_csN-o6gLEeak5_xkUKtnhA" source="PapyrusVersion">
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_csN-pKgLEeak5_xkUKtnhA" key="Version" value="0.0.3"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_csN-pagLEeak5_xkUKtnhA" key="Comment" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_csN-pqgLEeak5_xkUKtnhA" key="Copyright" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_csN-p6gLEeak5_xkUKtnhA" key="Date" value="2016-11-11"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_csN-qKgLEeak5_xkUKtnhA" key="Author" value=""/>
+      </eAnnotations>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_csMwgagLEeak5_xkUKtnhA" name="MyLifeline1">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_csMwgqgLEeak5_xkUKtnhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_1_LikKgJEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_csMwg6gLEeak5_xkUKtnhA" name="base_Lifeline" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_csMwhagLEeak5_xkUKtnhA" name="MyMessage">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_csMwhqgLEeak5_xkUKtnhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_3bo5gKgJEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_csMwh6gLEeak5_xkUKtnhA" name="base_Message" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Message"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_csMwiagLEeak5_xkUKtnhA" name="MyLifeline2">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_csMwiqgLEeak5_xkUKtnhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_LC1ikKgKEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_csMwi6gLEeak5_xkUKtnhA" name="base_Lifeline" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+    </contents>
+    <contents xmi:type="ecore:EPackage" xmi:id="_QkOHgagKEeatLuJHQg7WhA" name="RootElement" nsURI="http:///schemas/RootElement/_QkOHgKgKEeatLuJHQg7WhA/1" nsPrefix="RootElement">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QkOHkagKEeatLuJHQg7WhA" source="PapyrusVersion">
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QkOHkqgKEeatLuJHQg7WhA" key="Version" value="0.0.2"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QkOHk6gKEeatLuJHQg7WhA" key="Comment" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QkOHlKgKEeatLuJHQg7WhA" key="Copyright" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QkOHlagKEeatLuJHQg7WhA" key="Date" value="2016-11-11"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QkOHlqgKEeatLuJHQg7WhA" key="Author" value=""/>
+      </eAnnotations>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_QkOHgqgKEeatLuJHQg7WhA" name="MyLifeline1">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QkOHg6gKEeatLuJHQg7WhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_1_LikKgJEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QkOHhKgKEeatLuJHQg7WhA" name="base_Lifeline" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_QkOHhqgKEeatLuJHQg7WhA" name="MyMessage">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QkOHh6gKEeatLuJHQg7WhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_3bo5gKgJEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QkOHiKgKEeatLuJHQg7WhA" name="base_Message" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Message"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_QkOHiqgKEeatLuJHQg7WhA" name="MyLifeLine2">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QkOHi6gKEeatLuJHQg7WhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_LC1ikKgKEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_QkOHjKgKEeatLuJHQg7WhA" name="base_Lifeline" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+    </contents>
+    <contents xmi:type="ecore:EPackage" xmi:id="_8-O_YKgJEeatLuJHQg7WhA" name="RootElement" nsURI="http:///schemas/RootElement/_8-OYUKgJEeatLuJHQg7WhA/0" nsPrefix="RootElement">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8-O_a6gJEeatLuJHQg7WhA" source="PapyrusVersion">
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-O_bKgJEeatLuJHQg7WhA" key="Version" value="0.0.1"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-O_bagJEeatLuJHQg7WhA" key="Comment" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-O_bqgJEeatLuJHQg7WhA" key="Copyright" value=""/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-O_b6gJEeatLuJHQg7WhA" key="Date" value="2016-11-11"/>
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-O_cKgJEeatLuJHQg7WhA" key="Author" value=""/>
+      </eAnnotations>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_8-O_YagJEeatLuJHQg7WhA" name="MyLifeline">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8-O_YqgJEeatLuJHQg7WhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_1_LikKgJEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_8-O_Y6gJEeatLuJHQg7WhA" name="base_Lifeline" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+      <eClassifiers xmi:type="ecore:EClass" xmi:id="_8-O_ZagJEeatLuJHQg7WhA" name="MyMessage">
+        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8-O_ZqgJEeatLuJHQg7WhA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_3bo5gKgJEeatLuJHQg7WhA"/>
+        <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_8-O_Z6gJEeatLuJHQg7WhA" name="base_Message" ordered="false" lowerBound="1">
+          <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Message"/>
+        </eStructuralFeatures>
+      </eClassifiers>
+    </contents>
+  </eAnnotations>
+  <elementImport xmi:type="uml:ElementImport" xmi:id="_xFhE8KgJEeatLuJHQg7WhA" alias="Lifeline">
+    <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Lifeline"/>
+  </elementImport>
+  <elementImport xmi:type="uml:ElementImport" xmi:id="_zDZG4KgJEeatLuJHQg7WhA" alias="Message">
+    <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Message"/>
+  </elementImport>
+  <packagedElement xmi:type="uml:Stereotype" xmi:id="_1_LikKgJEeatLuJHQg7WhA" name="MyLifeline1">
+    <ownedAttribute xmi:type="uml:Property" xmi:id="_OzxdkagKEeatLuJHQg7WhA" name="base_Lifeline" association="_Ozw2gKgKEeatLuJHQg7WhA">
+      <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Lifeline"/>
+    </ownedAttribute>
+  </packagedElement>
+  <packagedElement xmi:type="uml:Stereotype" xmi:id="_3bo5gKgJEeatLuJHQg7WhA" name="MyMessage">
+    <ownedAttribute xmi:type="uml:Property" xmi:id="_7GtdEqgJEeatLuJHQg7WhA" name="base_Message" association="_7GtdEKgJEeatLuJHQg7WhA">
+      <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Message"/>
+    </ownedAttribute>
+  </packagedElement>
+  <packagedElement xmi:type="uml:Extension" xmi:id="_7GtdEKgJEeatLuJHQg7WhA" name="E_MyMessage_Message1" memberEnd="_7GtdEagJEeatLuJHQg7WhA _7GtdEqgJEeatLuJHQg7WhA">
+    <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_7GtdEagJEeatLuJHQg7WhA" name="extension_MyMessage" type="_3bo5gKgJEeatLuJHQg7WhA" aggregation="composite" association="_7GtdEKgJEeatLuJHQg7WhA"/>
+  </packagedElement>
+  <packagedElement xmi:type="uml:Stereotype" xmi:id="_LC1ikKgKEeatLuJHQg7WhA" name="MyLifeline2">
+    <ownedAttribute xmi:type="uml:Property" xmi:id="_PawlEagKEeatLuJHQg7WhA" name="base_Lifeline" association="_Pav-AKgKEeatLuJHQg7WhA">
+      <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Lifeline"/>
+    </ownedAttribute>
+  </packagedElement>
+  <packagedElement xmi:type="uml:Extension" xmi:id="_Ozw2gKgKEeatLuJHQg7WhA" name="E_MyLifeline1_Lifeline1" memberEnd="_OzxdkKgKEeatLuJHQg7WhA _OzxdkagKEeatLuJHQg7WhA">
+    <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_OzxdkKgKEeatLuJHQg7WhA" name="extension_MyLifeline1" type="_1_LikKgJEeatLuJHQg7WhA" aggregation="composite" association="_Ozw2gKgKEeatLuJHQg7WhA"/>
+  </packagedElement>
+  <packagedElement xmi:type="uml:Extension" xmi:id="_Pav-AKgKEeatLuJHQg7WhA" name="E_MyLifeline2_Lifeline1" memberEnd="_PawlEKgKEeatLuJHQg7WhA _PawlEagKEeatLuJHQg7WhA">
+    <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_PawlEKgKEeatLuJHQg7WhA" name="extension_MyLifeline2" type="_LC1ikKgKEeatLuJHQg7WhA" aggregation="composite" association="_Pav-AKgKEeatLuJHQg7WhA"/>
+  </packagedElement>
+</uml:Profile>