Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpguilet2018-02-02 15:04:50 +0000
committerpguilet2018-02-05 09:05:54 +0000
commit663ec121bfe946d312d410296395e674491caddf (patch)
tree963fb5921310f11cbd4de49d3248d2d0f1f695c1
parentd28e457d0077ffe7f7b5c83c8ddc0555f588975b (diff)
downloadorg.eclipse.sirius-663ec121bfe946d312d410296395e674491caddf.tar.gz
org.eclipse.sirius-663ec121bfe946d312d410296395e674491caddf.tar.xz
org.eclipse.sirius-663ec121bfe946d312d410296395e674491caddf.zip
[530306] Fix typo in documentation and code.
BUg: 530306 Change-Id: I45d66df4a8f2ad8ae0249a77430035c10b1597d1 Signed-off-by: pguilet <pierre.guilet@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/refresh/FixBendpointsOnCreationCommand.java24
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/plugin.properties2
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/api/view/SiriusLayoutDataManager.java96
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV650.java58
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV690.java48
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/view/SiriusLayoutDataManagerImpl.java12
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SetConnectionBendpointsAccordingToExtremityMoveCommmand.java96
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/refresh/diagram/ConnectionsFactory.java73
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/util/GMFNotationUtilities.java96
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/user/diagrams/images/edgeLabelAttachment_preference.pngbin114944 -> 33418 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.html191
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.textile2
-rw-r--r--plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/properties/filters/style/edgestyledescription/EdgeStyleEndsCenteringHelper.java13
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/DocbookTestCase.java2
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/edge/AttachmentBetweenEdgeAndItsLabelsTest.java4
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/MigrationRoutingStyleEndUserOverrideTest.java2
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/operations/OperationTest.java2
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BendpointsStabilityOnMovesTest.java14
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ShapeResizingEdgePositionStabilityTests.java19
19 files changed, 429 insertions, 325 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/refresh/FixBendpointsOnCreationCommand.java b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/refresh/FixBendpointsOnCreationCommand.java
index 70b2db1a11..a513aa2c79 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/refresh/FixBendpointsOnCreationCommand.java
+++ b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/refresh/FixBendpointsOnCreationCommand.java
@@ -110,32 +110,32 @@ public class FixBendpointsOnCreationCommand extends RecordingCommand {
Point sourceRefPoint = new Point(0, 0);
Point targetRefPoint = new Point(0, 0);
- EdgeLayoutData egdeLayoutData = null;
+ EdgeLayoutData edgeLayoutData = null;
SiriusLayoutDataManager.INSTANCE.setIgnoreConsumeState(true);
try {
- egdeLayoutData = SiriusLayoutDataManager.INSTANCE.getData(dEdge, false);
+ edgeLayoutData = SiriusLayoutDataManager.INSTANCE.getData(dEdge, false);
} finally {
SiriusLayoutDataManager.INSTANCE.setIgnoreConsumeState(false);
}
- if (egdeLayoutData != null) {
+ if (edgeLayoutData != null) {
- sourceTerminal = egdeLayoutData.getSourceTerminal();
- targetTerminal = egdeLayoutData.getTargetTerminal();
+ sourceTerminal = edgeLayoutData.getSourceTerminal();
+ targetTerminal = edgeLayoutData.getTargetTerminal();
// pointList, sourceRefPoint, targetRefPoint of
// the edgeLayoutData can be null if the edge is
// hide when the layout data is stored
- if (egdeLayoutData.getPointList() != null) {
- pointList = egdeLayoutData.getPointList();
+ if (edgeLayoutData.getPointList() != null) {
+ pointList = edgeLayoutData.getPointList();
}
- if (egdeLayoutData.getSourceRefPoint() != null) {
- sourceRefPoint = egdeLayoutData.getSourceRefPoint();
+ if (edgeLayoutData.getSourceRefPoint() != null) {
+ sourceRefPoint = edgeLayoutData.getSourceRefPoint();
}
- if (egdeLayoutData.getTargetRefPoint() != null) {
- targetRefPoint = egdeLayoutData.getTargetRefPoint();
+ if (edgeLayoutData.getTargetRefPoint() != null) {
+ targetRefPoint = edgeLayoutData.getTargetRefPoint();
}
- routing = egdeLayoutData.getRouting();
+ routing = edgeLayoutData.getRouting();
} else {
computeEdgeDataWithoutEdgeLayoutData();
diff --git a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
index e0a1ebc0b0..daf0b8aaee 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
+++ b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
@@ -855,7 +855,7 @@ DiagramAppearancePreferencePage_hideConnectorLabelIconsLabel = Hide label icons
DiagramAppearancePreferencePage_hideShapeLabelIconsLabel = Hide label icons on shapes
DiagramAppearancePreferencePage_labelIconsGroupText = Label icons (does not affect existing elements of opened diagrams)
DiagramConnectionsPreferencePage_enableOverrideLabel = Enable user specifc default values. These setting apply to all diagrams (does not affect existing elements).
-DiagramConnectionsPreferencePage_showEdgeLabelLinkOnSelect = Show link between egde and its labels on selection
+DiagramConnectionsPreferencePage_showEdgeLabelLinkOnSelect = Show link between edge and its labels on selection
DiagramDialectEditorDialogFactory_forbiddenOperation = Forbidden operation
DiagramDialectUIServices_diagramDescription = \n . {0}: diagram.DDiagram | the diagram of the current potential edge.
DiagramDialectUIServices_diagramEditPartDeactivationError = Error while deactivating the representation, the remote server may be unreachable.
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/api/view/SiriusLayoutDataManager.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/api/view/SiriusLayoutDataManager.java
index 85949c0e25..438811d07b 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/api/view/SiriusLayoutDataManager.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/api/view/SiriusLayoutDataManager.java
@@ -35,8 +35,8 @@ import org.eclipse.sirius.diagram.ui.business.internal.view.SiriusLayoutDataMana
import org.eclipse.sirius.ext.base.Option;
/**
- * Manage the AbstractLayoutData during node creation or drag'n'drop. LayoutData
- * are removed after a OperationHistoryEvent#DONE.
+ * Manage the AbstractLayoutData during node creation or drag'n'drop. LayoutData are removed after a
+ * OperationHistoryEvent#DONE.
*
* @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a>
* @since 0.9.0
@@ -61,8 +61,7 @@ public interface SiriusLayoutDataManager {
void addData(AbstractLayoutData layoutData);
/**
- * Search recursively in all the LayoutData is there is one which have the
- * element for target.
+ * Search recursively in all the LayoutData is there is one which have the element for target.
*
* @param node
* The search element
@@ -71,54 +70,48 @@ public interface SiriusLayoutDataManager {
LayoutData getData(AbstractDNode node);
/**
- * Search recursively in all the LayoutData is there is one which have the
- * node for target.
+ * Search recursively in all the LayoutData is there is one which have the node for target.
*
* @param node
* The search element
* @param searchForParent
- * true if the data must be retrieve from the node parent (the
- * data must be retrieve from parent for a creation of an
- * object).
+ * true if the data must be retrieve from the node parent (the data must be retrieve from parent for a
+ * creation of an object).
* @return the corresponding LayoutData or null if not found.
*/
LayoutData getData(AbstractDNode node, boolean searchForParent);
/**
- * Search recursively in all the LayoutData is there is one which have the
- * edge for target.
+ * Search recursively in all the LayoutData is there is one which have the edge for target.
*
* @param edge
* The search element
* @param searchParent
- * true if the data must be retrieve from the node parent (the
- * data must be retrieve from parent for a creation of an object)
+ * true if the data must be retrieve from the node parent (the data must be retrieve from parent for a
+ * creation of an object)
* @return the corresponding EdgeLayoutData or null if not found.
*/
EdgeLayoutData getData(DEdge edge, boolean searchParent);
/**
- * Search recursively in all the LayoutData if there is one which have the
- * edge of <code>egdeLayoutData</code> for target and is different from
- * <code>egdeLayoutData</code>. An edge layout data stored in the
- * incomingEdgeLayoutDatas ref of its parent data can have an opposite edge
- * layout data in the outgoingEdgeLayoutDatas of the other ends of the edge.
+ * Search recursively in all the LayoutData if there is one which have the edge of <code>edgeLayoutData</code> for
+ * target and is different from <code>edgeLayoutData</code>. An edge layout data stored in the
+ * incomingEdgeLayoutDatas ref of its parent data can have an opposite edge layout data in the
+ * outgoingEdgeLayoutDatas of the other ends of the edge.
*
- * Detail: In case of a move of the source and the target of an edge, the
- * edge has two layout data, one for the source move and another one for the
- * target move. The one for the source move has the points impacted by the
- * source move (the first point and in case of rectilinear routing the
- * second) and the other for the target move (last point and in case of
- * rectilinear routing the second to last).
+ * Detail: In case of a move of the source and the target of an edge, the edge has two layout data, one for the
+ * source move and another one for the target move. The one for the source move has the points impacted by the
+ * source move (the first point and in case of rectilinear routing the second) and the other for the target move
+ * (last point and in case of rectilinear routing the second to last).
*
- * @param egdeLayoutData
+ * @param edgeLayoutData
* The searched element
* @param searchParent
- * true if the data must be retrieve from the node parent (the
- * data must be retrieve from parent for a creation of an object)
+ * true if the data must be retrieve from the node parent (the data must be retrieve from parent for a
+ * creation of an object)
* @return the corresponding EdgeLayoutData or null if not found.
*/
- EdgeLayoutData getOppositeEdgeLayoutData(EdgeLayoutData egdeLayoutData, boolean searchParent);
+ EdgeLayoutData getOppositeEdgeLayoutData(EdgeLayoutData edgeLayoutData, boolean searchParent);
/**
* Get the Adapter marker to mark GMF View as not to arrange.
@@ -128,17 +121,14 @@ public interface SiriusLayoutDataManager {
Adapter getAdapterMarker();
/**
- * Get the center Adapter marker to mark GMF View as to arrange in the
- * center of container.
+ * Get the center Adapter marker to mark GMF View as to arrange in the center of container.
*
- * @return the center Adapter marker to mark GMF View as to arrange in the
- * center of container
+ * @return the center Adapter marker to mark GMF View as to arrange in the center of container
*/
Adapter getCenterAdapterMarker();
/**
- * Search recursively in all the LayoutData is there is one which have the
- * edge for target.
+ * Search recursively in all the LayoutData is there is one which have the edge for target.
*
* @param edge
* The search element
@@ -147,10 +137,8 @@ public interface SiriusLayoutDataManager {
EdgeLabelLayoutData getLabelData(DEdge edge);
/**
- * Initializes a new transactional command with the editing domain in which
- * the marker adapter is added to the GMF view. This marker is added to
- * avoid the arrange of the new view that are already layout by the
- * SiriusLayoutData.
+ * Initializes a new transactional command with the editing domain in which the marker adapter is added to the GMF
+ * view. This marker is added to avoid the arrange of the new view that are already layout by the SiriusLayoutData.
*
* @param domain
* my editing domain
@@ -161,9 +149,8 @@ public interface SiriusLayoutDataManager {
AbstractTransactionalCommand getAddAdapterMakerCommand(TransactionalEditingDomain domain, IAdaptable viewAdapter);
/**
- * Initializes a new transactional command with the editing domain in which
- * the marker adapter is added to the GMF view. This marker is added to
- * launch the arrange of the new view using center of the container.
+ * Initializes a new transactional command with the editing domain in which the marker adapter is added to the GMF
+ * view. This marker is added to launch the arrange of the new view using center of the container.
*
* @param domain
* my editing domain
@@ -174,9 +161,8 @@ public interface SiriusLayoutDataManager {
AbstractTransactionalCommand getAddCenterAdapterMakerCommand(TransactionalEditingDomain domain, IAdaptable viewAdapter);
/**
- * Initializes a new transactional command with the editing domain in which
- * the marker adapter is added to the GMF view. This marker is added to
- * launch the arrange of the new view when editor is opening.
+ * Initializes a new transactional command with the editing domain in which the marker adapter is added to the GMF
+ * view. This marker is added to launch the arrange of the new view when editor is opening.
*
* @param domain
* my editing domain
@@ -209,13 +195,11 @@ public interface SiriusLayoutDataManager {
Command getArrangeCreatedViewsOnOpeningCommand(IGraphicalEditPart host);
/**
- * Return if the view contains a layout adapter, if it contains, layout is
- * launch on the view.
+ * Return if the view contains a layout adapter, if it contains, layout is launch on the view.
*
* @param view
* the view
- * @return if the view contains a layout adapter, if it contains, layout is
- * launch on the view
+ * @return if the view contains a layout adapter, if it contains, layout is launch on the view
*/
boolean hasToArrange(View view);
@@ -241,20 +225,17 @@ public interface SiriusLayoutDataManager {
void addCreatedViewsToLayout(Diagram gmfDiagram, LinkedHashSet<View> createdViewsToLayout);
/**
- * Get the set of created views to layout per Diagram to be layouted. After
- * use of this map the client must clear it to avoid other subsequent
- * arrange command to be executed on the same already created views.
+ * Get the set of created views to layout per Diagram to be layouted. After use of this map the client must clear it
+ * to avoid other subsequent arrange command to be executed on the same already created views.
*
* @return the set of created views to layout per Diagram to be layouted
*/
Map<Diagram, Set<View>> getCreatedViewsToLayout();
/**
- * Change the mode of the consumption. The data can be consume even if there
- * is already consume. This can be useful, for example, in case of several
- * preCommitListener that want to access the data.<BR>
- * This change must be temporary and must be restored to default value
- * (false).
+ * Change the mode of the consumption. The data can be consume even if there is already consume. This can be useful,
+ * for example, in case of several preCommitListener that want to access the data.<BR>
+ * This change must be temporary and must be restored to default value (false).
*
* @param ignoreConsumeState
* true to access to data already consumed.
@@ -279,8 +260,7 @@ public interface SiriusLayoutDataManager {
* Add a view in the list.
*
* @param gmfDiagram
- * the {@link Diagram} for which childs views must be layouted in
- * the center of the container
+ * the {@link Diagram} for which childs views must be layouted in the center of the container
* @param view
* the view to set
*/
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV650.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV650.java
index 41f765dc5d..964ffaeb92 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV650.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV650.java
@@ -63,10 +63,8 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
* Predicate that checks that :
* <UL>
* <LI>The input is a GMF Node,</LI>
- * <LI>This Node has a DNode style description that forbidden to resize
- * DNode,</LI>
- * <LI>and the size of DNode is not the same of the size of the GMF Node.
- * </LI>
+ * <LI>This Node has a DNode style description that forbidden to resize DNode,</LI>
+ * <LI>and the size of DNode is not the same of the size of the GMF Node.</LI>
* </UL>
*/
private Predicate<EObject> nonResizableNodeWithDifferentSizePredicate = new Predicate<EObject>() {
@@ -120,13 +118,11 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
}
/**
- * Return a list of GMF Diagram that are on the root of the resource of the
- * DAnalysis.
+ * Return a list of GMF Diagram that are on the root of the resource of the DAnalysis.
*
* @param dAnalysis
* Current analysis
- * @return list of GMF Diagram that are on the root of the resource of the
- * DAnalysis.
+ * @return list of GMF Diagram that are on the root of the resource of the DAnalysis.
*
*/
public static List<Diagram> getDiagramsAtRoot(DAnalysis dAnalysis) {
@@ -140,15 +136,14 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
}
/**
- * Move GMF diagrams from root of the resource to eAnnotation in
- * corresponding DDiagram, and then launch old migrations that haven't been
- * launched on this diagrams.
+ * Move GMF diagrams from root of the resource to eAnnotation in corresponding DDiagram, and then launch old
+ * migrations that haven't been launched on this diagrams.
*
* @param dAnalysis
* The analysis to migrate.
* @param diagrams
- * list of GMF Diagram to move from the root of the resource to
- * the concerned {@link org.eclipse.sirius.diagram.DDiagram}.
+ * list of GMF Diagram to move from the root of the resource to the concerned
+ * {@link org.eclipse.sirius.diagram.DDiagram}.
*/
public void moveGMFDiagramsFromRoot(DAnalysis dAnalysis, List<Diagram> diagrams) {
for (Diagram diagram : diagrams) {
@@ -176,10 +171,9 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
}
/**
- * In case of resizeKind == NONE and that DNode.width/height is different
- * this of the GMF Node, before the fix changing the resizeKind to something
- * different of NONE has the effect to resize the bounds of concerned
- * figures to the DNode.width/height and not the GMF Node bounds.
+ * In case of resizeKind == NONE and that DNode.width/height is different this of the GMF Node, before the fix
+ * changing the resizeKind to something different of NONE has the effect to resize the bounds of concerned figures
+ * to the DNode.width/height and not the GMF Node bounds.
*
* @param view
* The view to migrate.
@@ -200,14 +194,11 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
}
/**
- * The existing diagram may have incorrect coordinates on their anchors,
- * resulting in an inconsistent display now. The objective of this automatic
- * migration is to ensure that egdes of the same tree goes through the same
- * branches (ie they have the same anchor on source side or target side
- * depending on the direction of the tree). If this is not the case the
- * command modifies the GMF anchors to {0.5, 0.5}, if all anchors are
- * different or to the unique id if there is only one defined anchor in the
- * tree (other anchors are null).
+ * The existing diagram may have incorrect coordinates on their anchors, resulting in an inconsistent display now.
+ * The objective of this automatic migration is to ensure that edges of the same tree goes through the same branches
+ * (ie they have the same anchor on source side or target side depending on the direction of the tree). If this is
+ * not the case the command modifies the GMF anchors to {0.5, 0.5}, if all anchors are different or to the unique id
+ * if there is only one defined anchor in the tree (other anchors are null).
*
* @param view
* The view to migrate.
@@ -242,14 +233,13 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
}
/**
- * Add the set anchor command to <code>ccmd</code> if needed (ie if the
- * anchor is different for edges with same source or same target).
+ * Add the set anchor command to <code>ccmd</code> if needed (ie if the anchor is different for edges with same
+ * source or same target).
*
* @param edgesSortPerCommonAnchor
* The map that group the edges per comon anchor
* @param sourceAnchor
- * true if the groups corresponds to source side, false if the
- * groups corresponds to target side
+ * true if the groups corresponds to source side, false if the groups corresponds to target side
*/
protected void setSameAnchor(Map<View, List<Edge>> edgesSortPerCommonAnchor, boolean sourceAnchor) {
for (Entry<View, List<Edge>> entry : edgesSortPerCommonAnchor.entrySet()) {
@@ -278,8 +268,7 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
* @param edges
* a list of edges with common anchor.
* @param sourceAnchor
- * true if the common anchor is the source one, false, if it is
- * the target one.
+ * true if the common anchor is the source one, false, if it is the target one.
* @return an optional String, null is there is no replacement id.
*/
private Option<String> getReplacementId(List<Edge> edges, boolean sourceAnchor) {
@@ -330,14 +319,13 @@ public class DiagramRepresentationsFileMigrationParticipantV650 {
}
/**
- * Get the source anchor or the target anchor of the <code>edge</code>
- * according to boolean <code>sourceAnchor</code>.
+ * Get the source anchor or the target anchor of the <code>edge</code> according to boolean
+ * <code>sourceAnchor</code>.
*
* @param edge
* The corresponding edge
* @param sourceAnchor
- * true if we want to get the source anchor, false if we want the
- * target anchor
+ * true if we want to get the source anchor, false if we want the target anchor
* @return the corresponding anchor
*/
protected Anchor getAnchor(Edge edge, boolean sourceAnchor) {
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV690.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV690.java
index 5b41d13d05..527edf5913 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV690.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/migration/DiagramRepresentationsFileMigrationParticipantV690.java
@@ -55,8 +55,7 @@ public class DiagramRepresentationsFileMigrationParticipantV690 {
* the package of the type.
* @param name
* the name of the type.
- * @return an AdditionalLayer or null if the given type is not an
- * OptionalLayer.
+ * @return an AdditionalLayer or null if the given type is not an OptionalLayer.
*/
public EClassifier getType(EPackage ePackage, String name) {
Set<String> descriptionsNsUri = Sets.newHashSet(DescriptionPackage.eINSTANCE.getNsURI(), org.eclipse.sirius.viewpoint.description.DescriptionPackage.eINSTANCE.getNsURI());
@@ -67,32 +66,26 @@ public class DiagramRepresentationsFileMigrationParticipantV690 {
}
/**
- * Migrate the edge routing style according to new connection preference
- * page behavior. Before VP 6.9.0, the connection preference page is the GMF
- * default one. But it was unsuitable for Viewpoint use. Indeed, in
- * Viewpoint the default routing style is defined in VSM. Some users have
- * used this preference page to override the style defined in the VSM, but
- * it is not really correctly done:
+ * Migrate the edge routing style according to new connection preference page behavior. Before VP 6.9.0, the
+ * connection preference page is the GMF default one. But it was unsuitable for Viewpoint use. Indeed, in Viewpoint
+ * the default routing style is defined in VSM. Some users have used this preference page to override the style
+ * defined in the VSM, but it is not really correctly done:
* <UL>
- * <LI>The end-user can not retrieve the style defined in the VSM (no undo
- * mechanism similar to the Reset style properties to default values button)
- * </LI>
- * <LI>The current preference page does not allow to choose the "Tree"
- * routing style.</LI>
- * <LI>It works only if the Rectilinear is set. The Oblique is the default
- * value and has no effect.</LI>
+ * <LI>The end-user can not retrieve the style defined in the VSM (no undo mechanism similar to the Reset style
+ * properties to default values button)</LI>
+ * <LI>The current preference page does not allow to choose the "Tree" routing style.</LI>
+ * <LI>It works only if the Rectilinear is set. The Oblique is the default value and has no effect.</LI>
* <LI>Inconsistent state between GMF data and Viewpoint data</LI>
* </UL>
- * This migration converts edge styles that have been "customized" by the
- * previous preference page. It concerns only edges with
+ * This migration converts edge styles that have been "customized" by the previous preference page. It concerns only
+ * edges with
* <UL>
* <LI>a GMF routing style set to Rectilinear,</LI>
* <LI>without routingStyle in customFeatures list,</LI>
* <LI>and with a DEdge style set to Oblique.</LI>
* </UL>
- * For this edges, the routingStyle will be added in the customFeatures list
- * of the style of these edges and the DEdge style will be set to
- * Rectilinear.<BR>
+ * For this edges, the routingStyle will be added in the customFeatures list of the style of these edges and the
+ * DEdge style will be set to Rectilinear.<BR>
*
* @param diagrams
* list of GMF Diagram to migrate.
@@ -112,11 +105,9 @@ public class DiagramRepresentationsFileMigrationParticipantV690 {
}
/**
- * We detected some cases where a DDiagramElement visibility can be true but
- * not its corresponding GMF Node. That was causing wrong conflicts
- * detection by the CanonicalDBorderItemLocator. This migration sets the
- * same GMF Node visibility than the DDiagramElement (if there is a
- * difference only).
+ * We detected some cases where a DDiagramElement visibility can be true but not its corresponding GMF Node. That
+ * was causing wrong conflicts detection by the CanonicalDBorderItemLocator. This migration sets the same GMF Node
+ * visibility than the DDiagramElement (if there is a difference only).
*
* @param diagrams
* list of GMF Diagram to migrate.
@@ -140,12 +131,11 @@ public class DiagramRepresentationsFileMigrationParticipantV690 {
}
/**
- * Check if this edge is concerned by the migration. Edge is concerned by
- * this migration if:
+ * Check if this edge is concerned by the migration. Edge is concerned by this migration if:
* <UL>
* <LI>it has a GMF routing style set to Rectilinear,</LI>
- * <LI>the corresponding DEgde has not routingStyle in customFeatures list,</LI>
- * <LI>and the corresponding DEgde style is set to Oblique.</LI>
+ * <LI>the corresponding DEdge has not routingStyle in customFeatures list,</LI>
+ * <LI>and the corresponding DEdge style is set to Oblique.</LI>
* </UL>
*
* @param edge
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/view/SiriusLayoutDataManagerImpl.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/view/SiriusLayoutDataManagerImpl.java
index edd7841039..db696feaf6 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/view/SiriusLayoutDataManagerImpl.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/view/SiriusLayoutDataManagerImpl.java
@@ -340,15 +340,15 @@ public final class SiriusLayoutDataManagerImpl implements SiriusLayoutDataManage
}
@Override
- public EdgeLayoutData getOppositeEdgeLayoutData(EdgeLayoutData egdeLayoutData, boolean searchParent) {
- DEdge edge = egdeLayoutData.getTarget();
+ public EdgeLayoutData getOppositeEdgeLayoutData(EdgeLayoutData edgeLayoutData, boolean searchParent) {
+ DEdge edge = edgeLayoutData.getTarget();
if (edge == null) {
return null;
}
- return getData(edge, searchParent, Options.newSome(egdeLayoutData));
+ return getData(edge, searchParent, Options.newSome(edgeLayoutData));
}
- private EdgeLayoutData getData(DEdge edge, boolean searchParent, Option<EdgeLayoutData> optionalOppositeEgdeLayoutData) {
+ private EdgeLayoutData getData(DEdge edge, boolean searchParent, Option<EdgeLayoutData> optionalOppositeEdgeLayoutData) {
EdgeLayoutData result = null;
if (result == null) {
// Search the edge in all rootsLayoutData
@@ -356,10 +356,10 @@ public final class SiriusLayoutDataManagerImpl implements SiriusLayoutDataManage
if (abstractLayoutData instanceof LayoutData) {
LayoutData layoutData = (LayoutData) abstractLayoutData;
result = layoutData.getData(edge, ignoreConsumeState);
- if (result != null && (!optionalOppositeEgdeLayoutData.some() || !(optionalOppositeEgdeLayoutData.get().equals(result)))) {
+ if (result != null && (!optionalOppositeEdgeLayoutData.some() || !(optionalOppositeEdgeLayoutData.get().equals(result)))) {
break;
}
- } else if (abstractLayoutData instanceof EdgeLayoutData && (!optionalOppositeEgdeLayoutData.some() || !(optionalOppositeEgdeLayoutData.get().equals(abstractLayoutData)))) {
+ } else if (abstractLayoutData instanceof EdgeLayoutData && (!optionalOppositeEdgeLayoutData.some() || !(optionalOppositeEdgeLayoutData.get().equals(abstractLayoutData)))) {
EdgeLayoutData edgeLayoutData = (EdgeLayoutData) abstractLayoutData;
EdgeTarget edgeSource = edge.getSourceNode();
EdgeTarget edgeTarget = edge.getTargetNode();
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SetConnectionBendpointsAccordingToExtremityMoveCommmand.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SetConnectionBendpointsAccordingToExtremityMoveCommmand.java
index 5282fa47ea..b6f2803b36 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SetConnectionBendpointsAccordingToExtremityMoveCommmand.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SetConnectionBendpointsAccordingToExtremityMoveCommmand.java
@@ -29,9 +29,8 @@ import org.eclipse.sirius.ext.base.Option;
import org.eclipse.sirius.ext.gmf.runtime.editparts.GraphicalHelper;
/**
- * Set connection bendpoints according to extremity move (source or target) to
- * keep, as much as possible, the edges aspects when a node (container or not)
- * is moved. A move of a node should move only the closest segment of the linked
+ * Set connection bendpoints according to extremity move (source or target) to keep, as much as possible, the edges
+ * aspects when a node (container or not) is moved. A move of a node should move only the closest segment of the linked
* edges.
*
* @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a>
@@ -76,22 +75,19 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/**
- * Adapt the point list and the source reference point (or target reference
- * point) according to a move of the source (or of the target).
+ * Adapt the point list and the source reference point (or target reference point) according to a move of the source
+ * (or of the target).
*
* @param sourceMove
- * true if the source node of edge has been moved, false
- * otherwise
+ * true if the source node of edge has been moved, false otherwise
* @param moveDelta
* the delta of the move of the extremity (source or target)
* @param connectionEditPart
* The connection editPart corresponding to the edge to adapt
* @param sourceRefPoint
- * The source reference point to adapt (only adapted for
- * sourceMove true)
+ * The source reference point to adapt (only adapted for sourceMove true)
* @param targetRefPoint
- * The target reference point to adapt (only adapted for
- * sourceMove false)
+ * The target reference point to adapt (only adapted for sourceMove false)
* @param connectionPointList
* The point list to adapt
*/
@@ -100,7 +96,7 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
ConnectionEditPartQuery connectionEditPartQuery = new ConnectionEditPartQuery(connectionEditPart);
// Check overlap case
if (connectionEditPart.getModel() instanceof Edge && ((Edge) connectionEditPart.getModel()).getBendpoints() instanceof RelativeBendpoints) {
- // If visually the egde contains more points (connectionPointList) than the model (GMF Edge points) and the
+ // If visually the edge contains more points (connectionPointList) than the model (GMF Edge points) and the
// model contains only 2 points, we are probably in the case where the source and the target intersect and
// the router
// (org.eclipse.gmf.runtime.draw2d.ui.internal.routers.ObliqueRouter.checkShapesIntersect(Connection,
@@ -127,14 +123,12 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/**
- * Adapt the point list and the source reference point according to a move
- * of the source.
+ * Adapt the point list and the source reference point according to a move of the source.
*
* @param moveDelta
* the delta of the move of the extremity (source or target)
* @param isEdgeWithRectilinearRoutingStyle
- * True if the edge is rectilinear (one more point is adapted in
- * this case), false otherwise
+ * True if the edge is rectilinear (one more point is adapted in this case), false otherwise
* @param sourceBounds
* The bounds of the source node
* @param targetBounds
@@ -192,14 +186,12 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/**
- * Adapt the point list and the target reference point according to a move
- * of the target.
+ * Adapt the point list and the target reference point according to a move of the target.
*
* @param moveDelta
* the delta of the move of the extremity (source or target)
* @param isEdgeWithRectilinearRoutingStyle
- * True if the edge is rectilinear (one more point is adapted in
- * this case), false otherwise
+ * True if the edge is rectilinear (one more point is adapted in this case), false otherwise
* @param sourceBounds
* The bounds of the source node
* @param targetBounds
@@ -259,12 +251,11 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/**
- * Check if the segment will be merged with next or previous segment with
- * draw2d rectilinear router. In this case, we remove the useless points.
- * <BR>
+ * Check if the segment will be merged with next or previous segment with draw2d rectilinear router. In this case,
+ * we remove the useless points. <BR>
* Logic extracted from
- * {@link org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter.routeLine(Connection,
- * int, PointList)}.
+ * {@link org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter.routeLine(Connection, int,
+ * PointList)}.
*
* @param connectionPointList
* <code>PointList</code> to normalize
@@ -272,19 +263,16 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
private static void normalizeAndStraight(PointList connectionPointList) {
if (PointListUtilities.normalizeSegments(connectionPointList, 3)) {
/*
- * Normalization can make our polyline not rectilinear. Hence, we
- * need to normalize segments of polyline to straight line
- * tolerance.
+ * Normalization can make our polyline not rectilinear. Hence, we need to normalize segments of polyline to
+ * straight line tolerance.
*/
normalizeToStraightLineTolerance(connectionPointList, 3);
}
}
/**
- * Goes through line segments of a polyline and makes strict straight
- * segments from nearly straight segments.<BR>
- * Copied from
- * {@link org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter}
+ * Goes through line segments of a polyline and makes strict straight segments from nearly straight segments.<BR>
+ * Copied from {@link org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter}
*
* @param line
* polyline
@@ -304,10 +292,9 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/**
- * Removes consecutive points contained within the source shape and removes
- * consecutive points contained within the target shape. If all points have
- * been removed an extra point outside source and target shapes will be
- * added. Inspired from
+ * Removes consecutive points contained within the source shape and removes consecutive points contained within the
+ * target shape. If all points have been removed an extra point outside source and target shapes will be added.
+ * Inspired from
* {@link org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter#removePointsInViews(Connection, PointList, Point, Point)}
*
* @param newLine
@@ -326,10 +313,9 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
Point lastRemovedFromTarget = null;
/*
- * Starting from the first point of polyline remove points that are
- * contained within the source shape until the first point outside is
- * found. Remember the point that was removed from the source shape last
- * for a possible case of all points removed from polyline.
+ * Starting from the first point of polyline remove points that are contained within the source shape until the
+ * first point outside is found. Remember the point that was removed from the source shape last for a possible
+ * case of all points removed from polyline.
*/
PointList sourcePointList = PointListUtilities.createPointsFromRect(source);
if (newLine.size() != 0) {
@@ -347,10 +333,9 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/*
- * Starting from the end point of polyline remove points that are
- * contained within the target shape until the first point outside is
- * found. Remember the point that was removed from the target shape last
- * for a possible case of all points removed from polyline.
+ * Starting from the end point of polyline remove points that are contained within the target shape until the
+ * first point outside is found. Remember the point that was removed from the target shape last for a possible
+ * case of all points removed from polyline.
*/
PointList targetPointList = PointListUtilities.createPointsFromRect(target);
if (newLine.size() != 0) {
@@ -380,13 +365,10 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
lastRemovedFromTarget = end;
}
/*
- * If last point removed from source and the points removed from
- * target form a vertical or horizontal line we'll find a point
- * located on this line and is outside of source and target shape
- * and insert it in the polyline. The check for vertical and
- * horizontal segment is using tolerance value, because bend point
- * location extracted from RelativeBendpoint can have precision
- * errors due to non-integer weight factors.
+ * If last point removed from source and the points removed from target form a vertical or horizontal line
+ * we'll find a point located on this line and is outside of source and target shape and insert it in the
+ * polyline. The check for vertical and horizontal segment is using tolerance value, because bend point
+ * location extracted from RelativeBendpoint can have precision errors due to non-integer weight factors.
*/
if (Math.abs(lastRemovedFromSource.x - lastRemovedFromTarget.x) < toleranceValue) {
// Vertical
@@ -422,8 +404,8 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
}
/**
- * Get a complementary point to go from the <code>otherPointExtremity</code>
- * to the <code>nodeBouds</code> through <code>lastRemoved</code> point.
+ * Get a complementary point to go from the <code>otherPointExtremity</code> to the <code>nodeBouds</code> through
+ * <code>lastRemoved</code> point.
*
* @param pointsList
* Current points of the edge
@@ -432,13 +414,11 @@ public class SetConnectionBendpointsAccordingToExtremityMoveCommmand extends Set
* @param lastRemoved
* Last removed point from the points list of the edge
* @param otherPointExtremity
- * First/Last point from the points list of the edge (on the same
- * side as <code>lastRemoved</code>)
+ * First/Last point from the points list of the edge (on the same side as <code>lastRemoved</code>)
* @param toleranceValue
* A tolerance.
- * @return An optional point corresponding to the intersection between a
- * line from <code>otherPointExtremity</code> to
- * <code>lastRemoved</code> and <code>nodeBouds</code>.
+ * @return An optional point corresponding to the intersection between a line from <code>otherPointExtremity</code>
+ * to <code>lastRemoved</code> and <code>nodeBouds</code>.
*/
private static Option<Point> getComplementaryPoint(PointList pointsList, PrecisionRectangle nodeBouds, Point lastRemoved, Point otherPointExtremity, int toleranceValue) {
Option<Point> optionalIntersection;
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/refresh/diagram/ConnectionsFactory.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/refresh/diagram/ConnectionsFactory.java
index e63fe222f5..2940ca07e0 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/refresh/diagram/ConnectionsFactory.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/refresh/diagram/ConnectionsFactory.java
@@ -59,8 +59,7 @@ import org.eclipse.sirius.ext.base.Option;
import org.eclipse.sirius.ext.gmf.runtime.editparts.GraphicalHelper;
/**
- * Specific factory for {@link Edge} used by the
- * {@link DDiagramCanonicalSynchronizer}.
+ * Specific factory for {@link Edge} used by the {@link DDiagramCanonicalSynchronizer}.
*
* @author <a href="mailto:esteban.dugueperoux@obeo.fr">Esteban Dugueperoux</a>
*/
@@ -110,8 +109,8 @@ public class ConnectionsFactory {
}
/**
- * Create a {@link Edge} according to information provided in
- * <code>viewDescriptor</code> and <code>domain2NotationMap</code>.
+ * Create a {@link Edge} according to information provided in <code>viewDescriptor</code> and
+ * <code>domain2NotationMap</code>.
*
* @param viewDescriptor
* {@link SiriusLinkDescriptor} describing the Edge to create.
@@ -187,8 +186,8 @@ public class ConnectionsFactory {
}
/**
- * As FontStyle.fontHeight default value is 9 and BasicLabelStyle.labelSize
- * default value is 8 we must synchronize this property.
+ * As FontStyle.fontHeight default value is 9 and BasicLabelStyle.labelSize default value is 8 we must synchronize
+ * this property.
*
* @param edge
*/
@@ -215,16 +214,16 @@ public class ConnectionsFactory {
EObject element = edge.getElement();
if (element instanceof DEdge) {
DEdge dEdge = (DEdge) element;
- EdgeLayoutData egdeLayoutData = SiriusLayoutDataManager.INSTANCE.getData(dEdge, false);
+ EdgeLayoutData edgeLayoutData = SiriusLayoutDataManager.INSTANCE.getData(dEdge, false);
- if (egdeLayoutData != null) {
- EdgeLayoutData oppositeEgdeLayoutData = SiriusLayoutDataManager.INSTANCE.getOppositeEdgeLayoutData(egdeLayoutData, false);
- routing = egdeLayoutData.getRouting();
+ if (edgeLayoutData != null) {
+ EdgeLayoutData oppositeEdgeLayoutData = SiriusLayoutDataManager.INSTANCE.getOppositeEdgeLayoutData(edgeLayoutData, false);
+ routing = edgeLayoutData.getRouting();
- if (oppositeEgdeLayoutData != null) {
- getAttributesForSourceAndTargetMove(egdeLayoutData, oppositeEgdeLayoutData, edge, source, target);
+ if (oppositeEdgeLayoutData != null) {
+ getAttributesForSourceAndTargetMove(edgeLayoutData, oppositeEdgeLayoutData, edge, source, target);
} else {
- getAttributesForSourceOrTargetMove(egdeLayoutData, edge, source, target);
+ getAttributesForSourceOrTargetMove(edgeLayoutData, edge, source, target);
}
} else {
Option<Rectangle> optionalSourceBounds = GMFHelper.getAbsoluteBounds(source);
@@ -288,11 +287,10 @@ public class ConnectionsFactory {
}
/**
- * Only source or target of edge has been moved (or dragged and dropped).
- * Use the data as is, except for border node that potentially needs
- * adaptation.
+ * Only source or target of edge has been moved (or dragged and dropped). Use the data as is, except for border node
+ * that potentially needs adaptation.
*
- * @param egdeLayoutData
+ * @param edgeLayoutData
* Edge layout data from source (or from target)
* @param edge
* The edge to adapt
@@ -301,26 +299,26 @@ public class ConnectionsFactory {
* @param target
* The target view of the edge
*/
- protected void getAttributesForSourceOrTargetMove(EdgeLayoutData egdeLayoutData, Edge edge, View source, View target) {
- sourceTerminal = egdeLayoutData.getSourceTerminal();
+ protected void getAttributesForSourceOrTargetMove(EdgeLayoutData edgeLayoutData, Edge edge, View source, View target) {
+ sourceTerminal = edgeLayoutData.getSourceTerminal();
if (EMPTY_TERMINAL.equals(sourceTerminal)) {
sourceTerminal = GMFNotationUtilities.getTerminalString(0.5d, 0.5d);
}
- targetTerminal = egdeLayoutData.getTargetTerminal();
+ targetTerminal = edgeLayoutData.getTargetTerminal();
if (EMPTY_TERMINAL.equals(targetTerminal)) {
targetTerminal = GMFNotationUtilities.getTerminalString(0.5d, 0.5d);
}
// sourceRefPoint, targetRefPoint and pointList of
// the edgeLayoutData can be null if the edge is
// hide when the layout data is stored
- if (egdeLayoutData.getSourceRefPoint() != null) {
- sourceRefPoint = egdeLayoutData.getSourceRefPoint().getCopy();
+ if (edgeLayoutData.getSourceRefPoint() != null) {
+ sourceRefPoint = edgeLayoutData.getSourceRefPoint().getCopy();
}
- if (egdeLayoutData.getTargetRefPoint() != null) {
- targetRefPoint = egdeLayoutData.getTargetRefPoint().getCopy();
+ if (edgeLayoutData.getTargetRefPoint() != null) {
+ targetRefPoint = edgeLayoutData.getTargetRefPoint().getCopy();
}
- if (egdeLayoutData.getPointList() != null) {
+ if (edgeLayoutData.getPointList() != null) {
GraphicalEditPart srceEditPart = GMFHelper.getGraphicalEditPart(source).get();
GraphicalEditPart tgtEditPart = GMFHelper.getGraphicalEditPart(target).get();
@@ -348,20 +346,19 @@ public class ConnectionsFactory {
}
if (pointList.size() == 0) {
// no intersection found, case when source and target are overlapped
- pointList = egdeLayoutData.getPointList();
+ pointList = edgeLayoutData.getPointList();
}
}
}
/**
- * Both source and target of edge have been moved (or dragged and dropped).
- * We must use a "mix" of the edge layout data from source that contains the
- * impacted points for the source move and the edge layout data from target
- * that contains the impacted points for the target move.
+ * Both source and target of edge have been moved (or dragged and dropped). We must use a "mix" of the edge layout
+ * data from source that contains the impacted points for the source move and the edge layout data from target that
+ * contains the impacted points for the target move.
*
- * @param egdeLayoutData
+ * @param edgeLayoutData
* Edge layout data from source (or from target)
- * @param oppositeEgdeLayoutData
+ * @param oppositeEdgeLayoutData
* Opposite layout data from target (or from source)
* @param edge
* The edge to adapt
@@ -370,15 +367,15 @@ public class ConnectionsFactory {
* @param target
* The target view of the edge
*/
- private void getAttributesForSourceAndTargetMove(EdgeLayoutData egdeLayoutData, EdgeLayoutData oppositeEgdeLayoutData, Edge edge, View source, View target) {
+ private void getAttributesForSourceAndTargetMove(EdgeLayoutData edgeLayoutData, EdgeLayoutData oppositeEdgeLayoutData, Edge edge, View source, View target) {
EdgeLayoutData layoutDataFromSource;
EdgeLayoutData layoutDataFromTarget;
- if (egdeLayoutData.getTarget().getSourceNode().equals(egdeLayoutData.getParent().getTarget())) {
- layoutDataFromSource = egdeLayoutData;
- layoutDataFromTarget = oppositeEgdeLayoutData;
+ if (edgeLayoutData.getTarget().getSourceNode().equals(edgeLayoutData.getParent().getTarget())) {
+ layoutDataFromSource = edgeLayoutData;
+ layoutDataFromTarget = oppositeEdgeLayoutData;
} else {
- layoutDataFromSource = oppositeEgdeLayoutData;
- layoutDataFromTarget = egdeLayoutData;
+ layoutDataFromSource = oppositeEdgeLayoutData;
+ layoutDataFromTarget = edgeLayoutData;
}
sourceTerminal = layoutDataFromSource.getSourceTerminal();
targetTerminal = layoutDataFromTarget.getTargetTerminal();
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/util/GMFNotationUtilities.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/util/GMFNotationUtilities.java
index 24b3cc308c..dde79c38fd 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/util/GMFNotationUtilities.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/util/GMFNotationUtilities.java
@@ -50,17 +50,15 @@ public final class GMFNotationUtilities {
}
/**
- * Set the source anchor of the <code>edge</code> according to the new
- * points list. The second point of this list is used to determine the new X
- * location of this Anchor.
+ * Set the source anchor of the <code>edge</code> according to the new points list. The second point of this list is
+ * used to determine the new X location of this Anchor.
*
* @param edge
* The edge to modify
* @param newPoints
* The new points list
- * @return an optional Point representing the source reference point
- * corresponding to the new source anchor. This Option can be null
- * if the anchor is not changed.
+ * @return an optional Point representing the source reference point corresponding to the new source anchor. This
+ * Option can be null if the anchor is not changed.
*/
public static Option<Point> setSourceAnchor(Edge edge, PointList newPoints) {
Point referencePointOfChangedAnchor = null;
@@ -81,8 +79,8 @@ public final class GMFNotationUtilities {
if (Math.abs(relativeReferencePoint.preciseX() - newXAnchorPercentage) > FP_TOLERANCE) {
// Change x id anchor
setIdentityAnchorId(anchor, newXAnchorPercentage, relativeReferencePoint.preciseY());
- referencePointOfChangedAnchor = new PrecisionPoint(sourceFigure.getLocation().x + sourceFigure.width * newXAnchorPercentage, sourceFigure.getLocation().y + sourceFigure.height
- * relativeReferencePoint.preciseY());
+ referencePointOfChangedAnchor = new PrecisionPoint(sourceFigure.getLocation().x + sourceFigure.width * newXAnchorPercentage,
+ sourceFigure.getLocation().y + sourceFigure.height * relativeReferencePoint.preciseY());
}
} else if (edge.getSourceAnchor() == null) {
// Use the center of the source if there is no previous
@@ -103,17 +101,15 @@ public final class GMFNotationUtilities {
}
/**
- * Set the target anchor of the <code>edge</code> according to the new
- * points list. The third point of this list is used to determine the new X
- * location of this Anchor.
+ * Set the target anchor of the <code>edge</code> according to the new points list. The third point of this list is
+ * used to determine the new X location of this Anchor.
*
* @param edge
* The edge to modify
* @param newPoints
* The new points list
- * @return an optional Point representing the target reference point
- * corresponding to the new target anchor. This Option can be null
- * if the anchor is not changed.
+ * @return an optional Point representing the target reference point corresponding to the new target anchor. This
+ * Option can be null if the anchor is not changed.
*/
public static Option<Point> setTargetAnchor(Edge edge, PointList newPoints) {
Point referencePointOfChangedAnchor = null;
@@ -133,8 +129,8 @@ public final class GMFNotationUtilities {
if (Math.abs(relativeReferencePoint.preciseX() - newXAnchorPercentage) > FP_TOLERANCE) {
// Change x id anchor
setIdentityAnchorId(anchor, newXAnchorPercentage, relativeReferencePoint.preciseY());
- referencePointOfChangedAnchor = new PrecisionPoint(targetFigure.getLocation().x + targetFigure.width * newXAnchorPercentage, targetFigure.getLocation().y + targetFigure.height
- * relativeReferencePoint.preciseY());
+ referencePointOfChangedAnchor = new PrecisionPoint(targetFigure.getLocation().x + targetFigure.width * newXAnchorPercentage,
+ targetFigure.getLocation().y + targetFigure.height * relativeReferencePoint.preciseY());
}
} else if (edge.getTargetAnchor() == null) {
// Use the center of the source if there is no previous
@@ -169,8 +165,7 @@ public final class GMFNotationUtilities {
}
/**
- * Get the terminal string used in {@link IdentityAnchor} from its
- * xPercentage and yPercentage.
+ * Get the terminal string used in {@link IdentityAnchor} from its xPercentage and yPercentage.
*
* @param xPercentage
* the x percentage to use in id
@@ -183,19 +178,17 @@ public final class GMFNotationUtilities {
}
/**
- * Change the bendpoints of the GMF edge according to draw2d elements
- * (pointList, sourceRefPoint and targetRefPoint).
+ * Change the bendpoints of the GMF edge according to draw2d elements (pointList, sourceRefPoint and
+ * targetRefPoint).
*
* @param edge
* The edge to modify
* @param newPoints
* The new points list
* @param sourceRefPoint
- * The source reference point (to compute the GMF
- * RelativeBendpoints)
+ * The source reference point (to compute the GMF RelativeBendpoints)
* @param targetRefPoint
- * The target reference point (to compute the GMF
- * RelativeBendpoints)
+ * The target reference point (to compute the GMF RelativeBendpoints)
*/
public static void setGMFBendpoints(Edge edge, PointList newPoints, Point sourceRefPoint, Point targetRefPoint) {
List<Object> newBendpoints = new ArrayList<>();
@@ -210,17 +203,15 @@ public final class GMFNotationUtilities {
}
/**
- * Compute the new source anchor according to an horizontal move
- * representing by the deltaX.
+ * Compute the new source anchor according to an horizontal move representing by the deltaX.
*
* @param edge
* The edge to modify
* @param deltaX
* The horizontal delta move
*
- * @return an optional Point representing the source reference point
- * corresponding to the new source. This Option can be null if the
- * anchor is not changed.
+ * @return an optional Point representing the source reference point corresponding to the new source. This Option
+ * can be null if the anchor is not changed.
*/
public static Option<PrecisionPoint> setSourceAnchor(Edge edge, int deltaX) {
// Compute new x anchor of source point after horizontal source
@@ -239,8 +230,8 @@ public final class GMFNotationUtilities {
double newXAnchorPercentage = (xNewPosition - sourceFigure.x) / (sourceFigure.width);
// Change x id anchor
setIdentityAnchorId(anchor, newXAnchorPercentage, relativeReferencePoint.preciseY());
- return Options.newSome(new PrecisionPoint(sourceFigure.getLocation().x + sourceFigure.width * newXAnchorPercentage, sourceFigure.getLocation().y + sourceFigure.height
- * relativeReferencePoint.preciseY()));
+ return Options.newSome(new PrecisionPoint(sourceFigure.getLocation().x + sourceFigure.width * newXAnchorPercentage,
+ sourceFigure.getLocation().y + sourceFigure.height * relativeReferencePoint.preciseY()));
}
} else {
throw new UnsupportedOperationException(Messages.GMFNotationUtilities_edgeOnEdgeNotManaged);
@@ -249,17 +240,15 @@ public final class GMFNotationUtilities {
}
/**
- * Compute the new target anchor according to an horizontal move
- * representing by the deltaX.
+ * Compute the new target anchor according to an horizontal move representing by the deltaX.
*
* @param edge
* The edge to modify
* @param deltaX
* The horizontal delta move
*
- * @return an optional Point representing the target reference point
- * corresponding to the new target anchor. This Option can be null
- * if the anchor is not changed.
+ * @return an optional Point representing the target reference point corresponding to the new target anchor. This
+ * Option can be null if the anchor is not changed.
*/
public static Option<PrecisionPoint> setTargetAnchor(Edge edge, int deltaX) {
// Compute new x anchor of target point after horizontal target
@@ -278,8 +267,8 @@ public final class GMFNotationUtilities {
double newXAnchorPercentage = (xNewPosition - targetFigure.x) / (targetFigure.width);
// Change x id anchor
setIdentityAnchorId(anchor, newXAnchorPercentage, relativeReferencePoint.preciseY());
- return Options.newSome(new PrecisionPoint(targetFigure.getLocation().x + targetFigure.width * newXAnchorPercentage, targetFigure.getLocation().y + targetFigure.height
- * relativeReferencePoint.preciseY()));
+ return Options.newSome(new PrecisionPoint(targetFigure.getLocation().x + targetFigure.width * newXAnchorPercentage,
+ targetFigure.getLocation().y + targetFigure.height * relativeReferencePoint.preciseY()));
}
} else {
throw new UnsupportedOperationException(Messages.GMFNotationUtilities_edgeOnEdgeNotManaged);
@@ -288,9 +277,8 @@ public final class GMFNotationUtilities {
}
/**
- * Recompute all the bendpoints of <code>edgeToModify</code> according to a
- * reference edge. This two edges must be branch on the same tree
- * (TreeRouter).
+ * Recompute all the bendpoints of <code>edgeToModify</code> according to a reference edge. This two edges must be
+ * branch on the same tree (TreeRouter).
*
* @param referenceEdge
* The reference edge
@@ -317,14 +305,14 @@ public final class GMFNotationUtilities {
sourceBounds = GMFHelper.getBounds((Node) edgeToModify.getSource(), true);
sourceLocation = new PrecisionPoint(sourceBounds.x + sourceBounds.width * sourceAnchorReference.preciseX(), sourceBounds.y + sourceBounds.height * sourceAnchorReference.preciseY());
} else if (edgeToModify.getSource() instanceof Edge) {
- // TODO Manage edge on egde ...
+ // TODO Manage edge on edge ...
throw new UnsupportedOperationException(Messages.GMFNotationUtilities_edgeOnEdgeNotManaged);
}
if (edgeToModify.getTarget() instanceof Node) {
targetBounds = GMFHelper.getBounds((Node) edgeToModify.getTarget(), true);
targetLocation = new PrecisionPoint(targetBounds.x + targetBounds.width * targetAnchorReference.preciseX(), targetBounds.y + targetBounds.height * targetAnchorReference.preciseY());
} else if (edgeToModify.getTarget() instanceof Edge) {
- // TODO Manage edge on egde ...
+ // TODO Manage edge on edge ...
throw new UnsupportedOperationException(Messages.GMFNotationUtilities_edgeOnEdgeNotManaged);
}
@@ -338,18 +326,17 @@ public final class GMFNotationUtilities {
secondRelativeBendpointOfMovedEdge.getTargetY()));
brotherNewBendpoints.add(new RelativeBendpoint(targetLocation.x - sourceLocation.x, targetLocation.y + secondRelativeBendpointOfMovedEdge.getTargetY() - sourceLocation.y, 0,
secondRelativeBendpointOfMovedEdge.getTargetY()));
- brotherNewBendpoints.add(new RelativeBendpoint(targetLocation.x - sourceLocation.x, targetBounds.y + targetBounds.width - sourceLocation.y, 0, targetBounds.y + targetBounds.width
- - targetLocation.y));
+ brotherNewBendpoints.add(
+ new RelativeBendpoint(targetLocation.x - sourceLocation.x, targetBounds.y + targetBounds.width - sourceLocation.y, 0, targetBounds.y + targetBounds.width - targetLocation.y));
((RelativeBendpoints) edgeToModify.getBendpoints()).setPoints(brotherNewBendpoints);
}
}
}
/**
- * Set the target anchor of the <code>edgeToModify</code> with the same
- * target anchor of the <code>referencEdge</code> (only if reference anchor
- * is an identity anchor and, the anchor of edge to modify is null or is an
- * identify anchor).
+ * Set the target anchor of the <code>edgeToModify</code> with the same target anchor of the
+ * <code>referencEdge</code> (only if reference anchor is an identity anchor and, the anchor of edge to modify is
+ * null or is an identify anchor).
*
* @param referenceEdge
* reference edge
@@ -368,10 +355,9 @@ public final class GMFNotationUtilities {
}
/**
- * Set the source anchor of the <code>edgeToModify</code> with the same
- * target anchor of the <code>referenceEdge</code> (only if reference anchor
- * is an identity anchor and, the anchor of edge to modify is null or is an
- * identify anchor).
+ * Set the source anchor of the <code>edgeToModify</code> with the same target anchor of the
+ * <code>referenceEdge</code> (only if reference anchor is an identity anchor and, the anchor of edge to modify is
+ * null or is an identify anchor).
*
* @param referenceEdge
* reference edge
@@ -390,8 +376,8 @@ public final class GMFNotationUtilities {
}
/**
- * Change the source or target anchor and the bendpoints of the brothers of
- * <code>edge</code> according to this edge.
+ * Change the source or target anchor and the bendpoints of the brothers of <code>edge</code> according to this
+ * edge.
*
* @param edge
* The edge reference
diff --git a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/images/edgeLabelAttachment_preference.png b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/images/edgeLabelAttachment_preference.png
index fd731fa60a..a1eeacf2d9 100644
--- a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/images/edgeLabelAttachment_preference.png
+++ b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/images/edgeLabelAttachment_preference.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.html b/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.html
index de89b132d4..305973da95 100644
--- a/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.html
+++ b/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.html
@@ -1 +1,190 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="Forcinganedgedirectiontowardthecenterofanode.">Forcing an edge direction toward the center of a node.</h1><h2 id="Preamble">Preamble</h2><p><em>Summary</em>: This evolution allows the specifier to force edges direction toward the center of a node.</p><table><tr><th>Version </th><th>Status </th><th>Date </th><th>Authors </th><th>Changes </th></tr><tr><td>v0.1 </td><td>DRAFT </td><td>2014-06-06 </td><td>fbarbin </td><td>Initial version. </td></tr><tr><td>v0.2 </td><td>DRAFT </td><td>2014-06-16 </td><td>fbarbin </td><td>Update after a first team discussion. </td></tr><tr><td>v0.3 </td><td>DRAFT </td><td>2014-06-18 </td><td>fbarbin </td><td>Update after team review. </td></tr><tr><td>v0.4 </td><td>DRAFT </td><td>2014-06-27 </td><td>fbarbin </td><td>Update after team review. </td></tr><tr><td>v0.5 </td><td>PROPOSAL </td><td>2014-06-27 </td><td>fbarbin </td><td>Update after team review. </td></tr></table><p><em>Relevant tickets</em> :</p><ul><li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=437528">Bugzilla #437528 Forcing an edge direction toward the center of a node.</a></li></ul><h2 id="Introduction">Introduction</h2><p>The edge source and edge target are not systematically oriented toward the center of the node, depending on where the edge has been created or moved by the end user. Taking the example of a &#8220;port&#8221; concept that is represented by a 10px by 10px border node, for esthetic reasons the specifier could force the edges ends to be centered on those border nodes. Although the first purpose was about to center edges toward border nodes, this enhancement will affect all kind of nodes: containers, border nodes and simple nodes.</p><p><img border="0" src="image3.png"/><br/>The first edge, the highest one, is oriented to the node&#8217;s center</p><h3 id="examples">Examples</h3><p>This enhancement will cover several cases detailed below:</p><h4 id="Example1">Example 1</h4><p>Edges between border nodes on a same axis will now be aligned: </p><p><img border="0" src="image4.png"/></p><p><img border="0" src="image5.png"/></p><h4 id="Example2">Example 2</h4><p>An other example with edges with a rectilinear routing style:<br/><img border="0" src="image7.png"/></p><p>When applying this enhancement, the last edge segment will be oriented toward the conainer&#8217;s center:<br/><img border="0" src="image6.png"/></p><h4 id="Example3">Example 3</h4><p>We also have to manage routing style changes. The picture below displays two oblique edges toward the container&#8217;s center.<br/><img border="0" src="image8.png"/></p><p>When modifying the routing style to Rectilinear, the edge direction is not toward the container' s center anymore.<br/><img border="0" src="image9.png"/><br/>We need to fix the last edge segment to obtain this expected result:<br/><img border="0" src="image10.png"/></p><h2 id="details">Detailed Specification</h2><p>The edge orientation follows an invisible point on the node called &#8220;anchor&#8221;. The anchor is composed of a X and Y coordinates, each one with a range value between 0 and 1. To set the anchor at the center of the node for instance, the coordinates should be (0.5, 0.5).</p><p>Edges with an &#8220;auto centered anchor&#8221; will be restricted to a specific edge mapping and source/target mapping pair. This means that the specifier will choose which kind of edge with which kind of source (and/or target) will have this behavior. The specifier will also have the possibility to systematically center the edge on its target and/or its source.</p><p><img border="0" src="propertiesView.png"/><br/>The edge style properties view that lets the specifier personalizing the enhancement behavior.</p><h3 id="Creation">Creation</h3><p>The source and target anchors are computed in <code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.buildSiriusConnectionCreationCmd(CreateConnectionRequest)</code>. We need to modify it to force the anchor value.</p><h3 id="Reconnection">Reconnection</h3><p>The reconnect should also manage the centered anchor. Edge anchors are computed and given to the command in these two methods:<br/><code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.getReconnectSourceCommandAfterTool(ReconnectRequest)</code><br/><code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.getReconnectTargetCommandAfterTool(ReconnectRequest)</code></p><h3 id="Move">Move</h3><p>The end-user should not have the possibility to change the edge source or edge target anchor when this one is concerned by the rule.</p><h3 id="Refresh">Refresh</h3><p>The refresh mechanism should be responsible to keep edges behavior synchronized with VSM parameters. We need to modify the <code>DDiagramSynchronizer</code> component to update the Sirius model when the VSM is modified. In addition, the <code>DDiagramCanonicalSynchronizer</code> should also be modified to change the edge anchor in the GMF annotation model. Edge bendpoints should also be recomputed to consider new anchor coordinates. </p><p>See the &#8220;Metamodel Changes&#8221; section for more details about the metamodel changes.</p><h3 id="Mappingimports">Mapping imports</h3><p>We also have to consider the mapping imports. This means that if an edge is centered on a node mapping A, it should also be centered on a node mapping A' which imports the mapping A. In addition, an edge mapping E' that imports an edge mapping E, will inherit this behavior since it also inherits its style.</p><h3 id="Stylecustomization">Style customization</h3><p>As the mapping imports, these features could be customized with Style Customization.</p><h3 id="Routingstyle">Routing style</h3><p>In addition to recompute the bendpoints coordinates after having changed edge anchors, we should also consider the routing style changes. The last example in the <a href="#examples">Examples</a> section illustrates the fact that the last edge segment has to be recomputed to have a direction toward the centered anchor.</p><h3 id="Limitation">Limitation</h3><p>There is a limitation about this approach. Draw2D tries to privilege straight edge. This means that in some cases, even with an anchor set at (0.5,0.5), the edge can be shifted to keep it straight. This is called the &#8220;Straight Line Tolerance&#8221; and the constant is defined in <code>org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor.STRAIGHT_LINE_TOLERANCE</code></p><p><img border="0" src="image2.png"/><br/>An example with a source and target anchors fixed at (0.5, 0.5).</p><h2 id="BackwardCompatibilityandMigrationPaths">Backward Compatibility and Migration Paths</h2><p>The metamodel changes will be incremental so there is no migration planned. The diagram will be updated by the refresh mechanism according to the VSM changes.</p><h3 id="MetamodelChanges">Metamodel Changes</h3><h4 id="Description">Description</h4><p><code>org.eclipse.sirius.diagram.description.style.EdgeStyleDescription</code> will have four additional attributes. Two attributes to let the specifier choose for which target mappings and which source mappings the anchor of this edge will be centered. Two boolean attributes to specify whether the source or the target should always be centered.</p><h4 id="Diagram">Diagram</h4><p><code>org.eclipse.sirius.diagram.EdgeStyle</code> will have two more boolean attributes computed from the edge style description. These attributes will provide the information about centering or not the source or target anchors.</p><h3 id="APIChanges">API Changes</h3><p>This enhancement will not change the API. Since sequence diagrams should not be impacted, we will just restrict the properties view.</p><h3 id="UserInterfaceChanges">User Interface Changes</h3><p>The Edge Style properties view should have two new fields to select the source and target mapping for which the edge anchor is centered. These fields could be inserted in the advanced tab. The properties view will also let the specifier to systematically center edges source, target or both. When these options will be selected, the corresponding mappings fields will be unavailable. <br/>see the Properties View <a href="#details">illustration</a> within the Detailed Specification section header.</p><p>Sequence diagrams should not be impacted by this enhancement. This feature will be masked in the properties view or invalidated by a validation rule if the first solution cannot be applied.</p><h3 id="DocumentationChanges">Documentation Changes</h3><p>The specifier documentation will be updated to mention the new Edge Style Description attributes.<br/>The &#8220;release notes&#8221; will be updated to mention Metamodel changes.</p><h2 id="TestsandNonregressionstrategy">Tests and Non-regression strategy</h2><ul><li>We should test the following cases (for border-node, node and container mappings):<ul><li>Test that edge anchors are well set when the edge is automatically created.</li><li>Test that edge anchors are well set when the edge is created by the end-user.</li><li>Test that edge anchors are well set when the edge has been reconnected.</li><li>Test that the end-user cannot change the edge anchor when the specifier has chosen to keep it centered. Test in rectilinear mode too.</li><li>Test that changing the routing style to rectilinear keep the edge centered toward the anchor.</li><li>Test the edge creation with a rectilinear style.</li><li>Test that after having reconnected an edge source and target to a node not among the &#8220;centered list mapping&#8221;, the user is free to move the anchor anywhere.</li><li>Taking an edge (egde mapping A) with a source and a target (node mapping B), test that edge is correctly centered when the mapping B is added to the &#8220;centered anchor list&#8221;.</li><li>The test cases above should also be tested with mapping imports:<ul><li>Test that an edge between a node A and B, assuming that the edge should be centered on A, will also be centered on node mapping A' which import the node mapping A. </li><li>Test that an edge mapping E', importing an edge mapping E also inherit the centered style properties.</li></ul></li></ul></li></ul><h2 id="Implementationchoicesandtradeoffs">Implementation choices and tradeoffs</h2><p>The first idea was to fix a border node size limit to apply the centered anchor. This option had a limited precision compared to the edge-mapping/node-mapping pair.</p></body></html> \ No newline at end of file
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ </head>
+ <body>
+ <h1 id="Forcinganedgedirectiontowardthecenterofanode.">Forcing an edge direction toward the center of a node.</h1>
+ <h2 id="Preamble">Preamble</h2>
+ <p>
+ <em>Summary</em>: This evolution allows the specifier to force edges direction toward the center of a node.
+ </p>
+ <table>
+ <tr>
+ <th>Version</th>
+ <th>Status</th>
+ <th>Date</th>
+ <th>Authors</th>
+ <th>Changes</th>
+ </tr>
+ <tr>
+ <td>v0.1</td>
+ <td>DRAFT</td>
+ <td>2014-06-06</td>
+ <td>fbarbin</td>
+ <td>Initial version.</td>
+ </tr>
+ <tr>
+ <td>v0.2</td>
+ <td>DRAFT</td>
+ <td>2014-06-16</td>
+ <td>fbarbin</td>
+ <td>Update after a first team discussion.</td>
+ </tr>
+ <tr>
+ <td>v0.3</td>
+ <td>DRAFT</td>
+ <td>2014-06-18</td>
+ <td>fbarbin</td>
+ <td>Update after team review.</td>
+ </tr>
+ <tr>
+ <td>v0.4</td>
+ <td>DRAFT</td>
+ <td>2014-06-27</td>
+ <td>fbarbin</td>
+ <td>Update after team review.</td>
+ </tr>
+ <tr>
+ <td>v0.5</td>
+ <td>PROPOSAL</td>
+ <td>2014-06-27</td>
+ <td>fbarbin</td>
+ <td>Update after team review.</td>
+ </tr>
+ </table>
+ <p>
+ <em>Relevant tickets</em> :
+ </p>
+ <ul>
+ <li>
+ <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=437528">Bugzilla #437528 Forcing an edge direction toward the center of a node.</a>
+ </li>
+ </ul>
+ <h2 id="Introduction">Introduction</h2>
+ <p>The edge source and edge target are not systematically oriented toward the center of the node, depending on where the edge has been created or moved by the end user. Taking the example of a &#171;port&#187; concept that is represented by a 10px by 10px border node, for esthetic reasons the specifier could force the edges ends to be centered on those border nodes. Although the first purpose was about to center edges toward border nodes, this enhancement will affect all kind of nodes: containers, border nodes and simple nodes.</p>
+ <p>
+ <img border="0" src="image3.png"/>
+ <br/>The first edge, the highest one, is oriented to the node&#8217;s center
+ </p>
+ <h3 id="examples">Examples</h3>
+ <p>This enhancement will cover several cases detailed below:</p>
+ <h4 id="Example1">Example 1</h4>
+ <p>Edges between border nodes on a same axis will now be aligned: </p>
+ <p>
+ <img border="0" src="image4.png"/>
+ </p>
+ <p>
+ <img border="0" src="image5.png"/>
+ </p>
+ <h4 id="Example2">Example 2</h4>
+ <p>An other example with edges with a rectilinear routing style:
+ <br/>
+ <img border="0" src="image7.png"/>
+ </p>
+ <p>When applying this enhancement, the last edge segment will be oriented toward the conainer&#8217;s center:
+ <br/>
+ <img border="0" src="image6.png"/>
+ </p>
+ <h4 id="Example3">Example 3</h4>
+ <p>We also have to manage routing style changes. The picture below displays two oblique edges toward the container&#8217;s center.
+ <br/>
+ <img border="0" src="image8.png"/>
+ </p>
+ <p>When modifying the routing style to Rectilinear, the edge direction is not toward the container' s center anymore.
+ <br/>
+ <img border="0" src="image9.png"/>
+ <br/>We need to fix the last edge segment to obtain this expected result:
+ <br/>
+ <img border="0" src="image10.png"/>
+ </p>
+ <h2 id="details">Detailed Specification</h2>
+ <p>The edge orientation follows an invisible point on the node called &#171;anchor&#187;. The anchor is composed of a X and Y coordinates, each one with a range value between 0 and 1. To set the anchor at the center of the node for instance, the coordinates should be (0.5, 0.5).</p>
+ <p>Edges with an &#171;auto centered anchor&#187; will be restricted to a specific edge mapping and source/target mapping pair. This means that the specifier will choose which kind of edge with which kind of source (and/or target) will have this behavior. The specifier will also have the possibility to systematically center the edge on its target and/or its source.</p>
+ <p>
+ <img border="0" src="propertiesView.png"/>
+ <br/>The edge style properties view that lets the specifier personalizing the enhancement behavior.
+ </p>
+ <h3 id="Creation">Creation</h3>
+ <p>The source and target anchors are computed in
+ <code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.buildSiriusConnectionCreationCmd(CreateConnectionRequest)</code>. We need to modify it to force the anchor value.
+ </p>
+ <h3 id="Reconnection">Reconnection</h3>
+ <p>The reconnect should also manage the centered anchor. Edge anchors are computed and given to the command in these two methods:
+ <br/>
+ <code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.getReconnectSourceCommandAfterTool(ReconnectRequest)</code>
+ <br/>
+ <code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.getReconnectTargetCommandAfterTool(ReconnectRequest)</code>
+ </p>
+ <h3 id="Move">Move</h3>
+ <p>The end-user should not have the possibility to change the edge source or edge target anchor when this one is concerned by the rule.</p>
+ <h3 id="Refresh">Refresh</h3>
+ <p>The refresh mechanism should be responsible to keep edges behavior synchronized with VSM parameters. We need to modify the
+ <code>DDiagramSynchronizer</code> component to update the Sirius model when the VSM is modified. In addition, the
+ <code>DDiagramCanonicalSynchronizer</code> should also be modified to change the edge anchor in the GMF annotation model. Edge bendpoints should also be recomputed to consider new anchor coordinates.
+ </p>
+ <p>See the &#171;Metamodel Changes&#187; section for more details about the metamodel changes.</p>
+ <h3 id="Mappingimports">Mapping imports</h3>
+ <p>We also have to consider the mapping imports. This means that if an edge is centered on a node mapping A, it should also be centered on a node mapping A' which imports the mapping A. In addition, an edge mapping E' that imports an edge mapping E, will inherit this behavior since it also inherits its style.</p>
+ <h3 id="Stylecustomization">Style customization</h3>
+ <p>As the mapping imports, these features could be customized with Style Customization.</p>
+ <h3 id="Routingstyle">Routing style</h3>
+ <p>In addition to recompute the bendpoints coordinates after having changed edge anchors, we should also consider the routing style changes. The last example in the
+ <a href="#examples">Examples</a> section illustrates the fact that the last edge segment has to be recomputed to have a direction toward the centered anchor.
+ </p>
+ <h3 id="Limitation">Limitation</h3>
+ <p>There is a limitation about this approach. Draw2D tries to privilege straight edge. This means that in some cases, even with an anchor set at (0.5,0.5), the edge can be shifted to keep it straight. This is called the &#171;Straight Line Tolerance&#187; and the constant is defined in
+ <code>org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor.STRAIGHT_LINE_TOLERANCE</code>
+ </p>
+ <p>
+ <img border="0" src="image2.png"/>
+ <br/>An example with a source and target anchors fixed at (0.5, 0.5).
+ </p>
+ <h2 id="BackwardCompatibilityandMigrationPaths">Backward Compatibility and Migration Paths</h2>
+ <p>The metamodel changes will be incremental so there is no migration planned. The diagram will be updated by the refresh mechanism according to the VSM changes.</p>
+ <h3 id="MetamodelChanges">Metamodel Changes</h3>
+ <h4 id="Description">Description</h4>
+ <p>
+ <code>org.eclipse.sirius.diagram.description.style.EdgeStyleDescription</code> will have four additional attributes. Two attributes to let the specifier choose for which target mappings and which source mappings the anchor of this edge will be centered. Two boolean attributes to specify whether the source or the target should always be centered.
+ </p>
+ <h4 id="Diagram">Diagram</h4>
+ <p>
+ <code>org.eclipse.sirius.diagram.EdgeStyle</code> will have two more boolean attributes computed from the edge style description. These attributes will provide the information about centering or not the source or target anchors.
+ </p>
+ <h3 id="APIChanges">API Changes</h3>
+ <p>This enhancement will not change the API. Since sequence diagrams should not be impacted, we will just restrict the properties view.</p>
+ <h3 id="UserInterfaceChanges">User Interface Changes</h3>
+ <p>The Edge Style properties view should have two new fields to select the source and target mapping for which the edge anchor is centered. These fields could be inserted in the advanced tab. The properties view will also let the specifier to systematically center edges source, target or both. When these options will be selected, the corresponding mappings fields will be unavailable.
+ <br/>see the Properties View
+ <a href="#details">illustration</a> within the Detailed Specification section header.
+ </p>
+ <p>Sequence diagrams should not be impacted by this enhancement. This feature will be masked in the properties view or invalidated by a validation rule if the first solution cannot be applied.</p>
+ <h3 id="DocumentationChanges">Documentation Changes</h3>
+ <p>The specifier documentation will be updated to mention the new Edge Style Description attributes.
+ <br/>The &#171;release notes&#187; will be updated to mention Metamodel changes.
+ </p>
+ <h2 id="TestsandNonregressionstrategy">Tests and Non-regression strategy</h2>
+ <ul>
+ <li>We should test the following cases (for border-node, node and container mappings):
+ <ul>
+ <li>Test that edge anchors are well set when the edge is automatically created.</li>
+ <li>Test that edge anchors are well set when the edge is created by the end-user.</li>
+ <li>Test that edge anchors are well set when the edge has been reconnected.</li>
+ <li>Test that the end-user cannot change the edge anchor when the specifier has chosen to keep it centered. Test in rectilinear mode too.</li>
+ <li>Test that changing the routing style to rectilinear keep the edge centered toward the anchor.</li>
+ <li>Test the edge creation with a rectilinear style.</li>
+ <li>Test that after having reconnected an edge source and target to a node not among the &#171;centered list mapping&#187;, the user is free to move the anchor anywhere.</li>
+ <li>Taking an edge (edge mapping A) with a source and a target (node mapping B), test that edge is correctly centered when the mapping B is added to the &#171;centered anchor list&#187;.</li>
+ <li>The test cases above should also be tested with mapping imports:
+ <ul>
+ <li>Test that an edge between a node A and B, assuming that the edge should be centered on A, will also be centered on node mapping A' which import the node mapping A. </li>
+ <li>Test that an edge mapping E', importing an edge mapping E also inherit the centered style properties.</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <h2 id="Implementationchoicesandtradeoffs">Implementation choices and tradeoffs</h2>
+ <p>The first idea was to fix a border node size limit to apply the centered anchor. This option had a limited precision compared to the edge-mapping/node-mapping pair.</p>
+ </body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.textile b/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.textile
index 8d5ca1229c..47328e0e80 100644
--- a/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.textile
+++ b/plugins/org.eclipse.sirius.doc/specs/archived/centeredAnchors/437528.textile
@@ -157,7 +157,7 @@ h2. Tests and Non-regression strategy
** Test that changing the routing style to rectilinear keep the edge centered toward the anchor.
** Test the edge creation with a rectilinear style.
** Test that after having reconnected an edge source and target to a node not among the "centered list mapping", the user is free to move the anchor anywhere.
-** Taking an edge (egde mapping A) with a source and a target (node mapping B), test that edge is correctly centered when the mapping B is added to the "centered anchor list".
+** Taking an edge (edge mapping A) with a source and a target (node mapping B), test that edge is correctly centered when the mapping B is added to the "centered anchor list".
** The test cases above should also be tested with mapping imports:
*** Test that an edge between a node A and B, assuming that the edge should be centered on A, will also be centered on node mapping A' which import the node mapping A.
*** Test that an edge mapping E', importing an edge mapping E also inherit the centered style properties.
diff --git a/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/properties/filters/style/edgestyledescription/EdgeStyleEndsCenteringHelper.java b/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/properties/filters/style/edgestyledescription/EdgeStyleEndsCenteringHelper.java
index 6c7f9cbd58..4223cdfa20 100644
--- a/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/properties/filters/style/edgestyledescription/EdgeStyleEndsCenteringHelper.java
+++ b/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/properties/filters/style/edgestyledescription/EdgeStyleEndsCenteringHelper.java
@@ -25,16 +25,13 @@ import org.eclipse.sirius.ext.base.Option;
public class EdgeStyleEndsCenteringHelper {
/**
- * Used to filter "egde ends centering" property sections. This feature is
- * only available for EdgeStyleDescription under a strict EdgeMapping type
- * or an EdgeMappingImport with a strict EdgeMapping as original mapping.
- * (this feature is not available in sequence diagram for instance).
+ * Used to filter "edge ends centering" property sections. This feature is only available for EdgeStyleDescription
+ * under a strict EdgeMapping type or an EdgeMappingImport with a strict EdgeMapping as original mapping. (this
+ * feature is not available in sequence diagram for instance).
*
* @param obj
- * the current object from the filter (an EdgeStyleDescription
- * instance).
- * @return true if the property section should be displayed, otherwise
- * false.
+ * the current object from the filter (an EdgeStyleDescription instance).
+ * @return true if the property section should be displayed, otherwise false.
*/
public static boolean shouldDisplayPropertySection(Object obj) {
boolean value = false;
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/DocbookTestCase.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/DocbookTestCase.java
index e1d16e46fb..03439db49a 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/DocbookTestCase.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/common/DocbookTestCase.java
@@ -1188,7 +1188,7 @@ public class DocbookTestCase extends SiriusDiagramTestCase implements DocBookMod
* container. creates a tiny section node in the diagram, an edge between
* the tiny section node and the chapter container and an edge between the
* tiny section and the medium section node. creates finally two bordered
- * nodes on the tiny section node and an egde between both bordered nodes.
+ * nodes on the tiny section node and an edge between both bordered nodes.
*/
public void createTwoTinyNotes() {
final DNode tinySection = createTinySection();
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/edge/AttachmentBetweenEdgeAndItsLabelsTest.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/edge/AttachmentBetweenEdgeAndItsLabelsTest.java
index 7d7facfe3b..dc72670625 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/edge/AttachmentBetweenEdgeAndItsLabelsTest.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/edge/AttachmentBetweenEdgeAndItsLabelsTest.java
@@ -32,8 +32,8 @@ import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager;
import com.google.common.collect.Iterables;
/**
- * Tests to check the behavior of the preference
- * "Show link between egde and its labels on selection"
+ * Tests to check the behavior of the preference "Show link between edge and its
+ * labels on selection"
*
* @author lredor
*/
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/MigrationRoutingStyleEndUserOverrideTest.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/MigrationRoutingStyleEndUserOverrideTest.java
index d63aa1b8c9..67648df6fb 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/MigrationRoutingStyleEndUserOverrideTest.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/migration/MigrationRoutingStyleEndUserOverrideTest.java
@@ -36,7 +36,7 @@ import org.osgi.framework.Version;
import com.google.common.collect.Iterables;
/**
- * Test that egde style and customFeatures are as expected after migration.
+ * Test that edge style and customFeatures are as expected after migration.
*
* @author jdupont
*
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/operations/OperationTest.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/operations/OperationTest.java
index 2af8cbc836..6e5703e951 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/operations/OperationTest.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/operations/OperationTest.java
@@ -588,7 +588,7 @@ public class OperationTest extends DocbookTestCase {
final AbstractOperationTask task = new CreateViewTask(context, accessor, op, interpreter);
- // check that there is only one egde view before executing the
+ // check that there is only one edge view before executing the
// CreateViewTask.
try {
instanceCount = INTERPRETER.evaluateInteger(obviousDiagram, "aql:self.eAllContents(diagram::DEdge)->size()").intValue();
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BendpointsStabilityOnMovesTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BendpointsStabilityOnMovesTest.java
index 1c0612deb2..646f1787dd 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BendpointsStabilityOnMovesTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BendpointsStabilityOnMovesTest.java
@@ -570,7 +570,7 @@ public class BendpointsStabilityOnMovesTest extends AbstractSiriusSwtBotGefTestC
SWTBotSiriusDiagramEditor rectilinearDiagramEditor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), DIAGRAM_DESCRIPTION_NAME, "SimpleCaseForOverlap",
DSemanticDiagram.class);
PointList previousBendPoints = ((PolylineConnectionEx) rectilinearDiagramEditor.getConnectionsEditPart().get(0).part().getFigure()).getPoints();
- assertEquals("The egde must have 2 bendpoints before move of source", 2, previousBendPoints.size());
+ assertEquals("The edge must have 2 bendpoints before move of source", 2, previousBendPoints.size());
try {
// Step 2: when moving edge source over the target, a loop is
@@ -589,13 +589,13 @@ public class BendpointsStabilityOnMovesTest extends AbstractSiriusSwtBotGefTestC
SWTBotUtils.waitAllUiEvents();
PointList actualBendPoints = ((PolylineConnectionEx) rectilinearDiagramEditor.getConnectionsEditPart().get(0).part().getFigure()).getPoints();
try {
- assertTrue("The egde must have 4 or 5 bendpoints after move of source over target: expected 4 or 5 but was " + actualBendPoints.size(), actualBendPoints.size() >= 4);
+ assertTrue("The edge must have 4 or 5 bendpoints after move of source over target: expected 4 or 5 but was " + actualBendPoints.size(), actualBendPoints.size() >= 4);
// Step 3: when moving edge source away from edge target the
// loop must no be kept (only 2 points again)
rectilinearDiagramEditor.drag(toLocation, new Point(300, 200));
SWTBotUtils.waitAllUiEvents();
actualBendPoints = ((PolylineConnectionEx) rectilinearDiagramEditor.getConnectionsEditPart().get(0).part().getFigure()).getPoints();
- assertEquals("The egde must have 2 bendpoints after move of source away from target", 2, actualBendPoints.size());
+ assertEquals("The edge must have 2 bendpoints after move of source away from target", 2, actualBendPoints.size());
} finally {
undo("Set Location or Size");
SWTBotUtils.waitAllUiEvents();
@@ -616,16 +616,16 @@ public class BendpointsStabilityOnMovesTest extends AbstractSiriusSwtBotGefTestC
public void testMoveEdgeExtremity() {
doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(true, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT), Lists.newArrayList(HORIZONTAL_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false, false,
"NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
- doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(true, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT), Lists.newArrayList(HORIZONTAL_NEGATIV_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false,
- false, "NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
+ doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(true, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT), Lists.newArrayList(HORIZONTAL_NEGATIV_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false, false,
+ "NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(false, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT), Lists.newArrayList(HORIZONTAL_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false, false,
"NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(false, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT), Lists.newArrayList(HORIZONTAL_NEGATIV_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false,
false, "NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(true, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT_BORDERED), Lists.newArrayList(VERTICAL_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false, false,
"NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
- doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(true, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT_BORDERED), Lists.newArrayList(VERTICAL_NEGATIV_MOVE_EDGE), ZoomLevel.ZOOM_125, false,
- false, false, "NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
+ doTestMoveEdgesOnlyMovesFirstOrLastBendpoint(true, false, Lists.newArrayList(ROUTING_STYLE_STRAIGHT_BORDERED), Lists.newArrayList(VERTICAL_NEGATIV_MOVE_EDGE), ZoomLevel.ZOOM_125, false, false,
+ false, "NodeWithOneSourceEdgeAnd3Bendpoints", "NodeWithOneTargetEdgeAnd3Bendpoints");
}
/**
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ShapeResizingEdgePositionStabilityTests.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ShapeResizingEdgePositionStabilityTests.java
index d52d11c073..0936147240 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ShapeResizingEdgePositionStabilityTests.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/ShapeResizingEdgePositionStabilityTests.java
@@ -69,9 +69,8 @@ public class ShapeResizingEdgePositionStabilityTests extends AbstractSiriusSwtBo
/*
* (non-Javadoc)
- * @see
- * org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase
- * #onSetUpBeforeClosingWelcomePage()
+ * @see org.eclipse.sirius.tests.swtbot.support.api.
+ * AbstractSiriusSwtBotGefTestCase #onSetUpBeforeClosingWelcomePage()
*/
@Override
protected void onSetUpBeforeClosingWelcomePage() throws Exception {
@@ -81,9 +80,8 @@ public class ShapeResizingEdgePositionStabilityTests extends AbstractSiriusSwtBo
/*
* (non-Javadoc)
- * @see
- * org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase
- * #onSetUpAfterOpeningDesignerPerspective()
+ * @see org.eclipse.sirius.tests.swtbot.support.api.
+ * AbstractSiriusSwtBotGefTestCase #onSetUpAfterOpeningDesignerPerspective()
*/
@Override
protected void onSetUpAfterOpeningDesignerPerspective() throws Exception {
@@ -585,9 +583,8 @@ public class ShapeResizingEdgePositionStabilityTests extends AbstractSiriusSwtBo
/*
* (non-Javadoc)
- * @see
- * org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase
- * #tearDown()
+ * @see org.eclipse.sirius.tests.swtbot.support.api.
+ * AbstractSiriusSwtBotGefTestCase #tearDown()
*/
@Override
protected void tearDown() throws Exception {
@@ -598,8 +595,8 @@ public class ShapeResizingEdgePositionStabilityTests extends AbstractSiriusSwtBo
super.tearDown();
}
- private PointList getEdgePointList(String egdeId) {
- SWTBotGefConnectionEditPart editPart = (SWTBotGefConnectionEditPart) editor.getEditPart(egdeId, ConnectionEditPart.class);
+ private PointList getEdgePointList(String edgeId) {
+ SWTBotGefConnectionEditPart editPart = (SWTBotGefConnectionEditPart) editor.getEditPart(edgeId, ConnectionEditPart.class);
return ((Connection) editPart.part().getFigure()).getPoints().getCopy();
}

Back to the top