diff options
Diffstat (limited to 'extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/QuadraticCurveToImpl.java')
-rw-r--r-- | extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/QuadraticCurveToImpl.java | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/QuadraticCurveToImpl.java b/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/QuadraticCurveToImpl.java index 58ac73dacb9..9391369743d 100644 --- a/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/QuadraticCurveToImpl.java +++ b/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dg/impl/QuadraticCurveToImpl.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.QuadraticCurveTo; @@ -91,9 +95,9 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu public NotificationChain basicSetPoint(Point newPoint, NotificationChain msgs) { Point oldPoint = point; point = newPoint; - if (eNotificationRequired()) { + if(eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DGPackage.QUADRATIC_CURVE_TO__POINT, oldPoint, newPoint); - if (msgs == null) { + if(msgs == null) { msgs = notification; } else { msgs.add(notification); @@ -109,19 +113,19 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @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.QUADRATIC_CURVE_TO__POINT, null, msgs); + if(point != null) { + msgs = ((InternalEObject)point).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_TO__POINT, null, msgs); } - if (newPoint != null) { - msgs = ((InternalEObject) newPoint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_TO__POINT, null, msgs); + if(newPoint != null) { + msgs = ((InternalEObject)newPoint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_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.QUADRATIC_CURVE_TO__POINT, newPoint, newPoint)); } } @@ -144,9 +148,9 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu public NotificationChain basicSetControl(Point newControl, NotificationChain msgs) { Point oldControl = control; control = newControl; - if (eNotificationRequired()) { + if(eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DGPackage.QUADRATIC_CURVE_TO__CONTROL, oldControl, newControl); - if (msgs == null) { + if(msgs == null) { msgs = notification; } else { msgs.add(notification); @@ -162,19 +166,19 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @Override public void setControl(Point newControl) { - if (newControl != control) { + if(newControl != control) { NotificationChain msgs = null; - if (control != null) { - msgs = ((InternalEObject) control).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_TO__CONTROL, null, msgs); + if(control != null) { + msgs = ((InternalEObject)control).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_TO__CONTROL, null, msgs); } - if (newControl != null) { - msgs = ((InternalEObject) newControl).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_TO__CONTROL, null, msgs); + if(newControl != null) { + msgs = ((InternalEObject)newControl).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DGPackage.QUADRATIC_CURVE_TO__CONTROL, null, msgs); } msgs = basicSetControl(newControl, msgs); - if (msgs != null) { + if(msgs != null) { msgs.dispatch(); } - } else if (eNotificationRequired()) { + } else if(eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, DGPackage.QUADRATIC_CURVE_TO__CONTROL, newControl, newControl)); } } @@ -186,7 +190,7 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { + switch(featureID) { case DGPackage.QUADRATIC_CURVE_TO__CONTROL: return basicSetControl(null, msgs); case DGPackage.QUADRATIC_CURVE_TO__POINT: @@ -202,7 +206,7 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { + switch(featureID) { case DGPackage.QUADRATIC_CURVE_TO__CONTROL: return getControl(); case DGPackage.QUADRATIC_CURVE_TO__POINT: @@ -218,12 +222,12 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { + switch(featureID) { case DGPackage.QUADRATIC_CURVE_TO__CONTROL: - setControl((Point) newValue); + setControl((Point)newValue); return; case DGPackage.QUADRATIC_CURVE_TO__POINT: - setPoint((Point) newValue); + setPoint((Point)newValue); return; } super.eSet(featureID, newValue); @@ -236,12 +240,12 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @Override public void eUnset(int featureID) { - switch (featureID) { + switch(featureID) { case DGPackage.QUADRATIC_CURVE_TO__CONTROL: - setControl((Point) null); + setControl((Point)null); return; case DGPackage.QUADRATIC_CURVE_TO__POINT: - setPoint((Point) null); + setPoint((Point)null); return; } super.eUnset(featureID); @@ -254,7 +258,7 @@ public class QuadraticCurveToImpl extends PathCommandImpl implements QuadraticCu */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { + switch(featureID) { case DGPackage.QUADRATIC_CURVE_TO__CONTROL: return control != null; case DGPackage.QUADRATIC_CURVE_TO__POINT: |