Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessy Mallet2016-06-29 14:45:38 +0000
committerLaurent Redor2016-08-23 13:49:59 +0000
commit56cbc89006024281acff3d94472f03792ebf5d96 (patch)
tree5b12add93f5776ed99070bdc3e9220555c64c9b5
parentec3ddde112186e2657abb37087fbe893de7c4c7d (diff)
downloadorg.eclipse.sirius-56cbc89006024281acff3d94472f03792ebf5d96.tar.gz
org.eclipse.sirius-56cbc89006024281acff3d94472f03792ebf5d96.tar.xz
org.eclipse.sirius-56cbc89006024281acff3d94472f03792ebf5d96.zip
[499830] Tests to reveal problem of DnD of a regions container
Unlike classical container, when a regions container is drag'n'drop from a container to another one, it loses is size. This is probably due to the layout specificity of the regions container (always in {-1, -1}, the dimension is handled by its region children. Steps to reproduce: * Open VStackDiag with DnD * Dnd "cccc" from "aaaa" in diagram * KO: The new "cccc" container is auto-sized. Bug: 499830 Cherry-picked-from: 496985 Change-Id: I1888a11cc5e2b421f9ebe097d1e95736d3986715 Signed-off-by: Jessy Mallet <jessy.mallet@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.aird488
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.ecore4
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/compartments.odesign64
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/compartment/ICompartmentTests.java11
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/AbstractCompartmentTest.java241
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsCreationTest.java237
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsDragAndDropTest.java127
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java2
8 files changed, 935 insertions, 239 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.aird b/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.aird
index b30402e92f..44aa46d87a 100644
--- a/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.aird
+++ b/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.aird
@@ -1467,6 +1467,494 @@
<activatedLayers xmi:type="description_1:Layer" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20Image']/@defaultLayer"/>
<target xmi:type="ecore:EPackage" href="My.ecore#/"/>
</ownedRepresentations>
+ <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_0FO4gD3IEeaMQoIf_sZyRg" name="VStackDiag with DnD">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_0FO4gT3IEeaMQoIf_sZyRg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_0FO4gj3IEeaMQoIf_sZyRg"/>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_0FO4nD3IEeaMQoIf_sZyRg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_0FO4nT3IEeaMQoIf_sZyRg" type="Sirius" element="_0FO4gD3IEeaMQoIf_sZyRg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_0FPfkD3IEeaMQoIf_sZyRg" type="2002" element="_0FO4gz3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FPfkz3IEeaMQoIf_sZyRg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_0FPflD3IEeaMQoIf_sZyRg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_0FQtsD3IEeaMQoIf_sZyRg" type="3008" element="_0FO4hT3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FRUwD3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FRUwT3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FRUwj3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FRUwz3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_0FRUxD3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FQtsT3IEeaMQoIf_sZyRg" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FQtsj3IEeaMQoIf_sZyRg" width="298" height="40"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_0FR70D3IEeaMQoIf_sZyRg" type="3008" element="_0FO4hz3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FR70z3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FR71D3IEeaMQoIf_sZyRg" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_0FSi6D3IEeaMQoIf_sZyRg" type="3008" element="_0FO4iT3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FTJ8D3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FTJ8T3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FTJ8j3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FTJ8z3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FSi6T3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FSi6j3IEeaMQoIf_sZyRg" x="32" y="28"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FR71T3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FR71j3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_0FR71z3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FR70T3IEeaMQoIf_sZyRg" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FR70j3IEeaMQoIf_sZyRg" y="40" width="298" height="170"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_0FSi4D3IEeaMQoIf_sZyRg" type="3008" element="_0FO4iz3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FSi4z3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FSi5D3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FSi5T3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FSi5j3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_0FSi5z3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FSi4T3IEeaMQoIf_sZyRg" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FSi4j3IEeaMQoIf_sZyRg" y="210" width="298" height="152"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FPflT3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FPflj3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FPfkT3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FPfkj3IEeaMQoIf_sZyRg" x="90" y="35"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_0FQGoD3IEeaMQoIf_sZyRg" type="2002" element="_0FO4jT3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FQGoz3IEeaMQoIf_sZyRg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_0FQGpD3IEeaMQoIf_sZyRg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_0FTJ9D3IEeaMQoIf_sZyRg" type="3008" element="_0FO4jz3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FTxAD3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FTxAT3IEeaMQoIf_sZyRg" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_0FUYFT3IEeaMQoIf_sZyRg" type="3008" element="_0FO4kT3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FU_ID3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FU_IT3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FU_Ij3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FU_Iz3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FUYFj3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FUYFz3IEeaMQoIf_sZyRg" x="30" y="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_0FU_JD3IEeaMQoIf_sZyRg" type="3008" element="_0FO4kz3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FU_Jz3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FVmMD3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FVmMT3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FVmMj3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FU_JT3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FU_Jj3IEeaMQoIf_sZyRg" x="110" y="30"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FTxAj3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FTxAz3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_0FTxBD3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FTJ9T3IEeaMQoIf_sZyRg" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FTJ9j3IEeaMQoIf_sZyRg" width="358" height="91"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_0FTxBT3IEeaMQoIf_sZyRg" type="3008" element="_0FO4lT3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FUYED3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FUYET3IEeaMQoIf_sZyRg" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_0FVmMz3IEeaMQoIf_sZyRg" type="3008" element="_0FO4lz3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FVmNj3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FVmNz3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FVmOD3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FVmOT3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FVmND3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FVmNT3IEeaMQoIf_sZyRg" x="32" y="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_0FWNQD3IEeaMQoIf_sZyRg" type="3008" element="_0FO4mT3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_0FWNQz3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_0FWNRD3IEeaMQoIf_sZyRg" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_9UYIoD3IEeaMQoIf_sZyRg" type="3008" element="_9UUeQD3IEeaMQoIf_sZyRg">
+ <children xmi:type="notation:Node" xmi:id="_9UYvsD3IEeaMQoIf_sZyRg" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_9UYvsT3IEeaMQoIf_sZyRg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_9UYvsj3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_9UYvsz3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_9UYvtD3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_9UYIoT3IEeaMQoIf_sZyRg" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9UYIoj3IEeaMQoIf_sZyRg" width="163" height="99"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FWNRT3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FWNRj3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FWNQT3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FWNQj3IEeaMQoIf_sZyRg" x="118" y="30"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FUYEj3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FUYEz3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_0FUYFD3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FTxBj3IEeaMQoIf_sZyRg" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FTxBz3IEeaMQoIf_sZyRg" y="91" width="358" height="226"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_0FQGpT3IEeaMQoIf_sZyRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_0FQGpj3IEeaMQoIf_sZyRg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_0FQGoT3IEeaMQoIf_sZyRg" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0FQGoj3IEeaMQoIf_sZyRg" x="565" y="35"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_0FO4nj3IEeaMQoIf_sZyRg"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4gz3IEeaMQoIf_sZyRg" name="P1" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4hD3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4hT3IEeaMQoIf_sZyRg" name="Left_p3">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Left_p3"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Left_p3"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4hj3IEeaMQoIf_sZyRg" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="138,226,52" foregroundColor="138,226,52">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4hz3IEeaMQoIf_sZyRg" name="Center_p4">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4iD3IEeaMQoIf_sZyRg" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="195,229,65" foregroundColor="195,229,65">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4iT3IEeaMQoIf_sZyRg" name="newPackage1" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4/newPackage1"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4/newPackage1"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4ij3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4iz3IEeaMQoIf_sZyRg" name="Right_p5">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Right_p5"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Right_p5"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4jD3IEeaMQoIf_sZyRg" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="252,233,79" foregroundColor="252,233,79">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4jT3IEeaMQoIf_sZyRg" name="az" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4jj3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4jz3IEeaMQoIf_sZyRg" name="aaa">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaa"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaa"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4kD3IEeaMQoIf_sZyRg" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="114,159,207" foregroundColor="114,159,207">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4kT3IEeaMQoIf_sZyRg" name="bbb" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/bbb"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/bbb"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4kj3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4kz3IEeaMQoIf_sZyRg" name="ccc" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/ccc"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/ccc"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4lD3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4lT3IEeaMQoIf_sZyRg" name="aaaa">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4lj3IEeaMQoIf_sZyRg" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="114,159,207" foregroundColor="114,159,207">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4lz3IEeaMQoIf_sZyRg" name="bbbb" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/bbbb"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/bbbb"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4mD3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_0FO4mT3IEeaMQoIf_sZyRg" name="cccc" childrenPresentation="VerticalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_0FO4mj3IEeaMQoIf_sZyRg" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_9UUeQD3IEeaMQoIf_sZyRg" name="eee">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc/eee"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc/eee"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_9UUeQT3IEeaMQoIf_sZyRg" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="114,159,207" foregroundColor="114,159,207">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_0FO4mz3IEeaMQoIf_sZyRg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ </ownedRepresentations>
+ <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_maGOUD4BEeanI7H5rb1DCA" name="HStackDiag with DnD">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_maGOUT4BEeanI7H5rb1DCA" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_maGOUj4BEeanI7H5rb1DCA"/>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_maG1YD4BEeanI7H5rb1DCA" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_maG1YT4BEeanI7H5rb1DCA" type="Sirius" element="_maGOUD4BEeanI7H5rb1DCA" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_maKfwD4BEeanI7H5rb1DCA" type="2002" element="_maGOUz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maLG0D4BEeanI7H5rb1DCA" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_maLG0T4BEeanI7H5rb1DCA" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_maPYQD4BEeanI7H5rb1DCA" type="3008" element="_maGOVT4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maP_Uj4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maP_Uz4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maP_VD4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maP_VT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_maP_Vj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maP_UD4BEeanI7H5rb1DCA" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maP_UT4BEeanI7H5rb1DCA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_maP_Vz4BEeanI7H5rb1DCA" type="3008" element="_maGOVz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maQmYD4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maQmYT4BEeanI7H5rb1DCA" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_maR0gD4BEeanI7H5rb1DCA" type="3008" element="_maGOWT4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maR0gz4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maR0hD4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maR0hT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maR0hj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maR0gT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maR0gj4BEeanI7H5rb1DCA" x="29" y="30"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maQmYj4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maQmYz4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_maQmZD4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maP_WD4BEeanI7H5rb1DCA" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maP_WT4BEeanI7H5rb1DCA" x="56"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_maQmZT4BEeanI7H5rb1DCA" type="3008" element="_maGOWz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maRNcD4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maRNcT4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maRNcj4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maRNcz4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_maRNdD4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maQmZj4BEeanI7H5rb1DCA" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maQmZz4BEeanI7H5rb1DCA" x="185"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maLG0j4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maLG0z4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maKfwT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maKfwj4BEeanI7H5rb1DCA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_maM8AD4BEeanI7H5rb1DCA" type="2002" element="_maGOXT4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maOKID4BEeanI7H5rb1DCA" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_maOxMD4BEeanI7H5rb1DCA" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_maTCoD4BEeanI7H5rb1DCA" type="3008" element="_maGOXz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maU30D4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maU30T4BEeanI7H5rb1DCA" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_maYiMD4BEeanI7H5rb1DCA" type="3008" element="_maGOYT4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maYiMz4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maYiND4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maYiNT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maYiNj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maYiMT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maYiMj4BEeanI7H5rb1DCA" x="30" y="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_maZJQD4BEeanI7H5rb1DCA" type="3008" element="_maGOYz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maZJQz4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maZJRD4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maZJRT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maZJRj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maZJQT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maZJQj4BEeanI7H5rb1DCA" x="110" y="30"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maU30j4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maU30z4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_maU31D4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maTCoT4BEeanI7H5rb1DCA" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maTCoj4BEeanI7H5rb1DCA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_maU31T4BEeanI7H5rb1DCA" type="3008" element="_maGOZT4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maX7ID4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maX7IT4BEeanI7H5rb1DCA" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_maZwUD4BEeanI7H5rb1DCA" type="3008" element="_maGOZz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maZwUz4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maZwVD4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maZwVT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maZwVj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maZwUT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maZwUj4BEeanI7H5rb1DCA" x="28" y="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_maaXYD4BEeanI7H5rb1DCA" type="3008" element="_maGOaT4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maaXYz4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maaXZD4BEeanI7H5rb1DCA" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_maaXZz4BEeanI7H5rb1DCA" type="3008" element="_maGOaz4BEeanI7H5rb1DCA">
+ <children xmi:type="notation:Node" xmi:id="_maa-cD4BEeanI7H5rb1DCA" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_maa-cT4BEeanI7H5rb1DCA" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maa-cj4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maa-cz4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_maa-dD4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maaXaD4BEeanI7H5rb1DCA" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maaXaT4BEeanI7H5rb1DCA" width="98" height="40"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maaXZT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maaXZj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maaXYT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maaXYj4BEeanI7H5rb1DCA" x="118" y="30"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maX7Ij4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maX7Iz4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_maX7JD4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maU31j4BEeanI7H5rb1DCA" fontColor="4108284" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maU31z4BEeanI7H5rb1DCA" x="167" width="266" height="116"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_maOxMT4BEeanI7H5rb1DCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_maOxMj4BEeanI7H5rb1DCA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_maM8AT4BEeanI7H5rb1DCA" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_maM8Aj4BEeanI7H5rb1DCA" x="335"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_maG1Yj4BEeanI7H5rb1DCA"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOUz4BEeanI7H5rb1DCA" name="P1" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOVD4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOVT4BEeanI7H5rb1DCA" name="Left_p3">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Left_p3"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Left_p3"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOVj4BEeanI7H5rb1DCA" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="138,226,52" foregroundColor="138,226,52">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOVz4BEeanI7H5rb1DCA" name="Center_p4">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOWD4BEeanI7H5rb1DCA" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="195,229,65" foregroundColor="195,229,65">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOWT4BEeanI7H5rb1DCA" name="newPackage1" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4/newPackage1"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Center_p4/newPackage1"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOWj4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOWz4BEeanI7H5rb1DCA" name="Right_p5">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//P1/Right_p5"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//P1/Right_p5"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOXD4BEeanI7H5rb1DCA" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="252,233,79" foregroundColor="252,233,79">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOXT4BEeanI7H5rb1DCA" name="az" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOXj4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOXz4BEeanI7H5rb1DCA" name="aaa">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaa"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaa"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOYD4BEeanI7H5rb1DCA" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="114,159,207" foregroundColor="114,159,207">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOYT4BEeanI7H5rb1DCA" name="bbb" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/bbb"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/bbb"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOYj4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOYz4BEeanI7H5rb1DCA" name="ccc" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/ccc"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaa/ccc"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOZD4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOZT4BEeanI7H5rb1DCA" name="aaaa">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOZj4BEeanI7H5rb1DCA" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="114,159,207" foregroundColor="114,159,207">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOZz4BEeanI7H5rb1DCA" name="bbbb" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/bbbb"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/bbbb"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOaD4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOaT4BEeanI7H5rb1DCA" name="cccc" childrenPresentation="HorizontalStack">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGOaj4BEeanI7H5rb1DCA" borderSize="4" borderSizeComputationExpression="4" borderColor="156,12,12">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_maGOaz4BEeanI7H5rb1DCA" name="eee">
+ <target xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc/eee"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#//az/aaaa/cccc/eee"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_maGObD4BEeanI7H5rb1DCA" labelColor="252,175,62" labelAlignment="RIGHT" borderSize="2" borderSizeComputationExpression="2" borderColor="252,175,62" backgroundColor="114,159,207" foregroundColor="114,159,207">
+ <description xmi:type="style:FlatContainerStyleDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']/@subContainerMappings[name='FreeFormRegionsWithDnD']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_maGObT4BEeanI7H5rb1DCA"/>
+ <activatedLayers xmi:type="description_1:Layer" href="compartments.odesign#//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ </ownedRepresentations>
</ownedViews>
<ownedViews xmi:type="viewpoint:DView" xmi:id="_prQiEJa7EeK0jbLdcLCXjQ">
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.sirius.sample.ecore.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
diff --git a/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.ecore b/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.ecore
index 7edf46ac61..07e299a360 100644
--- a/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.ecore
+++ b/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/My.ecore
@@ -47,7 +47,9 @@
<eSubpackages name="bbbb">
<eClassifiers xsi:type="ecore:EClass" name="cl4"/>
</eSubpackages>
- <eSubpackages name="cccc"/>
+ <eSubpackages name="cccc">
+ <eSubpackages name="eee"/>
+ </eSubpackages>
</eSubpackages>
</eSubpackages>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/compartments.odesign b/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/compartments.odesign
index 094cacd78d..b97f6db860 100644
--- a/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/compartments.odesign
+++ b/plugins/org.eclipse.sirius.tests.junit/data/unit/compartments/compartments.odesign
@@ -571,6 +571,70 @@
</containerMappings>
</defaultLayer>
</ownedRepresentations>
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@toolSections.0/@ownedTools[name='Drop%20packages']" name="Diag with VStack and DnD" domainClass="EPackage" enablePopupBars="true">
+ <metamodel href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ <defaultLayer name="Default">
+ <containerMappings name="VStackWithDnd" semanticCandidatesExpression="feature:eContents" domainClass="EPackage" childrenPresentation="VerticalStack">
+ <subContainerMappings name="FreeFormRegionsWithDnD" semanticCandidatesExpression="feature:eContents" domainClass="EPackage" dropDescriptions="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@toolSections.0/@ownedTools[name='Drop%20packages']" reusedContainerMappings="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="20" arcHeight="20" borderSizeComputationExpression="2" labelAlignment="RIGHT" backgroundColor="//@userColorsPalettes[name='Colors']/@entries[name='regionInterpolatedColor']" foregroundColor="//@userColorsPalettes[name='Colors']/@entries[name='regionInterpolatedColor']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='orange']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='orange']"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="20" arcHeight="20" borderSizeComputationExpression="4" roundedCorner="true">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_red']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
+ </style>
+ </containerMappings>
+ <toolSections name="default">
+ <ownedTools xsi:type="tool:ContainerDropDescription" name="Drop packages" mappings="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20VStack%20and%20DnD']/@defaultLayer/@containerMappings[name='VStackWithDnd']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:MoveElement" newContainerExpression="[newSemanticContainer/]" featureName="eSubpackages"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </defaultLayer>
+ </ownedRepresentations>
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@toolSections.0/@ownedTools[name='Drop%20packages']" name="Diag with HStack and DnD" domainClass="EPackage" enablePopupBars="true">
+ <metamodel href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ <defaultLayer name="Default">
+ <containerMappings name="HStackWithDnd" semanticCandidatesExpression="feature:eContents" domainClass="EPackage" childrenPresentation="HorizontalStack">
+ <subContainerMappings name="FreeFormRegionsWithDnD" semanticCandidatesExpression="feature:eContents" domainClass="EPackage" dropDescriptions="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@toolSections.0/@ownedTools[name='Drop%20packages']" reusedContainerMappings="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="20" arcHeight="20" borderSizeComputationExpression="2" labelAlignment="RIGHT" backgroundColor="//@userColorsPalettes[name='Colors']/@entries[name='regionInterpolatedColor']" foregroundColor="//@userColorsPalettes[name='Colors']/@entries[name='regionInterpolatedColor']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='orange']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='orange']"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="20" arcHeight="20" borderSizeComputationExpression="4" roundedCorner="true">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_red']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
+ </style>
+ </containerMappings>
+ <toolSections name="default">
+ <ownedTools xsi:type="tool:ContainerDropDescription" name="Drop packages" mappings="//@ownedViewpoints[name='Compartments']/@ownedRepresentations[name='Diag%20with%20HStack%20and%20DnD']/@defaultLayer/@containerMappings[name='HStackWithDnd']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:MoveElement" newContainerExpression="[newSemanticContainer/]" featureName="eSubpackages"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </defaultLayer>
+ </ownedRepresentations>
</ownedViewpoints>
<userColorsPalettes name="Colors">
<entries xsi:type="description:InterpolatedColor" name="regionInterpolatedColor" colorValueComputationExpression="aql:self.oclAsType(ecore::ENamedElement).name.substring(self.oclAsType(ecore::ENamedElement).name.size())">
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/compartment/ICompartmentTests.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/compartment/ICompartmentTests.java
index ab4321183e..2cc882986c 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/compartment/ICompartmentTests.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/compartment/ICompartmentTests.java
@@ -17,7 +17,6 @@ import org.eclipse.sirius.tests.SiriusTestsPlugin;
* Interface to regroup common constant for tests on compartments.
*
* @author mporhel
- *
*/
public interface ICompartmentTests {
@@ -39,10 +38,18 @@ public interface ICompartmentTests {
public static final String VERTICAL_STACK_REPRESENTATION_NAME = "Diag with VStack";
+ public static final String VERTICAL_STACK_DND_REPRESENTATION_NAME = "Diag with VStack and DnD";
+
+ public static final String HORIZONTAL_STACK_DND_REPRESENTATION_NAME = "Diag with HStack and DnD";
+
public static final String HORIZONTAL_STACK_REPRESENTATION_INSTANCE_NAME = "HStackDiag";
public static final String VERTICAL_STACK_REPRESENTATION_INSTANCE_NAME = "VStackDiag";
+ public static final String VERTICAL_STACK_DND_REPRESENTATION_INSTANCE_NAME = "VStackDiag with DnD";
+
+ public static final String HORIZONTAL_STACK_DND_REPRESENTATION_INSTANCE_NAME = "HStackDiag with DnD";
+
public static final String PACKAGE_CREATION_TOOL_NAME = "EPackage";
public static final String CLASS_NODE_CREATION_TOOL_NAME = "EClassNode";
@@ -55,6 +62,8 @@ public interface ICompartmentTests {
public static final String SECOND_REGION_CONTAINER_NAME = "az";
+ public static final String FIRST_REGION_NAME = "cccc";
+
public static final String NEW_REGION_CONTAINER_NAME = "p3";
public static final String NEW_REGION_CONTAINER_WITH_DEFINED_SIZE_NAME = "Init_p3";
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/AbstractCompartmentTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/AbstractCompartmentTest.java
index b2ef03d7a1..fc72aae971 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/AbstractCompartmentTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/AbstractCompartmentTest.java
@@ -10,6 +10,14 @@
*******************************************************************************/
package org.eclipse.sirius.tests.swtbot.compartment;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.Size;
import org.eclipse.sirius.business.api.preferences.SiriusPreferencesKeys;
import org.eclipse.sirius.diagram.DDiagram;
import org.eclipse.sirius.diagram.DDiagramElementContainer;
@@ -83,4 +91,237 @@ public abstract class AbstractCompartmentTest extends AbstractSiriusSwtBotGefTes
DDiagramElementContainer diagramElement = (DDiagramElementContainer) ((AbstractDiagramElementContainerEditPart) editPart.part()).resolveDiagramElement();
return diagramElement;
}
+
+ /**
+ * Check the GMF and Draw2d bounds (or size) of the edit part with given
+ * <code>label</code>.
+ *
+ * @param label
+ * The label of the edit part to check
+ * @param expectedGmfBounds
+ * The expected GMF bounds
+ * @param expectedFigureBounds
+ * The expected draw2d bounds, if the width or height is equals
+ * to -1, we ignore it.
+ *
+ * @return A copy of the current Draw2d bounds
+ */
+ protected Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds) {
+ return checkBounds(label, expectedGmfBounds, expectedFigureBounds, false);
+ }
+
+ /**
+ * Check the GMF and Draw2d bounds (or size) of the edit part with given
+ * <code>label</code>.
+ *
+ * @param label
+ * The label of the edit part to check
+ * @param expectedGmfBounds
+ * The expected GMF bounds
+ * @param expectedFigureBounds
+ * The expected draw2d bounds, if the width or height is equals
+ * to -1, we ignore it.
+ * @param onlyCheckSize
+ * true if only the size must be check (and not the location),
+ * false otherwise.
+ *
+ * @return A copy of the current Draw2d bounds
+ */
+ private Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, boolean onlyCheckSize) {
+ return checkBounds(label, expectedGmfBounds, expectedFigureBounds, onlyCheckSize, 0, 0);
+ }
+
+ /**
+ * Check the GMF and Draw2d bounds (or size) of the edit part with given
+ * <code>label</code>.
+ *
+ * @param label
+ * The label of the edit part to check
+ * @param expectedGmfBounds
+ * The expected GMF bounds
+ * @param expectedFigureBounds
+ * The expected draw2d bounds, if the width or height is equals
+ * to -1, we ignore it.
+ * @param widthDelta
+ * The width delta to consider the width as equal (because of
+ * font size that can be slightly different on each OS).
+ * @param heightDelta
+ * The height delta to consider the height as equal (because of
+ * font size that can be slightly different on each OS).
+ *
+ * @return A copy of the current Draw2d bounds
+ */
+ protected Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, int widthDelta, int heightDelta) {
+ return checkBounds(label, expectedGmfBounds, expectedFigureBounds, false, widthDelta, heightDelta);
+ }
+
+ /**
+ * Check that the bounds (GMF and Draw2D) are as expected.
+ *
+ * @param label
+ * Label of the container to check.
+ * @param expectedGmfBounds
+ * The GMF expected bounds
+ * @param expectedFigureBounds
+ * The draw2d expected bounds. If the x, y , width or height in
+ * this bounds is equal to -1, we don't check it. This is useful
+ * in case of size that depends on Font (with different result
+ * according to OS).
+ * @param onlyCheckSize
+ * true if only the size must be check (and not the location),
+ * false otherwise. * @param widthDelta The width delta to
+ * consider the width as equal (because of font size that can be
+ * slightly different on each OS).
+ * @param widthDelta
+ * The width delta to consider the width as equal (because of
+ * font size that can be slightly different on each OS).
+ * @param heightDelta
+ * The height delta to consider the height as equal (because of
+ * font size that can be slightly different on each OS).
+ * @return A copy of the current DrawD2 bounds
+ */
+ protected Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, boolean onlyCheckSize, int widthDelta, int heightDelta) {
+ SWTBotGefEditPart swtBotEditPart = editor.getEditPart(label, AbstractDiagramElementContainerEditPart.class);
+ AbstractDiagramElementContainerEditPart editPart = (AbstractDiagramElementContainerEditPart) swtBotEditPart.part();
+
+ IFigure mainFigure = editPart.getMainFigure();
+
+ if (onlyCheckSize) {
+ if (widthDelta == 0 && heightDelta == 0) {
+ assertEquals("Wrong GMF size for " + label, expectedGmfBounds.getSize(), getBounds((Node) editPart.getNotationView()).getSize());
+ } else {
+ Dimension gmfSize = getBounds((Node) editPart.getNotationView()).getSize();
+ assertEquals("Wrong GMF width for " + label, expectedGmfBounds.width(), gmfSize.width(), widthDelta);
+ assertEquals("Wrong GMF height for " + label, expectedGmfBounds.height(), gmfSize.height(), heightDelta);
+ }
+ if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
+ if (widthDelta == 0 && heightDelta == 0) {
+ assertEquals("Wrong Draw2D size for " + label, expectedFigureBounds.getSize(), mainFigure.getBounds().getSize());
+ } else {
+ assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
+ assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
+ }
+ } else {
+ if (expectedFigureBounds.width() != -1) {
+ assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
+ }
+ if (expectedFigureBounds.height() != -1) {
+ assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
+ }
+ }
+ } else {
+ if (widthDelta == 0 && heightDelta == 0) {
+ assertEquals("Wrong GMF bounds for " + label, expectedGmfBounds, getBounds((Node) editPart.getNotationView()));
+ } else {
+ Rectangle gmfBounds = getBounds((Node) editPart.getNotationView());
+ assertEquals("Wrong GMF location for " + label, expectedGmfBounds.getLocation(), gmfBounds.getLocation());
+ assertEquals("Wrong GMF width for " + label, expectedGmfBounds.width(), gmfBounds.width(), widthDelta);
+ assertEquals("Wrong GMF height for " + label, expectedGmfBounds.height(), gmfBounds.height(), heightDelta);
+ }
+ if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
+ if (widthDelta == 0 && heightDelta == 0) {
+ assertEquals("Wrong Draw2D bounds for " + label, expectedFigureBounds, mainFigure.getBounds());
+ } else {
+ assertEquals("Wrong Draw2D location for " + label, expectedFigureBounds.getLocation(), mainFigure.getBounds().getLocation());
+ assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
+ assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
+ }
+ } else {
+ assertEquals("Wrong Draw2D x for " + label, expectedFigureBounds.x(), mainFigure.getBounds().x());
+ assertEquals("Wrong Draw2D y for " + label, expectedFigureBounds.y(), mainFigure.getBounds().y());
+ if (expectedFigureBounds.width() != -1) {
+ assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
+ }
+ if (expectedFigureBounds.height() != -1) {
+ assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
+ }
+ }
+ }
+ return (Rectangle) mainFigure.getBounds().getCopy();
+ }
+
+ /**
+ * Check the GMF and Draw2d bounds (or size) of the edit part under the
+ * given <code>point</code>.
+ *
+ * @param point
+ * A point on the edit part to check
+ * @param expectedGmfBounds
+ * The expected GMF bounds
+ * @param expectedFigureBounds
+ * The expected draw2d bounds, if the width or height is equals
+ * to -1, we ignore it.
+ * @param onlyCheckSize
+ * true if only the size must be check (and not the location),
+ * false otherwise.
+ *
+ * @return A copy of the current Draw2d bounds
+ */
+ private Rectangle checkBoundsWithPosition(Point point, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, boolean onlyCheckSize) {
+ SWTBotGefEditPart swtBotEditPart = editor.getEditPart(point, AbstractDiagramElementContainerEditPart.class);
+ AbstractDiagramElementContainerEditPart editPart = (AbstractDiagramElementContainerEditPart) swtBotEditPart.part();
+
+ IFigure mainFigure = editPart.getMainFigure();
+
+ if (onlyCheckSize) {
+ assertEquals("Wrong GMF size for figure at position " + point, expectedGmfBounds.getSize(), getBounds((Node) editPart.getNotationView()).getSize());
+ if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
+ assertEquals("Wrong Draw2D size for figure at position " + point, expectedFigureBounds.getSize(), mainFigure.getBounds().getSize());
+ } else {
+ if (expectedFigureBounds.width() != -1) {
+ assertEquals("Wrong Draw2D width for figure at position " + point, expectedFigureBounds.width(), mainFigure.getBounds().width());
+ }
+ if (expectedFigureBounds.height() != -1) {
+ assertEquals("Wrong Draw2D height for figure at position " + point, expectedFigureBounds.height(), mainFigure.getBounds().height());
+ }
+ }
+ } else {
+ assertEquals("Wrong GMF bounds for figure at position " + point, expectedGmfBounds, getBounds((Node) editPart.getNotationView()));
+ if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
+ assertEquals("Wrong Draw2D bounds for figure at position " + point, expectedFigureBounds, mainFigure.getBounds());
+ } else {
+ assertEquals("Wrong Draw2D x for figure at position " + point, expectedFigureBounds.x(), mainFigure.getBounds().x());
+ assertEquals("Wrong Draw2D y for figure at position " + point, expectedFigureBounds.y(), mainFigure.getBounds().y());
+ if (expectedFigureBounds.width() != -1) {
+ assertEquals("Wrong Draw2D width for figure at position " + point, expectedFigureBounds.width(), mainFigure.getBounds().width());
+ }
+ if (expectedFigureBounds.height() != -1) {
+ assertEquals("Wrong Draw2D height for figure at position " + point, expectedFigureBounds.height(), mainFigure.getBounds().height());
+ }
+ }
+ }
+ return (Rectangle) mainFigure.getBounds().getCopy();
+ }
+
+ /**
+ * Check the GMF and Draw2d bounds of the edit part under the given
+ * <code>point</code>.
+ *
+ * @param point
+ * A point on the edit part to check
+ * @param expectedGmfBounds
+ * The expected GMF bounds
+ * @param expectedFigureBounds
+ * The expected draw2d bounds, if the width or height is equals
+ * to -1, we ignore it.
+ *
+ * @return A copy of the current Draw2d bounds
+ */
+ protected Rectangle checkBounds(Point point, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds) {
+ return checkBoundsWithPosition(point, expectedGmfBounds, expectedFigureBounds, false);
+ }
+
+ private Rectangle getBounds(Node notationView) {
+ Rectangle bounds = new Rectangle();
+ LayoutConstraint layoutConstraint = notationView.getLayoutConstraint();
+ if (layoutConstraint instanceof Location) {
+ Location location = (Location) layoutConstraint;
+ bounds.setLocation(location.getX(), location.getY());
+ }
+ if (layoutConstraint instanceof Size) {
+ Size size = (Size) layoutConstraint;
+ bounds.setSize(size.getWidth(), size.getHeight());
+ }
+ return bounds;
+ }
}
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsCreationTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsCreationTest.java
index 42ca5e0d34..cd01ae174a 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsCreationTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsCreationTest.java
@@ -33,10 +33,6 @@ import org.eclipse.gef.LayerConstants;
import org.eclipse.gef.editparts.LayerManager;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.handles.CompartmentCollapseHandle;
-import org.eclipse.gmf.runtime.notation.LayoutConstraint;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Size;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.sirius.business.api.session.SessionStatus;
import org.eclipse.sirius.common.tools.internal.resource.ResourceSyncClientNotifier;
@@ -595,239 +591,6 @@ public class CompartmentsCreationTest extends AbstractCompartmentTest {
}
/**
- * Check the GMF and Draw2d bounds (or size) of the edit part with given
- * <code>label</code>.
- *
- * @param label
- * The label of the edit part to check
- * @param expectedGmfBounds
- * The expected GMF bounds
- * @param expectedFigureBounds
- * The expected draw2d bounds, if the width or height is equals
- * to -1, we ignore it.
- *
- * @return A copy of the current Draw2d bounds
- */
- private Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds) {
- return checkBounds(label, expectedGmfBounds, expectedFigureBounds, false);
- }
-
- /**
- * Check the GMF and Draw2d bounds (or size) of the edit part with given
- * <code>label</code>.
- *
- * @param label
- * The label of the edit part to check
- * @param expectedGmfBounds
- * The expected GMF bounds
- * @param expectedFigureBounds
- * The expected draw2d bounds, if the width or height is equals
- * to -1, we ignore it.
- * @param onlyCheckSize
- * true if only the size must be check (and not the location),
- * false otherwise.
- *
- * @return A copy of the current Draw2d bounds
- */
- private Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, boolean onlyCheckSize) {
- return checkBounds(label, expectedGmfBounds, expectedFigureBounds, onlyCheckSize, 0, 0);
- }
-
- /**
- * Check the GMF and Draw2d bounds (or size) of the edit part with given
- * <code>label</code>.
- *
- * @param label
- * The label of the edit part to check
- * @param expectedGmfBounds
- * The expected GMF bounds
- * @param expectedFigureBounds
- * The expected draw2d bounds, if the width or height is equals
- * to -1, we ignore it.
- * @param widthDelta
- * The width delta to consider the width as equal (because of
- * font size that can be slightly different on each OS).
- * @param heightDelta
- * The height delta to consider the height as equal (because of
- * font size that can be slightly different on each OS).
- *
- * @return A copy of the current Draw2d bounds
- */
- private Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, int widthDelta, int heightDelta) {
- return checkBounds(label, expectedGmfBounds, expectedFigureBounds, false, widthDelta, heightDelta);
- }
-
- /**
- * Check that the bounds (GMF and Draw2D) are as expected.
- *
- * @param label
- * Label of the container to check.
- * @param expectedGmfBounds
- * The GMF expected bounds
- * @param expectedFigureBounds
- * The draw2d expected bounds. If the x, y , width or height in
- * this bounds is equal to -1, we don't check it. This is useful
- * in case of size that depends on Font (with different result
- * according to OS).
- * @param onlyCheckSize
- * true if only the size must be check (and not the location),
- * false otherwise. * @param widthDelta The width delta to
- * consider the width as equal (because of font size that can be
- * slightly different on each OS).
- * @param widthDelta
- * The width delta to consider the width as equal (because of
- * font size that can be slightly different on each OS).
- * @param heightDelta
- * The height delta to consider the height as equal (because of
- * font size that can be slightly different on each OS).
- * @return A copy of the current DrawD2 bounds
- */
- private Rectangle checkBounds(String label, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, boolean onlyCheckSize, int widthDelta, int heightDelta) {
- SWTBotGefEditPart swtBotEditPart = editor.getEditPart(label, AbstractDiagramElementContainerEditPart.class);
- AbstractDiagramElementContainerEditPart editPart = (AbstractDiagramElementContainerEditPart) swtBotEditPart.part();
-
- IFigure mainFigure = editPart.getMainFigure();
-
- if (onlyCheckSize) {
- if (widthDelta == 0 && heightDelta == 0) {
- assertEquals("Wrong GMF size for " + label, expectedGmfBounds.getSize(), getBounds((Node) editPart.getNotationView()).getSize());
- } else {
- Dimension gmfSize = getBounds((Node) editPart.getNotationView()).getSize();
- assertEquals("Wrong GMF width for " + label, expectedGmfBounds.width(), gmfSize.width(), widthDelta);
- assertEquals("Wrong GMF height for " + label, expectedGmfBounds.height(), gmfSize.height(), heightDelta);
- }
- if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
- if (widthDelta == 0 && heightDelta == 0) {
- assertEquals("Wrong Draw2D size for " + label, expectedFigureBounds.getSize(), mainFigure.getBounds().getSize());
- } else {
- assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
- assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
- }
- } else {
- if (expectedFigureBounds.width() != -1) {
- assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
- }
- if (expectedFigureBounds.height() != -1) {
- assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
- }
- }
- } else {
- if (widthDelta == 0 && heightDelta == 0) {
- assertEquals("Wrong GMF bounds for " + label, expectedGmfBounds, getBounds((Node) editPart.getNotationView()));
- } else {
- Rectangle gmfBounds = getBounds((Node) editPart.getNotationView());
- assertEquals("Wrong GMF location for " + label, expectedGmfBounds.getLocation(), gmfBounds.getLocation());
- assertEquals("Wrong GMF width for " + label, expectedGmfBounds.width(), gmfBounds.width(), widthDelta);
- assertEquals("Wrong GMF height for " + label, expectedGmfBounds.height(), gmfBounds.height(), heightDelta);
- }
- if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
- if (widthDelta == 0 && heightDelta == 0) {
- assertEquals("Wrong Draw2D bounds for " + label, expectedFigureBounds, mainFigure.getBounds());
- } else {
- assertEquals("Wrong Draw2D location for " + label, expectedFigureBounds.getLocation(), mainFigure.getBounds().getLocation());
- assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
- assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
- }
- } else {
- assertEquals("Wrong Draw2D x for " + label, expectedFigureBounds.x(), mainFigure.getBounds().x());
- assertEquals("Wrong Draw2D y for " + label, expectedFigureBounds.y(), mainFigure.getBounds().y());
- if (expectedFigureBounds.width() != -1) {
- assertEquals("Wrong Draw2D width for " + label, expectedFigureBounds.width(), mainFigure.getBounds().width(), widthDelta);
- }
- if (expectedFigureBounds.height() != -1) {
- assertEquals("Wrong Draw2D height for " + label, expectedFigureBounds.height(), mainFigure.getBounds().height(), heightDelta);
- }
- }
- }
- return (Rectangle) mainFigure.getBounds().getCopy();
- }
-
- /**
- * Check the GMF and Draw2d bounds (or size) of the edit part under the
- * given <code>point</code>.
- *
- * @param point
- * A point on the edit part to check
- * @param expectedGmfBounds
- * The expected GMF bounds
- * @param expectedFigureBounds
- * The expected draw2d bounds, if the width or height is equals
- * to -1, we ignore it.
- * @param onlyCheckSize
- * true if only the size must be check (and not the location),
- * false otherwise.
- *
- * @return A copy of the current Draw2d bounds
- */
- private Rectangle checkBoundsWithPosition(Point point, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds, boolean onlyCheckSize) {
- SWTBotGefEditPart swtBotEditPart = editor.getEditPart(point, AbstractDiagramElementContainerEditPart.class);
- AbstractDiagramElementContainerEditPart editPart = (AbstractDiagramElementContainerEditPart) swtBotEditPart.part();
-
- IFigure mainFigure = editPart.getMainFigure();
-
- if (onlyCheckSize) {
- assertEquals("Wrong GMF size for figure at position " + point, expectedGmfBounds.getSize(), getBounds((Node) editPart.getNotationView()).getSize());
- if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
- assertEquals("Wrong Draw2D size for figure at position " + point, expectedFigureBounds.getSize(), mainFigure.getBounds().getSize());
- } else {
- if (expectedFigureBounds.width() != -1) {
- assertEquals("Wrong Draw2D width for figure at position " + point, expectedFigureBounds.width(), mainFigure.getBounds().width());
- }
- if (expectedFigureBounds.height() != -1) {
- assertEquals("Wrong Draw2D height for figure at position " + point, expectedFigureBounds.height(), mainFigure.getBounds().height());
- }
- }
- } else {
- assertEquals("Wrong GMF bounds for figure at position " + point, expectedGmfBounds, getBounds((Node) editPart.getNotationView()));
- if (expectedFigureBounds.width() != -1 && expectedFigureBounds.height() != -1) {
- assertEquals("Wrong Draw2D bounds for figure at position " + point, expectedFigureBounds, mainFigure.getBounds());
- } else {
- assertEquals("Wrong Draw2D x for figure at position " + point, expectedFigureBounds.x(), mainFigure.getBounds().x());
- assertEquals("Wrong Draw2D y for figure at position " + point, expectedFigureBounds.y(), mainFigure.getBounds().y());
- if (expectedFigureBounds.width() != -1) {
- assertEquals("Wrong Draw2D width for figure at position " + point, expectedFigureBounds.width(), mainFigure.getBounds().width());
- }
- if (expectedFigureBounds.height() != -1) {
- assertEquals("Wrong Draw2D height for figure at position " + point, expectedFigureBounds.height(), mainFigure.getBounds().height());
- }
- }
- }
- return (Rectangle) mainFigure.getBounds().getCopy();
- }
-
- /**
- * Check the GMF and Draw2d bounds of the edit part under the given
- * <code>point</code>.
- *
- * @param point
- * A point on the edit part to check
- * @param expectedGmfBounds
- * The expected GMF bounds
- * @param expectedFigureBounds
- * The expected draw2d bounds, if the width or height is equals
- * to -1, we ignore it.
- *
- * @return A copy of the current Draw2d bounds
- */
- private Rectangle checkBounds(Point point, Rectangle expectedGmfBounds, Rectangle expectedFigureBounds) {
- return checkBoundsWithPosition(point, expectedGmfBounds, expectedFigureBounds, false);
- }
-
- private Rectangle getBounds(Node notationView) {
- Rectangle bounds = new Rectangle();
- LayoutConstraint layoutConstraint = notationView.getLayoutConstraint();
- if (layoutConstraint instanceof Location) {
- Location location = (Location) layoutConstraint;
- bounds.setLocation(location.getX(), location.getY());
- }
- if (layoutConstraint instanceof Size) {
- Size size = (Size) layoutConstraint;
- bounds.setSize(size.getWidth(), size.getHeight());
- }
- return bounds;
- }
-
- /**
* Add a new package p3 in the root package. The modification is not made in
* the same resourceSet, as if this modification is made in another editor
* not in Sirius.
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsDragAndDropTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsDragAndDropTest.java
new file mode 100644
index 0000000000..e8d57ebb49
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/compartment/CompartmentsDragAndDropTest.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.tests.swtbot.compartment;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.sirius.business.api.session.SessionStatus;
+
+/**
+ * Tests ensure that elements are drag and drop in compartments or in diagram as
+ * expected (by conserving their sizes).
+ *
+ * @author <a href="mailto:jessy.mallet@obeo.fr">Jessy Mallet</a>
+ */
+public class CompartmentsDragAndDropTest extends AbstractCompartmentTest {
+
+ /**
+ * GMF bounds of the region to drag and drop in a VStack or HStack
+ * container.
+ */
+ private static final Rectangle REGION_BOUNDS_GMF = new Rectangle(118, 30, -1, -1);
+
+ /** Draw2D bounds of the region to drag and drop in a VStack container. */
+ private static final Rectangle REGION_BOUNDS_DRAW2D_VSTACK = new Rectangle(118, 30, 173, 135);
+
+ /**
+ * Draw2D bounds auto-sized of the region to drag and drop in a container.
+ */
+ private static final Rectangle REGION_BOUNDS_DRAW2D_AUTO_SIZED = new Rectangle(118, 30, -1, -1);
+
+ /** Draw2D bounds of the region to drag and drop in a HStack container. */
+ private static final Rectangle REGION_BOUNDS_DRAW2D_HSTACK = new Rectangle(118, 30, 108, 76);
+
+ /** Point used to drag region from HStack container to the diagram. */
+ private static final Point HSTACK_DRAG_POINT = new Point(700, 80);
+
+ /** Point used to drag region from VStack container to the diagram. */
+ private static final Point VSTACK_DRAG_POINT = new Point(700, 220);
+
+ /** Point used to drop region into the diagram. */
+ private static final Point DROP_POINT = new Point(1000, 500);
+
+ private String oldFont;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void onSetUpAfterOpeningDesignerPerspective() throws Exception {
+ super.onSetUpAfterOpeningDesignerPerspective();
+ oldFont = changeDefaultFontName("Comic Sans MS");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ if (oldFont != null) {
+ changeDefaultFontName(oldFont);
+ }
+ super.tearDown();
+ }
+
+ /**
+ * Test to ensure that elements are drag from container with vertical stack
+ * and drop into diagram with the same size. The reverse scenario is also
+ * tested. Check specific size for region after drag and drop.
+ */
+ public void testDnDOfVerticalRegionFromContainerToDiag() {
+ openRepresentation(VERTICAL_STACK_DND_REPRESENTATION_NAME, VERTICAL_STACK_DND_REPRESENTATION_INSTANCE_NAME);
+
+ assertEquals("Session should not be dirty.", SessionStatus.SYNC, localSession.getOpenedSession().getStatus());
+
+ // Check that the existing region is as expected (a delta of 1 is
+ // tolerate for height because of font problem in such OS)
+ checkBounds(FIRST_REGION_NAME, REGION_BOUNDS_GMF, REGION_BOUNDS_DRAW2D_VSTACK, false, 0, 1);
+
+ // Drag and Drop from region to diagram
+ editor.drag(VSTACK_DRAG_POINT, DROP_POINT);
+
+ // Check that the DnD region keeps its size.
+ checkBounds(FIRST_REGION_NAME, REGION_BOUNDS_DRAW2D_AUTO_SIZED, REGION_BOUNDS_DRAW2D_VSTACK, true, 0, 1);
+
+ // Drag and Drop from diagram to region
+ editor.drag(DROP_POINT, VSTACK_DRAG_POINT);
+
+ // Check that the DnD region keeps its size.
+ checkBounds(FIRST_REGION_NAME, REGION_BOUNDS_DRAW2D_AUTO_SIZED, REGION_BOUNDS_DRAW2D_VSTACK, true, 0, 1);
+ }
+
+ /**
+ * Test to ensure that elements are drag from container with horizontal
+ * stack and drop into diagram with the same size. The reverse scenario is
+ * also tested. Check specific size for region after drag and drop.
+ */
+ public void testDnDOfHorizontalRegionFromContainerToDiag() {
+ openRepresentation(HORIZONTAL_STACK_DND_REPRESENTATION_NAME, HORIZONTAL_STACK_DND_REPRESENTATION_INSTANCE_NAME);
+
+ assertEquals("Session should not be dirty.", SessionStatus.SYNC, localSession.getOpenedSession().getStatus());
+
+ // Check that the existing region is as expected (a delta of 1 is
+ // tolerate for height because of font problem in such OS)
+ checkBounds(FIRST_REGION_NAME, REGION_BOUNDS_GMF, REGION_BOUNDS_DRAW2D_HSTACK, false, 0, 1);
+
+ // Drag and Drop from region to diagram
+ editor.drag(HSTACK_DRAG_POINT, DROP_POINT);
+
+ // Check that the DnD region keeps its size.
+ checkBounds(FIRST_REGION_NAME, REGION_BOUNDS_DRAW2D_AUTO_SIZED, REGION_BOUNDS_DRAW2D_HSTACK, true, 0, 1);
+
+ // Drag and Drop from diagram to region
+ editor.drag(DROP_POINT, HSTACK_DRAG_POINT);
+
+ // Check that the DnD region keeps its size.
+ checkBounds(FIRST_REGION_NAME, REGION_BOUNDS_DRAW2D_AUTO_SIZED, REGION_BOUNDS_DRAW2D_HSTACK, true, 0, 1);
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
index 7b7823da5e..892f46c584 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
@@ -21,6 +21,7 @@ import org.eclipse.sirius.tests.swtbot.clipboard.DisabledSiriusClipboardSupportT
import org.eclipse.sirius.tests.swtbot.clipboard.GenericClipboardSupportTest;
import org.eclipse.sirius.tests.swtbot.clipboard.MultiSessionCopyPasteTest;
import org.eclipse.sirius.tests.swtbot.compartment.CompartmentsCreationTest;
+import org.eclipse.sirius.tests.swtbot.compartment.CompartmentsDragAndDropTest;
import org.eclipse.sirius.tests.swtbot.crossTable.CrossTableIntersectionExpressionTest;
import org.eclipse.sirius.tests.swtbot.crossTable.CrossTableIntersectionTest;
import org.eclipse.sirius.tests.swtbot.editor.vsm.BorderSizeComputationExpressionTest;
@@ -153,6 +154,7 @@ public class AllTestSuite extends TestCase {
suite.addTestSuite(SpecificClosedOrNotClosedEditorTest.class);
suite.addTestSuite(LineStyleTest.class);
suite.addTestSuite(CompartmentsCreationTest.class);
+ suite.addTestSuite(CompartmentsDragAndDropTest.class);
}
/**

Back to the top