From 9991926ea59b66979b5cdee294ece6829837f6f9 Mon Sep 17 00:00:00 2001
From: Hallvard Traetteberg <hal@ntnu.no>
Date: Tue, 15 Oct 2019 10:19:43 +0200
Subject: [PATCH] Diagram editor example

---
 tdt4250.ra.diagram.examples/.project          |  12 +
 .../representations.aird                      | 378 ++++++++++++++++++
 tdt4250.ra.diagram.examples/sample.ra         |  13 +
 tdt4250.ra.diagram/.classpath                 |   7 +
 tdt4250.ra.diagram/.project                   |  24 ++
 tdt4250.ra.diagram/META-INF/MANIFEST.MF       |  16 +
 tdt4250.ra.diagram/build.properties           |   7 +
 tdt4250.ra.diagram/description/ra.odesign     |  66 +++
 tdt4250.ra.diagram/plugin.properties          |   3 +
 tdt4250.ra.diagram/plugin.xml                 |  10 +
 .../src/tdt4250/ra/diagram/Activator.java     |  66 +++
 .../src/tdt4250/ra/diagram/Services.java      |  17 +
 tdt4250.ra/model/sample.xmi                   |  30 +-
 13 files changed, 639 insertions(+), 10 deletions(-)
 create mode 100644 tdt4250.ra.diagram.examples/.project
 create mode 100644 tdt4250.ra.diagram.examples/representations.aird
 create mode 100644 tdt4250.ra.diagram.examples/sample.ra
 create mode 100644 tdt4250.ra.diagram/.classpath
 create mode 100644 tdt4250.ra.diagram/.project
 create mode 100644 tdt4250.ra.diagram/META-INF/MANIFEST.MF
 create mode 100644 tdt4250.ra.diagram/build.properties
 create mode 100644 tdt4250.ra.diagram/description/ra.odesign
 create mode 100644 tdt4250.ra.diagram/plugin.properties
 create mode 100644 tdt4250.ra.diagram/plugin.xml
 create mode 100644 tdt4250.ra.diagram/src/tdt4250/ra/diagram/Activator.java
 create mode 100644 tdt4250.ra.diagram/src/tdt4250/ra/diagram/Services.java

diff --git a/tdt4250.ra.diagram.examples/.project b/tdt4250.ra.diagram.examples/.project
new file mode 100644
index 0000000..735ed6e
--- /dev/null
+++ b/tdt4250.ra.diagram.examples/.project
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>tdt4250.ra.diagram.examples</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.sirius.nature.modelingproject</nature>
+	</natures>
+</projectDescription>
diff --git a/tdt4250.ra.diagram.examples/representations.aird b/tdt4250.ra.diagram.examples/representations.aird
new file mode 100644
index 0000000..5b50b2f
--- /dev/null
+++ b/tdt4250.ra.diagram.examples/representations.aird
@@ -0,0 +1,378 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:ra="platform:/plugin/tdt4250.ra/model/ra.ecore" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+  <viewpoint:DAnalysis uid="_AVqDsO8dEemmF8GBN-uQhg" selectedViews="_AHxjQO8eEemYzIQ48BtxKg" version="14.1.0.201810161215">
+    <semanticResources>sample.ra</semanticResources>
+    <ownedViews xmi:type="viewpoint:DView" uid="_AHxjQO8eEemYzIQ48BtxKg">
+      <viewpoint xmi:type="description:Viewpoint" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']"/>
+      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_G4Y7cO8eEemYzIQ48BtxKg" name="Ra Diagram 1" repPath="#_G39doO8eEemYzIQ48BtxKg">
+        <description xmi:type="description_1:DiagramDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']"/>
+        <target xmi:type="ra:Department" href="sample.ra#/"/>
+      </ownedRepresentationDescriptors>
+    </ownedViews>
+  </viewpoint:DAnalysis>
+  <diagram:DSemanticDiagram uid="_G39doO8eEemYzIQ48BtxKg" name="Ra Diagram 1">
+    <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_G4UqAO8eEemYzIQ48BtxKg" source="DANNOTATION_CUSTOMIZATION_KEY">
+      <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_G4VREO8eEemYzIQ48BtxKg"/>
+    </ownedAnnotationEntries>
+    <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_G4sdcO8eEemYzIQ48BtxKg" source="GMF_DIAGRAMS">
+      <data xmi:type="notation:Diagram" xmi:id="_G4sdce8eEemYzIQ48BtxKg" type="Sirius" element="_G39doO8eEemYzIQ48BtxKg" measurementUnit="Pixel">
+        <children xmi:type="notation:Node" xmi:id="_ZFMDEO8eEemYzIQ48BtxKg" type="2001" element="_ZE-nsO8eEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_ZFPGYO8eEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_ZFPGYe8eEemYzIQ48BtxKg" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_9aCVMO8eEemYzIQ48BtxKg" type="3004" element="_9Yv7wO8eEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_9aCVMe8eEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9aCVMu8eEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_ZFMDEe8eEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZFMDEu8eEemYzIQ48BtxKg" x="117" y="144" width="20" height="20"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_ZFQ7kO8eEemYzIQ48BtxKg" type="2001" element="_ZFCSEO8eEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_ZFSJsO8eEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_ZFSJse8eEemYzIQ48BtxKg" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_9aC8QO8eEemYzIQ48BtxKg" type="3004" element="_9YxJ4e8eEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_9aC8Qe8eEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9aC8Qu8eEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_ZFQ7ke8eEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZFQ7ku8eEemYzIQ48BtxKg" x="216" y="144" width="20" height="20"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_QvREgO8fEemYzIQ48BtxKg" visible="false" type="2001" element="_Qu-wou8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_QvRrkO8fEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_QvRrke8fEemYzIQ48BtxKg" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_Vqr1oO8fEemYzIQ48BtxKg" type="3004" element="_VqiEoO8fEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_Vqr1oe8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vqr1ou8fEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_QvREge8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QvREgu8fEemYzIQ48BtxKg" x="90" y="9" width="20" height="20"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_QvSSoO8fEemYzIQ48BtxKg" visible="false" type="2001" element="_Qu_XsO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_QvS5sO8fEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_QvS5se8fEemYzIQ48BtxKg" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_VqtDwO8fEemYzIQ48BtxKg" type="3004" element="_Vqirse8fEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_VqtDwe8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VqtDwu8fEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_QvSSoe8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QvSSou8fEemYzIQ48BtxKg" x="207" y="9" width="20" height="20"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_p6Z3QO8fEemYzIQ48BtxKg" type="2001" element="_p6NqAe8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_p6bFYO8fEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_p6bFYe8fEemYzIQ48BtxKg" x="31" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_p6gk8O8fEemYzIQ48BtxKg" type="3004" element="_p6OREO8fEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_p6gk8e8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p6gk8u8fEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_p6Z3Qe8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p6Z3Qu8fEemYzIQ48BtxKg" x="72" y="27" width="30" height="30"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_p6evwO8fEemYzIQ48BtxKg" type="2001" element="_p6O4IO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_p6fW0O8fEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_p6fW0e8fEemYzIQ48BtxKg" x="31" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_p6gk8-8fEemYzIQ48BtxKg" type="3004" element="_p6O4Ie8fEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_p6gk9O8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p6gk9e8fEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_p6evwe8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p6evwu8fEemYzIQ48BtxKg" x="180" y="27" width="30" height="30"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_K91mgO8hEemYzIQ48BtxKg" type="2001" element="_K9u40O8hEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_K92NkO8hEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_K92Nke8hEemYzIQ48BtxKg" x="31" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_K9538O8hEemYzIQ48BtxKg" type="3004" element="_K9u40e8hEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_K9538e8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K9538u8hEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_K91mge8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K91mgu8hEemYzIQ48BtxKg" x="297" y="27" width="30" height="30"/>
+        </children>
+        <children xmi:type="notation:Node" xmi:id="_XqoCMO8hEemYzIQ48BtxKg" type="2001" element="_XqhUgO8hEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_XqopQO8hEemYzIQ48BtxKg" type="5002">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_XqopQe8hEemYzIQ48BtxKg" x="31" y="5"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_XqqecO8hEemYzIQ48BtxKg" type="3004" element="_Xqh7kO8hEemYzIQ48BtxKg">
+            <styles xmi:type="notation:ShapeStyle" xmi:id="_Xqqece8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Xqqecu8hEemYzIQ48BtxKg"/>
+          </children>
+          <styles xmi:type="notation:ShapeStyle" xmi:id="_XqoCMe8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_XqoCMu8hEemYzIQ48BtxKg" x="326" y="139" width="30" height="30"/>
+        </children>
+        <styles xmi:type="notation:DiagramStyle" xmi:id="_G4sdcu8eEemYzIQ48BtxKg"/>
+        <edges xmi:type="notation:Edge" xmi:id="_6BTCUO8fEemYzIQ48BtxKg" visible="false" type="4001" element="_5_tt8O8fEemYzIQ48BtxKg" source="_ZFMDEO8eEemYzIQ48BtxKg" target="_p6Z3QO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_6BUQcO8fEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BUQce8fEemYzIQ48BtxKg" x="1" y="-10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_6BU3gO8fEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BU3ge8fEemYzIQ48BtxKg" x="3" y="9"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_6BVekO8fEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BVeke8fEemYzIQ48BtxKg" x="5" y="7"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_6BTCUe8fEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_6BTCUu8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6BTCU-8fEemYzIQ48BtxKg" points="[-4, -10, 36, 102]$[-35, -97, 5, 15]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6BblMO8fEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6BcMQO8fEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+        </edges>
+        <edges xmi:type="notation:Edge" xmi:id="_6BcMQe8fEemYzIQ48BtxKg" visible="false" type="4001" element="_5_wxQO8fEemYzIQ48BtxKg" source="_ZFMDEO8eEemYzIQ48BtxKg" target="_p6evwO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_6BczUO8fEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BczUe8fEemYzIQ48BtxKg" x="-4" y="-8"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_6BczUu8fEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BczU-8fEemYzIQ48BtxKg" x="5" y="6"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_6BczVO8fEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BczVe8fEemYzIQ48BtxKg" x="5" y="7"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_6BcMQu8fEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_6BcMQ-8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6BcMRO8fEemYzIQ48BtxKg" points="[6, -10, -62, 102]$[58, -97, -10, 15]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6BdaYO8fEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6BdaYe8fEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+        </edges>
+        <edges xmi:type="notation:Edge" xmi:id="_6BdaYu8fEemYzIQ48BtxKg" visible="false" type="4001" element="_5_xYUu8fEemYzIQ48BtxKg" source="_ZFQ7kO8eEemYzIQ48BtxKg" target="_p6evwO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_6BeBcO8fEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BeBce8fEemYzIQ48BtxKg" x="-3" y="-10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_6BeBcu8fEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BeBc-8fEemYzIQ48BtxKg" x="7" y="9"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_6BeBdO8fEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6BeBde8fEemYzIQ48BtxKg" x="5" y="9"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_6BdaY-8fEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_6BdaZO8fEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6BdaZe8fEemYzIQ48BtxKg" points="[-3, -10, 28, 102]$[-27, -97, 4, 15]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6BeogO8fEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6Beoge8fEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+        </edges>
+        <edges xmi:type="notation:Edge" xmi:id="_g5mTMO8hEemYzIQ48BtxKg" type="4001" element="_g3s1wO8hEemYzIQ48BtxKg" source="_ZFMDEO8eEemYzIQ48BtxKg" target="_p6Z3QO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_g5mTNO8hEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5mTNe8hEemYzIQ48BtxKg" y="-10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_g5mTNu8hEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5mTN-8hEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_g5m6QO8hEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5m6Qe8hEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_g5mTMe8hEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_g5mTMu8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_g5mTM-8hEemYzIQ48BtxKg" points="[-4, -10, 36, 102]$[-35, -97, 5, 15]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g5m6Qu8hEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g5m6Q-8hEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+        </edges>
+        <edges xmi:type="notation:Edge" xmi:id="_g5m6RO8hEemYzIQ48BtxKg" type="4001" element="_g3tc0u8hEemYzIQ48BtxKg" source="_ZFMDEO8eEemYzIQ48BtxKg" target="_p6evwO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_g5nhUO8hEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5nhUe8hEemYzIQ48BtxKg" y="-10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_g5nhUu8hEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5nhU-8hEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_g5nhVO8hEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5nhVe8hEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_g5m6Re8hEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_g5m6Ru8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_g5m6R-8hEemYzIQ48BtxKg" points="[6, -10, -62, 102]$[58, -97, -10, 15]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g5oIYO8hEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g5oIYe8hEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+        </edges>
+        <edges xmi:type="notation:Edge" xmi:id="_g5oIYu8hEemYzIQ48BtxKg" type="4001" element="_g3uq8O8hEemYzIQ48BtxKg" source="_ZFQ7kO8eEemYzIQ48BtxKg" target="_p6evwO8fEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_g5oIZu8hEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5oIZ-8hEemYzIQ48BtxKg" y="-10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_g5oIaO8hEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5oIae8hEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_g5ovcO8hEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g5ovce8hEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_g5oIY-8hEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_g5oIZO8hEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_g5oIZe8hEemYzIQ48BtxKg" points="[-3, -10, 28, 102]$[-27, -97, 4, 15]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g5ovcu8hEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g5ovc-8hEemYzIQ48BtxKg" id="(0.5,0.5)"/>
+        </edges>
+        <edges xmi:type="notation:Edge" xmi:id="_Yf3gwO8kEemYzIQ48BtxKg" type="4001" element="_Yfu96O8kEemYzIQ48BtxKg" source="_XqoCMO8hEemYzIQ48BtxKg" target="_K91mgO8hEemYzIQ48BtxKg">
+          <children xmi:type="notation:Node" xmi:id="_Yf4H0O8kEemYzIQ48BtxKg" type="6001">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yf4H0e8kEemYzIQ48BtxKg" y="-10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_Yf4H0u8kEemYzIQ48BtxKg" type="6002">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yf4H0-8kEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <children xmi:type="notation:Node" xmi:id="_Yf4H1O8kEemYzIQ48BtxKg" type="6003">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yf4H1e8kEemYzIQ48BtxKg" y="10"/>
+          </children>
+          <styles xmi:type="notation:ConnectorStyle" xmi:id="_Yf3gwe8kEemYzIQ48BtxKg"/>
+          <styles xmi:type="notation:FontStyle" xmi:id="_Yf3gwu8kEemYzIQ48BtxKg" fontName=".AppleSystemUIFont" fontHeight="12"/>
+          <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Yf3gw-8kEemYzIQ48BtxKg" points="[0, 0, 27, 82]$[-27, -82, 0, 0]"/>
+          <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Yf4u4O8kEemYzIQ48BtxKg" id="(0.5333333333333333,0.0)"/>
+          <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Yf4u4e8kEemYzIQ48BtxKg" id="(0.6,1.0)"/>
+        </edges>
+      </data>
+    </ownedAnnotationEntries>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_ZE-nsO8eEemYzIQ48BtxKg" name="Hallvard" outgoingEdges="_5_tt8O8fEemYzIQ48BtxKg _5_wxQO8fEemYzIQ48BtxKg _g3s1wO8hEemYzIQ48BtxKg _g3tc0u8hEemYzIQ48BtxKg" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Person" href="sample.ra#//@staff.0"/>
+      <semanticElements xmi:type="ra:Person" href="sample.ra#//@staff.0"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_9Yv7wO8eEemYzIQ48BtxKg" labelSize="12" showIcon="false" color="194,239,255">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_ZFCSEO8eEemYzIQ48BtxKg" name="Adrian" outgoingEdges="_5_xYUu8fEemYzIQ48BtxKg _g3uq8O8hEemYzIQ48BtxKg" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Person" href="sample.ra#//@staff.1"/>
+      <semanticElements xmi:type="ra:Person" href="sample.ra#//@staff.1"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_9YxJ4e8eEemYzIQ48BtxKg" labelSize="12" showIcon="false" color="194,239,255">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_XqhUgO8hEemYzIQ48BtxKg" name="Børge" outgoingEdges="_Yfu96O8kEemYzIQ48BtxKg" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Person" href="sample.ra#//@staff.2"/>
+      <semanticElements xmi:type="ra:Person" href="sample.ra#//@staff.2"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_Xqh7kO8hEemYzIQ48BtxKg" labelSize="12" showIcon="false" color="194,239,255">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_Qu-wou8fEemYzIQ48BtxKg" name="TDT4250" visible="false" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Course" href="sample.ra#//@courses.0"/>
+      <semanticElements xmi:type="ra:Course" href="sample.ra#//@courses.0"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_VqiEoO8fEemYzIQ48BtxKg" labelSize="12" showIcon="false" shape="dot" color="204,242,166">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_Qu_XsO8fEemYzIQ48BtxKg" name="IT1901" visible="false" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Course" href="sample.ra#//@courses.1"/>
+      <semanticElements xmi:type="ra:Course" href="sample.ra#//@courses.1"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_Vqirse8fEemYzIQ48BtxKg" labelSize="12" showIcon="false" shape="dot" color="204,242,166">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_p6NqAe8fEemYzIQ48BtxKg" name="TDT4250" incomingEdges="_5_tt8O8fEemYzIQ48BtxKg _g3s1wO8hEemYzIQ48BtxKg" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Course" href="sample.ra#//@courses.0"/>
+      <semanticElements xmi:type="ra:Course" href="sample.ra#//@courses.0"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_p6OREO8fEemYzIQ48BtxKg" labelSize="12" showIcon="false" shape="dot" color="204,242,166">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_p6O4IO8fEemYzIQ48BtxKg" name="IT1901" incomingEdges="_5_wxQO8fEemYzIQ48BtxKg _5_xYUu8fEemYzIQ48BtxKg _g3tc0u8hEemYzIQ48BtxKg _g3uq8O8hEemYzIQ48BtxKg" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Course" href="sample.ra#//@courses.1"/>
+      <semanticElements xmi:type="ra:Course" href="sample.ra#//@courses.1"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_p6O4Ie8fEemYzIQ48BtxKg" labelSize="12" showIcon="false" shape="dot" color="204,242,166">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DNode" uid="_K9u40O8hEemYzIQ48BtxKg" name="TDT4100" incomingEdges="_Yfu96O8kEemYzIQ48BtxKg" width="3" height="3" resizeKind="NSEW">
+      <target xmi:type="ra:Course" href="sample.ra#//@courses.2"/>
+      <semanticElements xmi:type="ra:Course" href="sample.ra#//@courses.2"/>
+      <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+      <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+      <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+      <ownedStyle xmi:type="diagram:BundledImage" uid="_K9u40e8hEemYzIQ48BtxKg" labelSize="12" showIcon="false" shape="dot" color="204,242,166">
+        <description xmi:type="style:BundledImageDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']/@style"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_5_tt8O8fEemYzIQ48BtxKg" name="1.5" visible="false" sourceNode="_ZE-nsO8eEemYzIQ48BtxKg" targetNode="_p6NqAe8fEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.0"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.0"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_5_vjIO8fEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_5_vjIe8fEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_5_wxQO8fEemYzIQ48BtxKg" name="0.3" visible="false" sourceNode="_ZE-nsO8eEemYzIQ48BtxKg" targetNode="_p6O4IO8fEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.1"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.1"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_5_wxQe8fEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_5_wxQu8fEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_5_xYUu8fEemYzIQ48BtxKg" name="0.7" visible="false" sourceNode="_ZFCSEO8eEemYzIQ48BtxKg" targetNode="_p6O4IO8fEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.2"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.2"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_5_x_YO8fEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_5_x_Ye8fEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_g3s1wO8hEemYzIQ48BtxKg" name="1.5" sourceNode="_ZE-nsO8eEemYzIQ48BtxKg" targetNode="_p6NqAe8fEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.0"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.0"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_g3s1we8hEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_g3s1wu8hEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_g3tc0u8hEemYzIQ48BtxKg" name="0.3" sourceNode="_ZE-nsO8eEemYzIQ48BtxKg" targetNode="_p6O4IO8fEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.1"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.1"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_g3uD4O8hEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_g3uD4e8hEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_g3uq8O8hEemYzIQ48BtxKg" name="0.7" sourceNode="_ZFCSEO8eEemYzIQ48BtxKg" targetNode="_p6O4IO8fEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.2"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.2"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_g3uq8e8hEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_g3uq8u8hEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']"/>
+    </ownedDiagramElements>
+    <ownedDiagramElements xmi:type="diagram:DEdge" uid="_Yfu96O8kEemYzIQ48BtxKg" name="0.0" sourceNode="_XqhUgO8hEemYzIQ48BtxKg" targetNode="_K9u40O8hEemYzIQ48BtxKg">
+      <target xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.3"/>
+      <semanticElements xmi:type="ra:ResourceAllocation" href="sample.ra#//@resourceAllocations.3"/>
+      <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Yfvk8O8kEemYzIQ48BtxKg" size="2">
+        <description xmi:type="style:EdgeStyleDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']/@style"/>
+        <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Yfvk8e8kEemYzIQ48BtxKg" labelSize="12" showIcon="false"/>
+      </ownedStyle>
+      <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']"/>
+    </ownedDiagramElements>
+    <description xmi:type="description_1:DiagramDescription" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']"/>
+    <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_G4DkQO8eEemYzIQ48BtxKg"/>
+    <activatedLayers xmi:type="description_1:Layer" href="platform:/resource/tdt4250.ra.diagram/description/ra.odesign#//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer"/>
+    <target xmi:type="ra:Department" href="sample.ra#/"/>
+  </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tdt4250.ra.diagram.examples/sample.ra b/tdt4250.ra.diagram.examples/sample.ra
new file mode 100644
index 0000000..f9d99e2
--- /dev/null
+++ b/tdt4250.ra.diagram.examples/sample.ra
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ra:Department xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ra="platform:/plugin/tdt4250.ra/model/ra.ecore" name="Dept. of CS" shortName="IDI">
+  <staff name="Hallvard" allocations="//@resourceAllocations.0 //@resourceAllocations.1"/>
+  <staff name="Adrian" allocations="//@resourceAllocations.2"/>
+  <staff name="Børge" allocations="//@resourceAllocations.3"/>
+  <courses code="TDT4250" name="AdvSoft" allocations="//@resourceAllocations.0"/>
+  <courses code="IT1901" name="InfProj" allocations="//@resourceAllocations.1 //@resourceAllocations.2"/>
+  <courses code="TDT4100" allocations="//@resourceAllocations.3"/>
+  <resourceAllocations person="//@staff.0" course="//@courses.0" factor="1.5"/>
+  <resourceAllocations person="//@staff.0" course="//@courses.1" factor="0.3"/>
+  <resourceAllocations person="//@staff.1" course="//@courses.1" factor="0.7"/>
+  <resourceAllocations person="//@staff.2" course="//@courses.2"/>
+</ra:Department>
diff --git a/tdt4250.ra.diagram/.classpath b/tdt4250.ra.diagram/.classpath
new file mode 100644
index 0000000..39810b7
--- /dev/null
+++ b/tdt4250.ra.diagram/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+  <classpathentry kind="src" path="src"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+  <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tdt4250.ra.diagram/.project b/tdt4250.ra.diagram/.project
new file mode 100644
index 0000000..4d44aef
--- /dev/null
+++ b/tdt4250.ra.diagram/.project
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+  <name>tdt4250.ra.diagram</name>
+  <comment></comment>
+  <projects></projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments></arguments>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.ManifestBuilder</name>
+      <arguments></arguments>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.SchemaBuilder</name>
+      <arguments></arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.pde.PluginNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
diff --git a/tdt4250.ra.diagram/META-INF/MANIFEST.MF b/tdt4250.ra.diagram/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..dbdb28d
--- /dev/null
+++ b/tdt4250.ra.diagram/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: tdt4250.ra.diagram;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: tdt4250.ra.diagram.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.sirius,
+ org.eclipse.sirius.common.acceleo.aql
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Vendor: %providerName
+Automatic-Module-Name: tdt4250.ra.diagram
diff --git a/tdt4250.ra.diagram/build.properties b/tdt4250.ra.diagram/build.properties
new file mode 100644
index 0000000..1ab7df2
--- /dev/null
+++ b/tdt4250.ra.diagram/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               description/,\
+               plugin.properties,\
+               plugin.xml
diff --git a/tdt4250.ra.diagram/description/ra.odesign b/tdt4250.ra.diagram/description/ra.odesign
new file mode 100644
index 0000000..96448d7
--- /dev/null
+++ b/tdt4250.ra.diagram/description/ra.odesign
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/description/tool/1.1.0" name="ra" version="12.0.0.2017041100">
+  <ownedViewpoints name="RaViewpoint" label="Ra Viewpoint" modelFileExtension="ra">
+    <ownedRepresentations xsi:type="description_1:DiagramDescription" name="RaDiagram" label="Ra Diagram" domainClass="ra::Department" enablePopupBars="true">
+      <defaultLayer name="Default">
+        <nodeMappings name="PersonNode" label="Person Node" semanticCandidatesExpression="aql:self.staff" domainClass="ra::Person">
+          <style xsi:type="style:BundledImageDescription" labelSize="12" showIcon="false" resizeKind="NSEW">
+            <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+            <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+            <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
+          </style>
+        </nodeMappings>
+        <nodeMappings name="CourseNode" label="Course Node" semanticCandidatesExpression="aql:self.courses" domainClass="ra::Course">
+          <style xsi:type="style:BundledImageDescription" labelSize="12" showIcon="false" labelExpression="feature:code" resizeKind="NSEW" shape="dot">
+            <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+            <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+            <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_green']"/>
+          </style>
+        </nodeMappings>
+        <edgeMappings name="ResourceAllocationEdge" label="ResourceAllocation Edge" semanticCandidatesExpression="aql:self.resourceAllocations" sourceMapping="//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']" targetMapping="//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']" targetFinderExpression="aql:self.course" sourceFinderExpression="aql:self.person" domainClass="ra::ResourceAllocation" useDomainElement="true">
+          <style sizeComputationExpression="2">
+            <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+            <centerLabelStyleDescription labelSize="12" showIcon="false" labelExpression="feature:factor">
+              <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+            </centerLabelStyleDescription>
+          </style>
+        </edgeMappings>
+        <toolSections name="CreationTools" label="Creation Tools">
+          <ownedTools xsi:type="tool:NodeCreationDescription" name="CreateCourse" label="Create Course" nodeMappings="//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='CourseNode']">
+            <variable name="container"/>
+            <viewVariable name="containerView"/>
+            <initialOperation>
+              <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="ra::Course" referenceName="courses">
+                <subModelOperations xsi:type="tool_1:SetValue" featureName="code" valueExpression="TDT"/>
+              </firstModelOperations>
+            </initialOperation>
+          </ownedTools>
+          <ownedTools xsi:type="tool:NodeCreationDescription" name="CreatePerson" label="Create Person" nodeMappings="//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@nodeMappings[name='PersonNode']">
+            <variable name="container"/>
+            <viewVariable name="containerView"/>
+            <initialOperation>
+              <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="ra::Person" referenceName="staff">
+                <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="no-name"/>
+              </firstModelOperations>
+            </initialOperation>
+          </ownedTools>
+          <ownedTools xsi:type="tool:EdgeCreationDescription" name="CreateResourceAllocation" label="Create ResourceAllocation" edgeMappings="//@ownedViewpoints[name='RaViewpoint']/@ownedRepresentations[name='RaDiagram']/@defaultLayer/@edgeMappings[name='ResourceAllocationEdge']">
+            <sourceVariable name="source"/>
+            <targetVariable name="target"/>
+            <sourceViewVariable name="sourceView"/>
+            <targetViewVariable name="targetView"/>
+            <initialOperation>
+              <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:source.employer">
+                <subModelOperations xsi:type="tool_1:CreateInstance" typeName="ra::ResourceAllocation" referenceName="resourceAllocations">
+                  <subModelOperations xsi:type="tool_1:SetValue" featureName="person" valueExpression="var:source"/>
+                  <subModelOperations xsi:type="tool_1:SetValue" featureName="course" valueExpression="var:target"/>
+                </subModelOperations>
+              </firstModelOperations>
+            </initialOperation>
+          </ownedTools>
+        </toolSections>
+      </defaultLayer>
+    </ownedRepresentations>
+    <ownedJavaExtensions qualifiedClassName="tdt4250.ra.diagram.Services"/>
+  </ownedViewpoints>
+</description:Group>
diff --git a/tdt4250.ra.diagram/plugin.properties b/tdt4250.ra.diagram/plugin.properties
new file mode 100644
index 0000000..9d025fd
--- /dev/null
+++ b/tdt4250.ra.diagram/plugin.properties
@@ -0,0 +1,3 @@
+pluginName = tdt4250.ra.diagram
+providerName = Eclipse Modeling Project
+viewpointName = MyViewpoint
diff --git a/tdt4250.ra.diagram/plugin.xml b/tdt4250.ra.diagram/plugin.xml
new file mode 100644
index 0000000..22458bb
--- /dev/null
+++ b/tdt4250.ra.diagram/plugin.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+  <extension point="org.eclipse.sirius.componentization">
+    <component class="tdt4250.ra.diagram.Activator"
+               id="tdt4250.ra.diagram"
+	       name="ra">
+    </component>
+  </extension>
+</plugin>
diff --git a/tdt4250.ra.diagram/src/tdt4250/ra/diagram/Activator.java b/tdt4250.ra.diagram/src/tdt4250/ra/diagram/Activator.java
new file mode 100644
index 0000000..19871d9
--- /dev/null
+++ b/tdt4250.ra.diagram/src/tdt4250/ra/diagram/Activator.java
@@ -0,0 +1,66 @@
+package tdt4250.ra.diagram;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.sirius.business.api.componentization.ViewpointRegistry;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+    // The plug-in ID
+    public static final String PLUGIN_ID = "tdt4250.ra.diagram";
+
+    // The shared instance
+    private static Activator plugin;
+
+    private static Set<Viewpoint> viewpoints; 
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+      super.start(context);
+	  plugin = this;
+	  viewpoints = new HashSet<Viewpoint>();
+	  viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/ra.odesign")); 
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+	plugin = null;
+	if (viewpoints != null) {
+	    for (final Viewpoint viewpoint: viewpoints) {
+		ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
+	    }
+	    viewpoints.clear();
+	    viewpoints = null; 
+	}
+	super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+	return plugin;
+    }
+}
diff --git a/tdt4250.ra.diagram/src/tdt4250/ra/diagram/Services.java b/tdt4250.ra.diagram/src/tdt4250/ra/diagram/Services.java
new file mode 100644
index 0000000..7386f73
--- /dev/null
+++ b/tdt4250.ra.diagram/src/tdt4250/ra/diagram/Services.java
@@ -0,0 +1,17 @@
+package tdt4250.ra.diagram;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * The services class used by VSM.
+ */
+public class Services {
+    
+    /**
+    * See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.html&cp=24 for documentation on how to write service methods.
+    */
+    public EObject myService(EObject self, String arg) {
+       // TODO Auto-generated code
+      return self;
+    }
+}
diff --git a/tdt4250.ra/model/sample.xmi b/tdt4250.ra/model/sample.xmi
index b1dd27d..0d26df8 100644
--- a/tdt4250.ra/model/sample.xmi
+++ b/tdt4250.ra/model/sample.xmi
@@ -2,19 +2,29 @@
 <ra:Department
     xmi:version="2.0"
     xmlns:xmi="http://www.omg.org/XMI"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:ra="platform:/plugin/tdt4250.ra/model/ra.ecore"
-    xsi:schemaLocation="platform:/plugin/tdt4250.ra/model/ra.ecore ra.ecore"
     name="Dept. of CS"
     shortName="IDI">
+  <staff name="Hallvard"
+      allocations="//@resourceAllocations.0 //@resourceAllocations.1"/>
+  <staff name="Adrian"
+      allocations="//@resourceAllocations.2"/>
+  <courses code="TDT4250"
+      name="AdvSoft"
+      allocations="//@resourceAllocations.0"/>
+  <courses code="IT1901"
+      name="InfProj"
+      allocations="//@resourceAllocations.1 //@resourceAllocations.2"/>
   <resourceAllocations
-      factor="0.5">
-    <person
-        href="idi.xmi#//@staff.0"/>
-  </resourceAllocations>
+      person="//@staff.0"
+      course="//@courses.0"
+      factor="1.0"/>
   <resourceAllocations
-      factor="1.0">
-    <person
-        href="idi.xmi#//@staff.0"/>
-  </resourceAllocations>
+      person="//@staff.0"
+      course="//@courses.1"
+      factor="0.3"/>
+  <resourceAllocations
+      person="//@staff.1"
+      course="//@courses.1"
+      factor="0.7"/>
 </ra:Department>
-- 
GitLab