diff options
Diffstat (limited to 'extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/LineToImpl.java')
-rw-r--r-- | extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/LineToImpl.java | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/LineToImpl.java b/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/LineToImpl.java index 56f580d33b6..7f1650d350a 100644 --- a/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/LineToImpl.java +++ b/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/LineToImpl.java @@ -13,10 +13,14 @@ package org.eclipse.papyrus.dd.dg.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.ENotificationImpl; + import org.eclipse.papyrus.dd.dc.Point; + import org.eclipse.papyrus.dd.dg.DGPackage; import org.eclipse.papyrus.dd.dg.LineTo; @@ -80,9 +84,9 @@ public class LineToImpl extends PathCommandImpl implements LineTo { public NotificationChain basicSetPoint(Point newPoint, NotificationChain msgs) { Point oldPoint = point; point = newPoint; - if (eNotificationRequired()) { + if(eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DGPackage.LINE_TO__POINT, oldPoint, newPoint); - if (msgs == null) { + if(msgs == null) { msgs = notification; } else { msgs.add(notification); @@ -98,19 +102,19 @@ public class LineToImpl extends PathCommandImpl implements LineTo { */ @Override public void setPoint(Point newPoint) { - if (newPoint != point) { + if(newPoint != point) { NotificationChain msgs = null; - if (point != null) { - msgs = ((InternalEObject) point).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DGPackage.LINE_TO__POINT, null, msgs); + if(point != null) { + msgs = ((InternalEObject)point).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DGPackage.LINE_TO__POINT, null, msgs); } - if (newPoint != null) { - msgs = ((InternalEObject) newPoint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DGPackage.LINE_TO__POINT, null, msgs); + if(newPoint != null) { + msgs = ((InternalEObject)newPoint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DGPackage.LINE_TO__POINT, null, msgs); } msgs = basicSetPoint(newPoint, msgs); - if (msgs != null) { + if(msgs != null) { msgs.dispatch(); } - } else if (eNotificationRequired()) { + } else if(eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, DGPackage.LINE_TO__POINT, newPoint, newPoint)); } } @@ -122,7 +126,7 @@ public class LineToImpl extends PathCommandImpl implements LineTo { */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { + switch(featureID) { case DGPackage.LINE_TO__POINT: return basicSetPoint(null, msgs); } @@ -136,7 +140,7 @@ public class LineToImpl extends PathCommandImpl implements LineTo { */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { + switch(featureID) { case DGPackage.LINE_TO__POINT: return getPoint(); } @@ -150,9 +154,9 @@ public class LineToImpl extends PathCommandImpl implements LineTo { */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { + switch(featureID) { case DGPackage.LINE_TO__POINT: - setPoint((Point) newValue); + setPoint((Point)newValue); return; } super.eSet(featureID, newValue); @@ -165,9 +169,9 @@ public class LineToImpl extends PathCommandImpl implements LineTo { */ @Override public void eUnset(int featureID) { - switch (featureID) { + switch(featureID) { case DGPackage.LINE_TO__POINT: - setPoint((Point) null); + setPoint((Point)null); return; } super.eUnset(featureID); @@ -180,7 +184,7 @@ public class LineToImpl extends PathCommandImpl implements LineTo { */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { + switch(featureID) { case DGPackage.LINE_TO__POINT: return point != null; } |