Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java')
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java177
1 files changed, 71 insertions, 106 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java
index 3266a71fd01..0920e9d1138 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/SoftwareImpl.java
@@ -1,19 +1,13 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
+/**
+ */
package org.eclipse.papyrus.RobotML.impl;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EClass;
+
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
import org.eclipse.papyrus.RobotML.RobotMLPackage;
import org.eclipse.papyrus.RobotML.Software;
@@ -24,23 +18,21 @@ import org.eclipse.papyrus.RobotML.Software;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#isIsPeriodic <em>Is Periodic</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getPeriod <em>Period</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getPriority <em>Priority</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getDeadline <em>Deadline</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getWcet <em>Wcet</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#isIsPeriodic <em>Is Periodic</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getPeriod <em>Period</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getPriority <em>Priority</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getDeadline <em>Deadline</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.SoftwareImpl#getWcet <em>Wcet</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class SoftwareImpl extends SystemImpl implements Software {
-
/**
* The default value of the '{@link #isIsPeriodic() <em>Is Periodic</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #isIsPeriodic()
* @generated
* @ordered
@@ -51,7 +43,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The cached value of the '{@link #isIsPeriodic() <em>Is Periodic</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #isIsPeriodic()
* @generated
* @ordered
@@ -62,7 +53,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The default value of the '{@link #getPeriod() <em>Period</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPeriod()
* @generated
* @ordered
@@ -73,7 +63,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The cached value of the '{@link #getPeriod() <em>Period</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPeriod()
* @generated
* @ordered
@@ -84,7 +73,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The default value of the '{@link #getPriority() <em>Priority</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPriority()
* @generated
* @ordered
@@ -95,7 +83,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The cached value of the '{@link #getPriority() <em>Priority</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPriority()
* @generated
* @ordered
@@ -106,7 +93,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The default value of the '{@link #getDeadline() <em>Deadline</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getDeadline()
* @generated
* @ordered
@@ -117,7 +103,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The cached value of the '{@link #getDeadline() <em>Deadline</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getDeadline()
* @generated
* @ordered
@@ -128,7 +113,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The default value of the '{@link #getWcet() <em>Wcet</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getWcet()
* @generated
* @ordered
@@ -139,7 +123,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
* The cached value of the '{@link #getWcet() <em>Wcet</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getWcet()
* @generated
* @ordered
@@ -149,7 +132,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected SoftwareImpl() {
@@ -159,7 +141,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -170,7 +151,6 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public boolean isIsPeriodic() {
@@ -180,20 +160,18 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setIsPeriodic(boolean newIsPeriodic) {
boolean oldIsPeriodic = isPeriodic;
isPeriodic = newIsPeriodic;
- if(eNotificationRequired())
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__IS_PERIODIC, oldIsPeriodic, isPeriodic));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public float getPeriod() {
@@ -203,20 +181,18 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setPeriod(float newPeriod) {
float oldPeriod = period;
period = newPeriod;
- if(eNotificationRequired())
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__PERIOD, oldPeriod, period));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public char getPriority() {
@@ -226,20 +202,18 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setPriority(char newPriority) {
char oldPriority = priority;
priority = newPriority;
- if(eNotificationRequired())
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__PRIORITY, oldPriority, priority));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public float getDeadline() {
@@ -249,20 +223,18 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setDeadline(float newDeadline) {
float oldDeadline = deadline;
deadline = newDeadline;
- if(eNotificationRequired())
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__DEADLINE, oldDeadline, deadline));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public float getWcet() {
@@ -272,35 +244,33 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setWcet(float newWcet) {
float oldWcet = wcet;
wcet = newWcet;
- if(eNotificationRequired())
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.SOFTWARE__WCET, oldWcet, wcet));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch(featureID) {
- case RobotMLPackage.SOFTWARE__IS_PERIODIC:
- return isIsPeriodic();
- case RobotMLPackage.SOFTWARE__PERIOD:
- return getPeriod();
- case RobotMLPackage.SOFTWARE__PRIORITY:
- return getPriority();
- case RobotMLPackage.SOFTWARE__DEADLINE:
- return getDeadline();
- case RobotMLPackage.SOFTWARE__WCET:
- return getWcet();
+ switch (featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ return isIsPeriodic();
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ return getPeriod();
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ return getPriority();
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ return getDeadline();
+ case RobotMLPackage.SOFTWARE__WCET:
+ return getWcet();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -308,27 +278,26 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
- switch(featureID) {
- case RobotMLPackage.SOFTWARE__IS_PERIODIC:
- setIsPeriodic((Boolean)newValue);
- return;
- case RobotMLPackage.SOFTWARE__PERIOD:
- setPeriod((Float)newValue);
- return;
- case RobotMLPackage.SOFTWARE__PRIORITY:
- setPriority((Character)newValue);
- return;
- case RobotMLPackage.SOFTWARE__DEADLINE:
- setDeadline((Float)newValue);
- return;
- case RobotMLPackage.SOFTWARE__WCET:
- setWcet((Float)newValue);
- return;
+ switch (featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ setIsPeriodic((Boolean)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ setPeriod((Float)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ setPriority((Character)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ setDeadline((Float)newValue);
+ return;
+ case RobotMLPackage.SOFTWARE__WCET:
+ setWcet((Float)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -336,27 +305,26 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
- switch(featureID) {
- case RobotMLPackage.SOFTWARE__IS_PERIODIC:
- setIsPeriodic(IS_PERIODIC_EDEFAULT);
- return;
- case RobotMLPackage.SOFTWARE__PERIOD:
- setPeriod(PERIOD_EDEFAULT);
- return;
- case RobotMLPackage.SOFTWARE__PRIORITY:
- setPriority(PRIORITY_EDEFAULT);
- return;
- case RobotMLPackage.SOFTWARE__DEADLINE:
- setDeadline(DEADLINE_EDEFAULT);
- return;
- case RobotMLPackage.SOFTWARE__WCET:
- setWcet(WCET_EDEFAULT);
- return;
+ switch (featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ setIsPeriodic(IS_PERIODIC_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ setPeriod(PERIOD_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ setPriority(PRIORITY_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ setDeadline(DEADLINE_EDEFAULT);
+ return;
+ case RobotMLPackage.SOFTWARE__WCET:
+ setWcet(WCET_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -364,22 +332,21 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
- switch(featureID) {
- case RobotMLPackage.SOFTWARE__IS_PERIODIC:
- return isPeriodic != IS_PERIODIC_EDEFAULT;
- case RobotMLPackage.SOFTWARE__PERIOD:
- return period != PERIOD_EDEFAULT;
- case RobotMLPackage.SOFTWARE__PRIORITY:
- return priority != PRIORITY_EDEFAULT;
- case RobotMLPackage.SOFTWARE__DEADLINE:
- return deadline != DEADLINE_EDEFAULT;
- case RobotMLPackage.SOFTWARE__WCET:
- return wcet != WCET_EDEFAULT;
+ switch (featureID) {
+ case RobotMLPackage.SOFTWARE__IS_PERIODIC:
+ return isPeriodic != IS_PERIODIC_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__PERIOD:
+ return period != PERIOD_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__PRIORITY:
+ return priority != PRIORITY_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__DEADLINE:
+ return deadline != DEADLINE_EDEFAULT;
+ case RobotMLPackage.SOFTWARE__WCET:
+ return wcet != WCET_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -387,13 +354,11 @@ public class SoftwareImpl extends SystemImpl implements Software {
/**
* <!-- 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(" (isPeriodic: ");

Back to the top