Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java
index 271138d28ac..2e7f2c5748a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorReorientCommand.java
@@ -78,10 +78,12 @@ public class ConnectorReorientCommand extends EditElementCommand {
if (!(oldEnd instanceof ConnectorEnd && newEnd instanceof ConnectorEnd)) {
return false;
}
- if (getLink().getEnds().size() != 1) {
+ if (getLink().getEnds()
+ .size() != 1) {
return false;
}
- ConnectorEnd target = getLink().getEnds().get(0);
+ ConnectorEnd target = getLink().getEnds()
+ .get(0);
if (!(getLink().eContainer() instanceof StructuredClassifier)) {
return false;
}
@@ -96,10 +98,12 @@ public class ConnectorReorientCommand extends EditElementCommand {
if (!(oldEnd instanceof ConnectorEnd && newEnd instanceof ConnectorEnd)) {
return false;
}
- if (getLink().getEnds().size() != 1) {
+ if (getLink().getEnds()
+ .size() != 1) {
return false;
}
- ConnectorEnd source = getLink().getEnds().get(0);
+ ConnectorEnd source = getLink().getEnds()
+ .get(0);
if (!(getLink().eContainer() instanceof StructuredClassifier)) {
return false;
}
@@ -128,8 +132,10 @@ public class ConnectorReorientCommand extends EditElementCommand {
* @generated
*/
protected CommandResult reorientSource() throws ExecutionException {
- getLink().getEnds().remove(getOldSource());
- getLink().getEnds().add(getNewSource());
+ getLink().getEnds()
+ .remove(getOldSource());
+ getLink().getEnds()
+ .add(getNewSource());
return CommandResult.newOKCommandResult(getLink());
}
@@ -137,8 +143,10 @@ public class ConnectorReorientCommand extends EditElementCommand {
* @generated
*/
protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getEnds().remove(getOldTarget());
- getLink().getEnds().add(getNewTarget());
+ getLink().getEnds()
+ .remove(getOldTarget());
+ getLink().getEnds()
+ .add(getNewTarget());
return CommandResult.newOKCommandResult(getLink());
}

Back to the top