Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Barbin2014-11-24 16:50:07 +0000
committerFlorian Barbin2014-12-04 09:38:41 +0000
commitaa71fd0455b1bdaea07dee635ede6b09d9a7c146 (patch)
tree6feac190d2674be44475dcc36b975ed192c94d7f
parent337e9331c92ca06d784e44c7f57897c47e11d3a0 (diff)
downloadorg.eclipse.sirius-aa71fd0455b1bdaea07dee635ede6b09d9a7c146.tar.gz
org.eclipse.sirius-aa71fd0455b1bdaea07dee635ede6b09d9a7c146.tar.xz
org.eclipse.sirius-aa71fd0455b1bdaea07dee635ede6b09d9a7c146.zip
[453036] Do not fail if the reconnected edge has not the expected src or
tgt. * Those commands retrieve the reconnected edge from the source or target node. In the case where the new edge source or the new edge target is different, we cannot retrieve the reconnected edge. Those commands do not need to be executed since the edge is different. * Add a new test case to check this issue Bug: 453036 Change-Id: Ic1a6a451256556779786d708cfbaba0f88318689 Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SetReconnectingConnectionBendpointsCommand.java34
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SiriusSetConnectionAnchorsCommand.java16
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.aird235
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.ecore10
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.odesign46
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ReconnectEdgeBendpointStabilityTest.java43
6 files changed, 332 insertions, 52 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SetReconnectingConnectionBendpointsCommand.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SetReconnectingConnectionBendpointsCommand.java
index b96f49c633..f5489b1c77 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SetReconnectingConnectionBendpointsCommand.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SetReconnectingConnectionBendpointsCommand.java
@@ -117,24 +117,26 @@ public class SetReconnectingConnectionBendpointsCommand extends SetConnectionBen
// The edge recovery is the difference with the parent command
Edge edge = reconnectingEdgeHelper.getReconnectedEdge();
- Assert.isNotNull(edge);
- List newBendpoints = new ArrayList();
- int numOfPoints = getNewPointList().size();
- for (short i = 0; i < numOfPoints; i++) {
- // The sourceRefPoint and targetRefPoint will be recovered from the
- // reconnected edge
- Dimension s = getNewPointList().getPoint(i).getDifference(getSourceRefPoint());
- Dimension t = getNewPointList().getPoint(i).getDifference(getTargetRefPoint());
- newBendpoints.add(new RelativeBendpoint(s.width, s.height, t.width, t.height));
+ // if the reconnected edge do not exist, there is nothing to do here.
+ if (edge != null) {
+ List newBendpoints = new ArrayList();
+ int numOfPoints = getNewPointList().size();
+ for (short i = 0; i < numOfPoints; i++) {
+ // The sourceRefPoint and targetRefPoint will be recovered from
+ // the
+ // reconnected edge
+ Dimension s = getNewPointList().getPoint(i).getDifference(getSourceRefPoint());
+ Dimension t = getNewPointList().getPoint(i).getDifference(getTargetRefPoint());
+ newBendpoints.add(new RelativeBendpoint(s.width, s.height, t.width, t.height));
+ }
+
+ RelativeBendpoints points = (RelativeBendpoints) edge.getBendpoints();
+ points.setPoints(newBendpoints);
+
+ CenterEdgeEndModelChangeOperation centerEdgeEndModelChangeOperation = new CenterEdgeEndModelChangeOperation(edge, false);
+ centerEdgeEndModelChangeOperation.execute();
}
-
- RelativeBendpoints points = (RelativeBendpoints) edge.getBendpoints();
- points.setPoints(newBendpoints);
-
- CenterEdgeEndModelChangeOperation centerEdgeEndModelChangeOperation = new CenterEdgeEndModelChangeOperation(edge, false);
- centerEdgeEndModelChangeOperation.execute();
-
return CommandResult.newOKCommandResult();
}
}
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SiriusSetConnectionAnchorsCommand.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SiriusSetConnectionAnchorsCommand.java
index 3d1299acbf..fd4521876d 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SiriusSetConnectionAnchorsCommand.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/command/SiriusSetConnectionAnchorsCommand.java
@@ -22,7 +22,6 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.IdentityAnchor;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.sirius.diagram.DiagramPlugin;
import org.eclipse.sirius.diagram.description.tool.ReconnectionKind;
import org.eclipse.sirius.diagram.ui.business.api.query.EdgeQuery;
import org.eclipse.sirius.diagram.ui.business.internal.edit.helpers.EdgeReconnectionHelper;
@@ -82,16 +81,11 @@ public class SiriusSetConnectionAnchorsCommand extends SetConnectionAnchorsComma
Edge edge = reconnectingEdgeHelper.getReconnectedEdge();
- assert null != edge : "Null edge in SetConnectionAnchorsCommand"; //$NON-NLS-1$
-
- // In case the reconnectTool has not updated correctly the semantic
- // to
- // do the reconnect, the Edge can be null
- if (edge == null) {
- String message = "The semantic model was not correctly updated by the reconnect tool, the diagram part of the reconnect cannot be done";
- commandResult = CommandResult.newErrorCommandResult(message);
- DiagramPlugin.getDefault().logWarning(message);
- } else {
+ // The reconnect tool did not necessary reconnect the edge with the
+ // expected new source or target. In the case where we did not find
+ // out the
+ // reconnected edge, there is nothing to do here.
+ if (edge != null) {
// If there is tree brothers on the new source, we must use the
// existing
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.aird b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.aird
index 307a9a79aa..977fd61fa8 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.aird
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.aird
@@ -356,6 +356,24 @@
<styles xmi:type="notation:ShapeStyle" xmi:id="_HjZVNUTJEeSpqrYEaWzMNQ" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_HjZVNkTJEeSpqrYEaWzMNQ" x="624" y="252"/>
</children>
+ <children xmi:type="notation:Node" xmi:id="_2KU9sHrYEeSk7vyfgIDQIw" type="2002" element="_2J9xUHrYEeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_2KU9s3rYEeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_2KVkwHrYEeSk7vyfgIDQIw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_7kNMcHrYEeSk7vyfgIDQIw" visible="false" type="3008" element="_7i3vsHrYEeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_7kPBoHrYEeSk7vyfgIDQIw" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_7kQPwHrYEeSk7vyfgIDQIw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_7kQPwXrYEeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_7kQPwnrYEeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_7kNMcXrYEeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7kNMcnrYEeSk7vyfgIDQIw" x="180" y="35"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2KVkwXrYEeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2KVkwnrYEeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_2KU9sXrYEeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2KU9snrYEeSk7vyfgIDQIw" x="132" y="60"/>
+ </children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_HjIPckTJEeSpqrYEaWzMNQ"/>
<edges xmi:type="notation:Edge" xmi:id="_DvrkQETPEeSpqrYEaWzMNQ" type="4001" element="_DvldoETPEeSpqrYEaWzMNQ" source="_Hjh4EETJEeSpqrYEaWzMNQ" target="_Hjk7YkTJEeSpqrYEaWzMNQ">
<children xmi:type="notation:Node" xmi:id="_DvsLUETPEeSpqrYEaWzMNQ" type="6001">
@@ -369,7 +387,7 @@
</children>
<styles xmi:type="notation:ConnectorStyle" xmi:id="_DvrkQUTPEeSpqrYEaWzMNQ"/>
<styles xmi:type="notation:FontStyle" xmi:id="_DvrkQkTPEeSpqrYEaWzMNQ" fontName="Segoe UI" fontHeight="8"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_DvrkQ0TPEeSpqrYEaWzMNQ" points="[15, -7, -279, 131]$[121, -51, -173, 87]$[85, -153, -209, -15]$[279, -140, -15, -2]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_DvrkQ0TPEeSpqrYEaWzMNQ" points="[15, -7, -299, 131]$[127, -51, -187, 87]$[98, -153, -216, -15]$[299, -140, -15, -2]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_DvsLVkTPEeSpqrYEaWzMNQ" id="(0.5,0.5)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_DvsyYETPEeSpqrYEaWzMNQ" id="(0.5,0.5)"/>
</edges>
@@ -471,6 +489,33 @@
</ownedStyle>
<actualMapping xmi:type="description_1:EdgeMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@edgeMappings[name='reference']"/>
</ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_2J9xUHrYEeSk7vyfgIDQIw" name="Package4">
+ <target xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4"/>
+ <semanticElements xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_2J-YYHrYEeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_2J-YYXrYEeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_2J-YYnrYEeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_2J-YY3rYEeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_2J-YZHrYEeSk7vyfgIDQIw" red="255" green="245" blue="181"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_7i3vsHrYEeSk7vyfgIDQIw" name="newPackage1" visible="false">
+ <target xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4/newPackage1"/>
+ <semanticElements xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4/newPackage1"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_7i3vsXrYEeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_7i3vsnrYEeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_7i3vs3rYEeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_7i3vtHrYEeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_7i3vtXrYEeSk7vyfgIDQIw" red="255" green="245" blue="181"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
<description xmi:type="description_1:DiagramDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']"/>
<filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_Hi_Fw0TJEeSpqrYEaWzMNQ"/>
<activatedLayers xmi:type="description_1:Layer" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer"/>
@@ -539,6 +584,15 @@
<styles xmi:type="notation:ShapeStyle" xmi:id="_P0N0gUTMEeSpqrYEaWzMNQ" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_P0N0gkTMEeSpqrYEaWzMNQ" x="582" y="288"/>
</children>
+ <children xmi:type="notation:Node" xmi:id="_2KQFMHrYEeSk7vyfgIDQIw" type="2002" element="_2KFtIHrYEeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_2KRTUHrYEeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_2KShcHrYEeSk7vyfgIDQIw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2KShcXrYEeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2KShcnrYEeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_2KQFMXrYEeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2KQFMnrYEeSk7vyfgIDQIw" x="192" y="276"/>
+ </children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_NMwxckTJEeSpqrYEaWzMNQ"/>
<edges xmi:type="notation:Edge" xmi:id="_DR1KoETPEeSpqrYEaWzMNQ" type="4001" element="_DRsnwETPEeSpqrYEaWzMNQ" source="_aZejAETMEeSpqrYEaWzMNQ" target="_aZhmUETMEeSpqrYEaWzMNQ">
<children xmi:type="notation:Node" xmi:id="_DR1KpETPEeSpqrYEaWzMNQ" type="6001">
@@ -651,6 +705,21 @@
</ownedStyle>
<actualMapping xmi:type="description_1:EdgeMappingImport" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='manhattanEdgeReconnection']/@defaultLayer/@edgeMappingImports[name='']"/>
</ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_2KFtIHrYEeSk7vyfgIDQIw" name="Package4">
+ <target xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4"/>
+ <semanticElements xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_2KFtIXrYEeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_2KFtInrYEeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_2KFtI3rYEeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_2KFtJHrYEeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_2KFtJXrYEeSk7vyfgIDQIw" red="255" green="245" blue="181"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMappingImport" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='manhattanEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackageImport']"/>
+ </ownedDiagramElements>
<description xmi:type="description_1:DiagramDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='manhattanEdgeReconnection']"/>
<filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_NMu8g0TJEeSpqrYEaWzMNQ"/>
<activatedLayers xmi:type="description_1:Layer" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='manhattanEdgeReconnection']/@defaultLayer"/>
@@ -719,6 +788,15 @@
<styles xmi:type="notation:ShapeStyle" xmi:id="_0p0DQUTMEeSpqrYEaWzMNQ" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_0p0DQkTMEeSpqrYEaWzMNQ" x="120" y="36"/>
</children>
+ <children xmi:type="notation:Node" xmi:id="_2KTIgHrYEeSk7vyfgIDQIw" type="2002" element="_2J0nYHrYEeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_2KTvkHrYEeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_2KTvkXrYEeSk7vyfgIDQIw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2KTvknrYEeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2KTvk3rYEeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_2KTIgXrYEeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2KTIgnrYEeSk7vyfgIDQIw" x="672" y="48"/>
+ </children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_0pyOEkTMEeSpqrYEaWzMNQ"/>
<edges xmi:type="notation:Edge" xmi:id="_auUqQETPEeSpqrYEaWzMNQ" type="4001" element="_0pxnPUTMEeSpqrYEaWzMNQ" source="_0p14cETMEeSpqrYEaWzMNQ" target="_0p3toETMEeSpqrYEaWzMNQ">
<children xmi:type="notation:Node" xmi:id="_auVRUETPEeSpqrYEaWzMNQ" type="6001">
@@ -732,7 +810,7 @@
</children>
<styles xmi:type="notation:ConnectorStyle" xmi:id="_auUqQUTPEeSpqrYEaWzMNQ" routing="Tree"/>
<styles xmi:type="notation:FontStyle" xmi:id="_auUqQkTPEeSpqrYEaWzMNQ" fontName="Segoe UI" fontHeight="8"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_auUqQ0TPEeSpqrYEaWzMNQ" points="[0, -15, -112, 111]$[0, -69, -112, 57]$[104, -69, -8, 57]$[104, -111, -8, 15]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_auUqQ0TPEeSpqrYEaWzMNQ" points="[0, -15, -112, 111]$[0, -69, -112, 57]$[104, -69, -8, 57]$[109, -111, -3, 15]"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_auXGgETPEeSpqrYEaWzMNQ" id="(0.5,0.5)"/>
</edges>
</data>
@@ -837,11 +915,164 @@
</ownedStyle>
<actualMapping xmi:type="description_1:EdgeMappingImport" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='treeEdgeReconnection']/@defaultLayer/@edgeMappingImports[name='']"/>
</ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_2J0nYHrYEeSk7vyfgIDQIw" name="Package4">
+ <target xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4"/>
+ <semanticElements xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_2J1OcHrYEeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_2J1OcXrYEeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_2J1OcnrYEeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_2J1Oc3rYEeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_2J1OdHrYEeSk7vyfgIDQIw" red="255" green="245" blue="181"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMappingImport" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='treeEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackageImport']"/>
+ </ownedDiagramElements>
<description xmi:type="description_1:DiagramDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='treeEdgeReconnection']"/>
<filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_0pxnQkTMEeSpqrYEaWzMNQ"/>
<activatedLayers xmi:type="description_1:Layer" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='treeEdgeReconnection']/@defaultLayer"/>
<target xmi:type="ecore:EPackage" href="edgeReconnection.ecore#/"/>
</ownedRepresentations>
+ <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_AOS20Hr2EeSk7vyfgIDQIw" name="new newEdgeAfterReconnect">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_AOUE8Hr2EeSk7vyfgIDQIw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_AOUE8Xr2EeSk7vyfgIDQIw" type="Sirius" element="_AOS20Hr2EeSk7vyfgIDQIw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_AOUE83r2EeSk7vyfgIDQIw" type="2002" element="_AOS20Xr2EeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_AOUsAHr2EeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_AOVTEHr2EeSk7vyfgIDQIw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AOVTEXr2EeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AOVTEnr2EeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_AOUE9Hr2EeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AOUE9Xr2EeSk7vyfgIDQIw" x="372" y="84"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_AOVTE3r2EeSk7vyfgIDQIw" type="2002" element="_AOTd5Hr2EeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_AOWhMHr2EeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_AOXIQHr2EeSk7vyfgIDQIw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AOXIQXr2EeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AOXIQnr2EeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_AOVTFHr2EeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AOVTFXr2EeSk7vyfgIDQIw" x="648" y="84"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_AOXIQ3r2EeSk7vyfgIDQIw" type="2002" element="_AOTd6nr2EeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_AOXvUHr2EeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_AOXvUXr2EeSk7vyfgIDQIw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AOXvUnr2EeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AOXvU3r2EeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_AOXIRHr2EeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AOXIRXr2EeSk7vyfgIDQIw" x="360" y="240"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_AOXvVHr2EeSk7vyfgIDQIw" type="2002" element="_AOTd8Hr2EeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_AOYWYHr2EeSk7vyfgIDQIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_AOYWYXr2EeSk7vyfgIDQIw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AOYWYnr2EeSk7vyfgIDQIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AOYWY3r2EeSk7vyfgIDQIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_AOXvVXr2EeSk7vyfgIDQIw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AOXvVnr2EeSk7vyfgIDQIw" x="648" y="276"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_AOUE8nr2EeSk7vyfgIDQIw"/>
+ <edges xmi:type="notation:Edge" xmi:id="_9_-nUHsEEeSRoe1Y1Qm5Mw" type="4001" element="_9_YxcHsEEeSRoe1Y1Qm5Mw" source="_AOXIQ3r2EeSk7vyfgIDQIw" target="_AOUE83r2EeSk7vyfgIDQIw">
+ <children xmi:type="notation:Node" xmi:id="_9__OYHsEEeSRoe1Y1Qm5Mw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9__OYXsEEeSRoe1Y1Qm5Mw" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_9__OYnsEEeSRoe1Y1Qm5Mw" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9__OY3sEEeSRoe1Y1Qm5Mw" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_9__1cHsEEeSRoe1Y1Qm5Mw" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9__1cXsEEeSRoe1Y1Qm5Mw" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_9_-nUXsEEeSRoe1Y1Qm5Mw"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_9_-nUnsEEeSRoe1Y1Qm5Mw" fontName="Cantarell" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_9_-nU3sEEeSRoe1Y1Qm5Mw" points="[360, 240, 360, 240]$[372, 84, 372, 84]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-AAcgHsEEeSRoe1Y1Qm5Mw" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-AAcgXsEEeSRoe1Y1Qm5Mw" id="(0.5,0.5)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_AOS20Xr2EeSk7vyfgIDQIw" name="eClass1" incomingEdges="_9_YxcHsEEeSRoe1Y1Qm5Mw">
+ <target xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass1"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_AOS20nr2EeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd4Hr2EeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd4Xr2EeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd4nr2EeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd43r2EeSk7vyfgIDQIw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_AOTd5Hr2EeSk7vyfgIDQIw" name="eClass2">
+ <target xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass2"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_AOTd5Xr2EeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd5nr2EeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd53r2EeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd6Hr2EeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd6Xr2EeSk7vyfgIDQIw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_AOTd6nr2EeSk7vyfgIDQIw" name="eClass3" outgoingEdges="_9_YxcHsEEeSRoe1Y1Qm5Mw">
+ <target xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass3"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_AOTd63r2EeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd7Hr2EeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd7Xr2EeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd7nr2EeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd73r2EeSk7vyfgIDQIw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_AOTd8Hr2EeSk7vyfgIDQIw" name="eClass4">
+ <target xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass4"/>
+ <semanticElements xmi:type="ecore:EClass" href="edgeReconnection.ecore#//Package4/newPackage1/eClass4"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_AOTd8Xr2EeSk7vyfgIDQIw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd8nr2EeSk7vyfgIDQIw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd83r2EeSk7vyfgIDQIw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd9Hr2EeSk7vyfgIDQIw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_AOTd9Xr2EeSk7vyfgIDQIw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_9_YxcHsEEeSRoe1Y1Qm5Mw" name="ref" sourceNode="_AOTd6nr2EeSk7vyfgIDQIw" targetNode="_AOS20Xr2EeSk7vyfgIDQIw">
+ <target xmi:type="ecore:EReference" href="edgeReconnection.ecore#//Package4/newPackage1/eClass3/ref"/>
+ <semanticElements xmi:type="ecore:EReference" href="edgeReconnection.ecore#//Package4/newPackage1/eClass3/ref"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_9_ZYgHsEEeSRoe1Y1Qm5Mw" size="2">
+ <description xmi:type="style:EdgeStyleDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@edgeMappings[name='ref']/@style"/>
+ <strokeColor xmi:type="viewpoint:RGBValues" xmi:id="_9_ZYgXsEEeSRoe1Y1Qm5Mw" red="136" green="136" blue="136"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_9_ZYgnsEEeSRoe1Y1Qm5Mw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_9_ZYg3sEEeSRoe1Y1Qm5Mw"/>
+ </centerLabelStyle>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@edgeMappings[name='ref']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_AOTd9nr2EeSk7vyfgIDQIw"/>
+ <activatedLayers xmi:type="description_1:Layer" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="edgeReconnection.ecore#//Package4/newPackage1"/>
+ </ownedRepresentations>
<viewpoint xmi:type="description:Viewpoint" href="edgeReconnection.odesign#//@ownedViewpoints[name='edgeReconnection']"/>
</ownedViews>
+ <ownedViews xmi:type="viewpoint:DRepresentationContainer" xmi:id="_PiPTEHrXEeSAhZAoAy_0Hw" initialized="true">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.sirius.sample.ecore.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
+ </ownedViews>
</viewpoint:DAnalysis>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.ecore b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.ecore
index 557e76a37b..e5d775ff9f 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.ecore
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.ecore
@@ -12,4 +12,14 @@
<eSubpackages name="Package">
<eClassifiers xsi:type="ecore:EClass" name="eClass2"/>
</eSubpackages>
+ <eSubpackages name="Package4">
+ <eSubpackages name="newPackage1">
+ <eClassifiers xsi:type="ecore:EClass" name="eClass1"/>
+ <eClassifiers xsi:type="ecore:EClass" name="eClass2"/>
+ <eClassifiers xsi:type="ecore:EClass" name="eClass3">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ref" eType="#//Package4/newPackage1/eClass1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="eClass4"/>
+ </eSubpackages>
+ </eSubpackages>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.odesign b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.odesign
index 0dbbdbf0f1..1c3e8c1138 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.odesign
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/reconnect/bendpointStability/edgeReconnection.odesign
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/description/tool/1.1.0" name="edgeReconnection" version="8.1.0">
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/description/tool/1.1.0" name="edgeReconnection" version="10.0.0.201411061000">
<ownedViewpoints name="edgeReconnection" modelFileExtension="ecore">
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="straightEdgeReconnection" domainClass="EPackage">
<defaultLayer name="Default">
@@ -11,7 +11,7 @@
</centerLabelStyleDescription>
</style>
</edgeMappings>
- <containerMappings name="ePackage" semanticCandidatesExpression="feature:eSubpackages" domainClass="EPackage" dropDescriptions="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@toolSections.0/@ownedTools[name='dragClass']" reusedContainerMappings="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']">
+ <containerMappings name="ePackage" semanticCandidatesExpression="feature:eSubpackages" domainClass="EPackage" dropDescriptions="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@toolSections.0/@ownedTools[name='dragClass']">
<borderedNodeMappings name="eClass" semanticCandidatesExpression="feature:eClassifiers" domainClass="EClass">
<style xsi:type="style:SquareDescription" showIcon="false" resizeKind="NSEW">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
@@ -109,7 +109,7 @@
</style>
</conditionnalStyles>
</edgeMappingImports>
- <containerMappings xsi:type="description_1:ContainerMappingImport" name="ePackageImport" reusedBorderedNodeMappings="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@borderedNodeMappings[name='eClass']" importedMapping="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']"/>
+ <containerMappings xsi:type="description_1:ContainerMappingImport" name="ePackageImport" semanticCandidatesExpression="feature:eSubpackages" reusedBorderedNodeMappings="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@borderedNodeMappings[name='eClass']" importedMapping="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']"/>
</defaultLayer>
</ownedRepresentations>
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="treeEdgeReconnection" domainClass="EPackage">
@@ -124,7 +124,45 @@
</style>
</conditionnalStyles>
</edgeMappingImports>
- <containerMappings xsi:type="description_1:ContainerMappingImport" name="ePackageImport" reusedBorderedNodeMappings="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@borderedNodeMappings[name='eClass']" importedMapping="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']"/>
+ <containerMappings xsi:type="description_1:ContainerMappingImport" name="ePackageImport" semanticCandidatesExpression="feature:eSubpackages" reusedBorderedNodeMappings="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']/@borderedNodeMappings[name='eClass']" importedMapping="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='straightEdgeReconnection']/@defaultLayer/@containerMappings[name='ePackage']"/>
+ </defaultLayer>
+ </ownedRepresentations>
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" name="newEdgeAfterReconnect" domainClass="EPackage">
+ <defaultLayer name="Default">
+ <edgeMappings name="ref" sourceMapping="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']" targetMapping="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@containerMappings[name='eClass']" targetFinderExpression="feature:eType" sourceFinderExpression="feature:eContainer" domainClass="EReference" useDomainElement="true" reconnections="//@ownedViewpoints[name='edgeReconnection']/@ownedRepresentations[name='newEdgeAfterReconnect']/@defaultLayer/@toolSections.0/@ownedTools[name='reconnect']">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelExpression="feature:name">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <containerMappings name="eClass" semanticCandidatesExpression="feature:eClassifiers" domainClass="EClass">
+ <style xsi:type="style:FlatContainerStyleDescription">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <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="tools">
+ <ownedTools xsi:type="tool:ReconnectEdgeDescription" name="reconnect" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:source">
+ <subModelOperations xsi:type="tool_1:Unset" featureName="eStructuralFeatures" elementExpression="var:element"/>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="EReference" referenceName="eStructuralFeatures">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="eType" valueExpression="var:target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ </toolSections>
</defaultLayer>
</ownedRepresentations>
</ownedViewpoints>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ReconnectEdgeBendpointStabilityTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ReconnectEdgeBendpointStabilityTest.java
index 61b66d403d..abb5ed6eef 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ReconnectEdgeBendpointStabilityTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ReconnectEdgeBendpointStabilityTest.java
@@ -19,6 +19,7 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Routing;
@@ -29,7 +30,6 @@ import org.eclipse.sirius.diagram.DiagramPlugin;
import org.eclipse.sirius.diagram.EdgeRouting;
import org.eclipse.sirius.diagram.EdgeStyle;
import org.eclipse.sirius.diagram.tools.api.preferences.SiriusDiagramCorePreferences;
-import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramBorderNodeEditPart;
import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart.ViewEdgeFigure;
import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
@@ -49,18 +49,14 @@ import org.junit.Assert;
*/
public class ReconnectEdgeBendpointStabilityTest extends AbstractSiriusSwtBotGefTestCase {
- private static final String REPRESENTATION_INSTANCE_STRAIGHT_EDGE_NAME = "new straightEdgeReconnection";
-
private static final String REPRESENTATION_STRAIGHT_EDGE_NAME = "straightEdgeReconnection";
- private static final String REPRESENTATION_INSTANCE_MANHATTAN_EDGE_NAME = "new manhattanEdgeReconnection";
-
private static final String REPRESENTATION_MANHATTAN_EDGE_NAME = "manhattanEdgeReconnection";
- private static final String REPRESENTATION_INSTANCE_TREE_EDGE_NAME = "new treeEdgeReconnection";
-
private static final String REPRESENTATION_TREE_EDGE_NAME = "treeEdgeReconnection";
+ private static final String REPRESENTATION_NEW_EDGE_AFTER_RECONNECT = "newEdgeAfterReconnect";
+
private static final String MODEL = "edgeReconnection.ecore";
private static final String SESSION_FILE = "edgeReconnection.aird";
@@ -157,6 +153,21 @@ public class ReconnectEdgeBendpointStabilityTest extends AbstractSiriusSwtBotGef
}
/**
+ * Test that using a reconnect tool that create a different edge doesn't
+ * fail.
+ */
+ public void testNewEdgeAfterReconnectSource() {
+ initializeModelingProjectSample();
+ editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NEW_EDGE_AFTER_RECONNECT, "new " + REPRESENTATION_NEW_EDGE_AFTER_RECONNECT,
+ DDiagram.class);
+ reconnectEdge(true, "eClass3", "eClass1", "eClass2");
+
+ // the new expected edge has for target the old source and for source
+ // the old target.
+ getConnectionEditPart("eClass3", "eClass2");
+ }
+
+ /**
* This test validates that using a specific line style will not cause NPE
* after several reconnections.
*/
@@ -174,7 +185,7 @@ public class ReconnectEdgeBendpointStabilityTest extends AbstractSiriusSwtBotGef
DiagramUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceConstants.PREF_LINE_STYLE, Routing.RECTILINEAR);
// Open a diagram with straight edge
- editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_STRAIGHT_EDGE_NAME, REPRESENTATION_INSTANCE_STRAIGHT_EDGE_NAME, DDiagram.class);
+ editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_STRAIGHT_EDGE_NAME, "new " + REPRESENTATION_STRAIGHT_EDGE_NAME, DDiagram.class);
// 1 - D&d of the target
reconnectEdge(false);
// 2 - D&d of the source
@@ -230,13 +241,7 @@ public class ReconnectEdgeBendpointStabilityTest extends AbstractSiriusSwtBotGef
}
private void reconnectAndValidate(String representationName, boolean reconnectSource) {
- if (REPRESENTATION_STRAIGHT_EDGE_NAME.equals(representationName)) {
- editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_STRAIGHT_EDGE_NAME, REPRESENTATION_INSTANCE_STRAIGHT_EDGE_NAME, DDiagram.class);
- } else if (REPRESENTATION_MANHATTAN_EDGE_NAME.equals(representationName)) {
- editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_MANHATTAN_EDGE_NAME, REPRESENTATION_INSTANCE_MANHATTAN_EDGE_NAME, DDiagram.class);
- } else {
- editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_TREE_EDGE_NAME, REPRESENTATION_INSTANCE_TREE_EDGE_NAME, DDiagram.class);
- }
+ editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), representationName, "new " + representationName, DDiagram.class);
PointList pointList = reconnectEdge(reconnectSource);
@@ -255,8 +260,8 @@ public class ReconnectEdgeBendpointStabilityTest extends AbstractSiriusSwtBotGef
private PointList reconnectEdge(boolean reconnectSource, String source, String target, String reconnectionTarget) {
// Retrieve location for container list named EClass 3
- Point location = editor.getLocation(reconnectionTarget, AbstractDiagramBorderNodeEditPart.class);
- Dimension dimension = editor.getDimension(reconnectionTarget, AbstractDiagramBorderNodeEditPart.class);
+ Point location = editor.getLocation(reconnectionTarget, ShapeNodeEditPart.class);
+ Dimension dimension = editor.getDimension(reconnectionTarget, ShapeNodeEditPart.class);
// Retrieve edge "ref" target point location
PointList pointList = getEdgePointList(source, target);
@@ -362,8 +367,8 @@ public class ReconnectEdgeBendpointStabilityTest extends AbstractSiriusSwtBotGef
}
private ConnectionEditPart getConnectionEditPart(String sourceEditPartName, String targetEditPartName) {
- List<SWTBotGefConnectionEditPart> connectionEditPartList = editor.getConnectionEditPart(editor.getEditPart(sourceEditPartName, AbstractDiagramBorderNodeEditPart.class),
- editor.getEditPart(targetEditPartName, AbstractDiagramBorderNodeEditPart.class));
+ List<SWTBotGefConnectionEditPart> connectionEditPartList = editor.getConnectionEditPart(editor.getEditPart(sourceEditPartName, ShapeNodeEditPart.class),
+ editor.getEditPart(targetEditPartName, ShapeNodeEditPart.class));
assertNotNull("There is no connection between " + sourceEditPartName + " and " + targetEditPartName, connectionEditPartList);
assertEquals("There are more or less than 1 connection between " + sourceEditPartName + " and " + targetEditPartName, 1, connectionEditPartList.size());
return connectionEditPartList.get(0).part();

Back to the top