diff options
Diffstat (limited to 'extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dc/impl/BoundsImpl.java')
-rw-r--r-- | extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dc/impl/BoundsImpl.java | 265 |
1 files changed, 102 insertions, 163 deletions
diff --git a/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dc/impl/BoundsImpl.java b/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dc/impl/BoundsImpl.java index 67e646ed7b6..e782b9357ff 100644 --- a/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dc/impl/BoundsImpl.java +++ b/extraplugins/diagram-definition/org.eclipse.papyrus.dd/src/org/eclipse/papyrus/dd/dc/impl/BoundsImpl.java @@ -37,15 +37,13 @@ import org.eclipse.papyrus.dd.dc.util.DCValidator; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getX <em>X</em>}</li> - * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getY <em>Y</em>}</li> - * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getWidth <em>Width</em>} - * </li> - * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getHeight <em>Height - * </em>}</li> + * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getX <em>X</em>}</li> + * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getY <em>Y</em>}</li> + * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getWidth <em>Width</em>}</li> + * <li>{@link org.eclipse.papyrus.dd.dc.impl.BoundsImpl#getHeight <em>Height</em>}</li> * </ul> * </p> - * + * * @generated */ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { @@ -71,9 +69,9 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { protected double x = X_EDEFAULT; /** - * This is true if the X attribute has been set. <!-- begin-user-doc --> + * This is true if the X attribute has been set. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * * @generated * @ordered */ @@ -100,9 +98,9 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { protected double y = Y_EDEFAULT; /** - * This is true if the Y attribute has been set. <!-- begin-user-doc --> + * This is true if the Y attribute has been set. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * * @generated * @ordered */ @@ -111,7 +109,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * The default value of the '{@link #getWidth() <em>Width</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @see #getWidth() * @generated * @ordered @@ -121,7 +118,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * The cached value of the '{@link #getWidth() <em>Width</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @see #getWidth() * @generated * @ordered @@ -129,18 +125,17 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { protected double width = WIDTH_EDEFAULT; /** - * This is true if the Width attribute has been set. <!-- begin-user-doc --> + * This is true if the Width attribute has been set. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * * @generated * @ordered */ protected boolean widthESet; /** - * The default value of the '{@link #getHeight() <em>Height</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * The default value of the '{@link #getHeight() <em>Height</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @see #getHeight() * @generated * @ordered @@ -150,7 +145,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * The cached value of the '{@link #getHeight() <em>Height</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @see #getHeight() * @generated * @ordered @@ -158,9 +152,9 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { protected double height = HEIGHT_EDEFAULT; /** - * This is true if the Height attribute has been set. <!-- begin-user-doc + * This is true if the Height attribute has been set. + * <!-- begin-user-doc * --> <!-- end-user-doc --> - * * @generated * @ordered */ @@ -168,7 +162,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ protected BoundsImpl() { @@ -177,7 +170,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override @@ -187,7 +179,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public double getX() { @@ -196,7 +187,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void setX(double newX) { @@ -205,13 +195,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { boolean oldXESet = xESet; xESet = true; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, - DCPackage.BOUNDS__X, oldX, x, !oldXESet)); + eNotify(new ENotificationImpl(this, Notification.SET, DCPackage.BOUNDS__X, oldX, x, !oldXESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void unsetX() { @@ -220,13 +208,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { x = X_EDEFAULT; xESet = false; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, - DCPackage.BOUNDS__X, oldX, X_EDEFAULT, oldXESet)); + eNotify(new ENotificationImpl(this, Notification.UNSET, DCPackage.BOUNDS__X, oldX, X_EDEFAULT, oldXESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public boolean isSetX() { @@ -235,7 +221,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public double getY() { @@ -244,7 +229,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void setY(double newY) { @@ -253,13 +237,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { boolean oldYESet = yESet; yESet = true; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, - DCPackage.BOUNDS__Y, oldY, y, !oldYESet)); + eNotify(new ENotificationImpl(this, Notification.SET, DCPackage.BOUNDS__Y, oldY, y, !oldYESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void unsetY() { @@ -268,13 +250,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { y = Y_EDEFAULT; yESet = false; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, - DCPackage.BOUNDS__Y, oldY, Y_EDEFAULT, oldYESet)); + eNotify(new ENotificationImpl(this, Notification.UNSET, DCPackage.BOUNDS__Y, oldY, Y_EDEFAULT, oldYESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public boolean isSetY() { @@ -283,7 +263,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public double getWidth() { @@ -292,7 +271,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void setWidth(double newWidth) { @@ -301,13 +279,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { boolean oldWidthESet = widthESet; widthESet = true; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, - DCPackage.BOUNDS__WIDTH, oldWidth, width, !oldWidthESet)); + eNotify(new ENotificationImpl(this, Notification.SET, DCPackage.BOUNDS__WIDTH, oldWidth, width, !oldWidthESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void unsetWidth() { @@ -316,14 +292,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { width = WIDTH_EDEFAULT; widthESet = false; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, - DCPackage.BOUNDS__WIDTH, oldWidth, WIDTH_EDEFAULT, - oldWidthESet)); + eNotify(new ENotificationImpl(this, Notification.UNSET, DCPackage.BOUNDS__WIDTH, oldWidth, WIDTH_EDEFAULT, oldWidthESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public boolean isSetWidth() { @@ -332,7 +305,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public double getHeight() { @@ -341,7 +313,6 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void setHeight(double newHeight) { @@ -350,13 +321,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { boolean oldHeightESet = heightESet; heightESet = true; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, - DCPackage.BOUNDS__HEIGHT, oldHeight, height, !oldHeightESet)); + eNotify(new ENotificationImpl(this, Notification.SET, DCPackage.BOUNDS__HEIGHT, oldHeight, height, !oldHeightESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public void unsetHeight() { @@ -365,14 +334,11 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { height = HEIGHT_EDEFAULT; heightESet = false; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, - DCPackage.BOUNDS__HEIGHT, oldHeight, HEIGHT_EDEFAULT, - oldHeightESet)); + eNotify(new ENotificationImpl(this, Notification.UNSET, DCPackage.BOUNDS__HEIGHT, oldHeight, HEIGHT_EDEFAULT, oldHeightESet)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public boolean isSetHeight() { @@ -380,13 +346,10 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { } /** - * The cached validation expression for the ' - * {@link #nonNegativeWidth(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) - * <em>Non Negative Width</em>}' invariant operation. <!-- begin-user-doc + * The cached validation expression for the '{@link #nonNegativeWidth(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Non Negative Width</em>}' invariant operation. + * <!-- begin-user-doc * --> <!-- end-user-doc --> - * - * @see #nonNegativeWidth(org.eclipse.emf.common.util.DiagnosticChain, - * java.util.Map) + * @see #nonNegativeWidth(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) * @generated * @ordered */ @@ -394,32 +357,29 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public boolean nonNegativeWidth(DiagnosticChain diagnostics, Map<Object, Object> context) { - return DCValidator - .validate( - DCPackage.Literals.BOUNDS, - this, - diagnostics, - context, - "http://www.eclipse.org/emf/2002/Ecore/OCL", - DCPackage.Literals.BOUNDS___NON_NEGATIVE_WIDTH__DIAGNOSTICCHAIN_MAP, - NON_NEGATIVE_WIDTH_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION, - Diagnostic.ERROR, DCValidator.DIAGNOSTIC_SOURCE, - DCValidator.BOUNDS__NON_NEGATIVE_WIDTH); + return + DCValidator.validate + (DCPackage.Literals.BOUNDS, + this, + diagnostics, + context, + "http://www.eclipse.org/emf/2002/Ecore/OCL", + DCPackage.Literals.BOUNDS___NON_NEGATIVE_WIDTH__DIAGNOSTICCHAIN_MAP, + NON_NEGATIVE_WIDTH_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION, + Diagnostic.ERROR, + DCValidator.DIAGNOSTIC_SOURCE, + DCValidator.BOUNDS__NON_NEGATIVE_WIDTH); } /** - * The cached validation expression for the ' - * {@link #nonNegativeHeight(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) - * <em>Non Negative Height</em>}' invariant operation. <!-- begin-user-doc + * The cached validation expression for the '{@link #nonNegativeHeight(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Non Negative Height</em>}' invariant operation. + * <!-- begin-user-doc * --> <!-- end-user-doc --> - * - * @see #nonNegativeHeight(org.eclipse.emf.common.util.DiagnosticChain, - * java.util.Map) + * @see #nonNegativeHeight(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) * @generated * @ordered */ @@ -427,115 +387,110 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public boolean nonNegativeHeight(DiagnosticChain diagnostics, Map<Object, Object> context) { - return DCValidator - .validate( - DCPackage.Literals.BOUNDS, - this, - diagnostics, - context, - "http://www.eclipse.org/emf/2002/Ecore/OCL", - DCPackage.Literals.BOUNDS___NON_NEGATIVE_HEIGHT__DIAGNOSTICCHAIN_MAP, - NON_NEGATIVE_HEIGHT_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION, - Diagnostic.ERROR, DCValidator.DIAGNOSTIC_SOURCE, - DCValidator.BOUNDS__NON_NEGATIVE_HEIGHT); + return + DCValidator.validate + (DCPackage.Literals.BOUNDS, + this, + diagnostics, + context, + "http://www.eclipse.org/emf/2002/Ecore/OCL", + DCPackage.Literals.BOUNDS___NON_NEGATIVE_HEIGHT__DIAGNOSTICCHAIN_MAP, + NON_NEGATIVE_HEIGHT_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION, + Diagnostic.ERROR, + DCValidator.DIAGNOSTIC_SOURCE, + DCValidator.BOUNDS__NON_NEGATIVE_HEIGHT); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case DCPackage.BOUNDS__X: - return getX(); - case DCPackage.BOUNDS__Y: - return getY(); - case DCPackage.BOUNDS__WIDTH: - return getWidth(); - case DCPackage.BOUNDS__HEIGHT: - return getHeight(); + case DCPackage.BOUNDS__X: + return getX(); + case DCPackage.BOUNDS__Y: + return getY(); + case DCPackage.BOUNDS__WIDTH: + return getWidth(); + case DCPackage.BOUNDS__HEIGHT: + return getHeight(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case DCPackage.BOUNDS__X: - setX((Double) newValue); - return; - case DCPackage.BOUNDS__Y: - setY((Double) newValue); - return; - case DCPackage.BOUNDS__WIDTH: - setWidth((Double) newValue); - return; - case DCPackage.BOUNDS__HEIGHT: - setHeight((Double) newValue); - return; + case DCPackage.BOUNDS__X: + setX((Double)newValue); + return; + case DCPackage.BOUNDS__Y: + setY((Double)newValue); + return; + case DCPackage.BOUNDS__WIDTH: + setWidth((Double)newValue); + return; + case DCPackage.BOUNDS__HEIGHT: + setHeight((Double)newValue); + return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { - case DCPackage.BOUNDS__X: - unsetX(); - return; - case DCPackage.BOUNDS__Y: - unsetY(); - return; - case DCPackage.BOUNDS__WIDTH: - unsetWidth(); - return; - case DCPackage.BOUNDS__HEIGHT: - unsetHeight(); - return; + case DCPackage.BOUNDS__X: + unsetX(); + return; + case DCPackage.BOUNDS__Y: + unsetY(); + return; + case DCPackage.BOUNDS__WIDTH: + unsetWidth(); + return; + case DCPackage.BOUNDS__HEIGHT: + unsetHeight(); + return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { - case DCPackage.BOUNDS__X: - return isSetX(); - case DCPackage.BOUNDS__Y: - return isSetY(); - case DCPackage.BOUNDS__WIDTH: - return isSetWidth(); - case DCPackage.BOUNDS__HEIGHT: - return isSetHeight(); + case DCPackage.BOUNDS__X: + return isSetX(); + case DCPackage.BOUNDS__Y: + return isSetY(); + case DCPackage.BOUNDS__WIDTH: + return isSetWidth(); + case DCPackage.BOUNDS__HEIGHT: + return isSetHeight(); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override @@ -543,47 +498,31 @@ public class BoundsImpl extends MinimalEObjectImpl.Container implements Bounds { public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { switch (operationID) { - case DCPackage.BOUNDS___NON_NEGATIVE_WIDTH__DIAGNOSTICCHAIN_MAP: - return nonNegativeWidth((DiagnosticChain) arguments.get(0), - (Map<Object, Object>) arguments.get(1)); - case DCPackage.BOUNDS___NON_NEGATIVE_HEIGHT__DIAGNOSTICCHAIN_MAP: - return nonNegativeHeight((DiagnosticChain) arguments.get(0), - (Map<Object, Object>) arguments.get(1)); + case DCPackage.BOUNDS___NON_NEGATIVE_WIDTH__DIAGNOSTICCHAIN_MAP: + return nonNegativeWidth((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1)); + case DCPackage.BOUNDS___NON_NEGATIVE_HEIGHT__DIAGNOSTICCHAIN_MAP: + return nonNegativeHeight((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1)); } return super.eInvoke(operationID, arguments); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ @Override public String toString() { - if (eIsProxy()) - return super.toString(); + if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (x: "); - if (xESet) - result.append(x); - else - result.append("<unset>"); + if (xESet) result.append(x); else result.append("<unset>"); result.append(", y: "); - if (yESet) - result.append(y); - else - result.append("<unset>"); + if (yESet) result.append(y); else result.append("<unset>"); result.append(", width: "); - if (widthESet) - result.append(width); - else - result.append("<unset>"); + if (widthESet) result.append(width); else result.append("<unset>"); result.append(", height: "); - if (heightESet) - result.append(height); - else - result.append("<unset>"); + if (heightESet) result.append(height); else result.append("<unset>"); result.append(')'); return result.toString(); } |