|
@@ -29,36 +29,49 @@ import org.yakindu.sct.model.sgraph.SGraphPackage;
|
|
|
import org.yakindu.sct.model.sgraph.Scope;
|
|
|
import org.yakindu.sct.model.sgraph.ScopedElement;
|
|
|
import org.yakindu.sct.model.sgraph.State;
|
|
|
+import org.yakindu.sct.model.sgraph.Statechart;
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * An implementation of the model object '<em><b>State</b></em>'.
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> An implementation of the model object '
|
|
|
+ * <em><b>State</b></em>'. <!-- end-user-doc -->
|
|
|
* <p>
|
|
|
* The following features are implemented:
|
|
|
* <ul>
|
|
|
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getExpression <em>Expression</em>}</li>
|
|
|
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getReactions <em>Reactions</em>}</li>
|
|
|
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getLocalReactions <em>Local Reactions</em>}</li>
|
|
|
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getScopes <em>Scopes</em>}</li>
|
|
|
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubRegions <em>Sub Regions</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getExpression <em>
|
|
|
+ * Expression</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getReactions <em>
|
|
|
+ * Reactions</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getLocalReactions <em>
|
|
|
+ * Local Reactions</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getScopes <em>Scopes
|
|
|
+ * </em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubRegions <em>Sub
|
|
|
+ * Regions</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubstatechart <em>
|
|
|
+ * Substatechart</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isSubmachineState <em>
|
|
|
+ * Submachine State</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isCompositeState <em>
|
|
|
+ * Composite State</em>}</li>
|
|
|
+ * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isSimpleState <em>
|
|
|
+ * Simple State</em>}</li>
|
|
|
* </ul>
|
|
|
* </p>
|
|
|
- *
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public class StateImpl extends VertexImpl implements State {
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
|
|
|
|
|
|
/**
|
|
|
- * The default value of the '{@link #getExpression() <em>Expression</em>}' attribute.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The default value of the '{@link #getExpression() <em>Expression</em>}'
|
|
|
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @see #getExpression()
|
|
|
* @generated
|
|
|
* @ordered
|
|
@@ -66,9 +79,9 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
protected static final String EXPRESSION_EDEFAULT = null;
|
|
|
|
|
|
/**
|
|
|
- * The cached value of the '{@link #getExpression() <em>Expression</em>}' attribute.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The cached value of the '{@link #getExpression() <em>Expression</em>}'
|
|
|
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @see #getExpression()
|
|
|
* @generated
|
|
|
* @ordered
|
|
@@ -76,9 +89,9 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
protected String expression = EXPRESSION_EDEFAULT;
|
|
|
|
|
|
/**
|
|
|
- * The cached value of the '{@link #getReactions() <em>Reactions</em>}' reference list.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The cached value of the '{@link #getReactions() <em>Reactions</em>}'
|
|
|
+ * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @see #getReactions()
|
|
|
* @generated
|
|
|
* @ordered
|
|
@@ -86,9 +99,10 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
protected EList<Reaction> reactions;
|
|
|
|
|
|
/**
|
|
|
- * The cached value of the '{@link #getLocalReactions() <em>Local Reactions</em>}' containment reference list.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The cached value of the '{@link #getLocalReactions()
|
|
|
+ * <em>Local Reactions</em>}' containment reference list. <!--
|
|
|
+ * begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @see #getLocalReactions()
|
|
|
* @generated
|
|
|
* @ordered
|
|
@@ -96,9 +110,9 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
protected EList<Reaction> localReactions;
|
|
|
|
|
|
/**
|
|
|
- * The cached value of the '{@link #getScopes() <em>Scopes</em>}' containment reference list.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The cached value of the '{@link #getScopes() <em>Scopes</em>}'
|
|
|
+ * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @see #getScopes()
|
|
|
* @generated
|
|
|
* @ordered
|
|
@@ -106,9 +120,9 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
protected EList<Scope> scopes;
|
|
|
|
|
|
/**
|
|
|
- * The cached value of the '{@link #getSubRegions() <em>Sub Regions</em>}' containment reference list.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The cached value of the '{@link #getSubRegions() <em>Sub Regions</em>}'
|
|
|
+ * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @see #getSubRegions()
|
|
|
* @generated
|
|
|
* @ordered
|
|
@@ -116,8 +130,51 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
protected EList<Region> subRegions;
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * The cached value of the '{@link #getSubstatechart()
|
|
|
+ * <em>Substatechart</em>}' reference. <!-- begin-user-doc --> <!--
|
|
|
+ * end-user-doc -->
|
|
|
+ *
|
|
|
+ * @see #getSubstatechart()
|
|
|
+ * @generated
|
|
|
+ * @ordered
|
|
|
+ */
|
|
|
+ protected Statechart substatechart;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The default value of the '{@link #isSubmachineState()
|
|
|
+ * <em>Submachine State</em>}' attribute. <!-- begin-user-doc --> <!--
|
|
|
+ * end-user-doc -->
|
|
|
+ *
|
|
|
+ * @see #isSubmachineState()
|
|
|
+ * @generated
|
|
|
+ * @ordered
|
|
|
+ */
|
|
|
+ protected static final boolean SUBMACHINE_STATE_EDEFAULT = false;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The default value of the '{@link #isCompositeState()
|
|
|
+ * <em>Composite State</em>}' attribute. <!-- begin-user-doc --> <!--
|
|
|
+ * end-user-doc -->
|
|
|
+ *
|
|
|
+ * @see #isCompositeState()
|
|
|
+ * @generated
|
|
|
+ * @ordered
|
|
|
+ */
|
|
|
+ protected static final boolean COMPOSITE_STATE_EDEFAULT = false;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The default value of the '{@link #isSimpleState() <em>Simple State</em>}'
|
|
|
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @see #isSimpleState()
|
|
|
+ * @generated
|
|
|
+ * @ordered
|
|
|
+ */
|
|
|
+ protected static final boolean SIMPLE_STATE_EDEFAULT = false;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
protected StateImpl() {
|
|
@@ -125,8 +182,8 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
@@ -135,8 +192,8 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public String getExpression() {
|
|
@@ -144,245 +201,363 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public void setExpression(String newExpression) {
|
|
|
String oldExpression = expression;
|
|
|
expression = newExpression;
|
|
|
if (eNotificationRequired())
|
|
|
- eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATE__EXPRESSION, oldExpression, expression));
|
|
|
+ eNotify(new ENotificationImpl(this, Notification.SET,
|
|
|
+ SGraphPackage.STATE__EXPRESSION, oldExpression, expression));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public EList<Reaction> getReactions() {
|
|
|
if (reactions == null) {
|
|
|
- reactions = new EObjectResolvingEList<Reaction>(Reaction.class, this, SGraphPackage.STATE__REACTIONS);
|
|
|
+ reactions = new EObjectResolvingEList<Reaction>(Reaction.class,
|
|
|
+ this, SGraphPackage.STATE__REACTIONS);
|
|
|
}
|
|
|
return reactions;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public EList<Reaction> getLocalReactions() {
|
|
|
if (localReactions == null) {
|
|
|
- localReactions = new EObjectContainmentEList<Reaction>(Reaction.class, this, SGraphPackage.STATE__LOCAL_REACTIONS);
|
|
|
+ localReactions = new EObjectContainmentEList<Reaction>(
|
|
|
+ Reaction.class, this, SGraphPackage.STATE__LOCAL_REACTIONS);
|
|
|
}
|
|
|
return localReactions;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public EList<Scope> getScopes() {
|
|
|
if (scopes == null) {
|
|
|
- scopes = new EObjectContainmentEList<Scope>(Scope.class, this, SGraphPackage.STATE__SCOPES);
|
|
|
+ scopes = new EObjectContainmentEList<Scope>(Scope.class, this,
|
|
|
+ SGraphPackage.STATE__SCOPES);
|
|
|
}
|
|
|
return scopes;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public EList<Region> getSubRegions() {
|
|
|
if (subRegions == null) {
|
|
|
- subRegions = new EObjectContainmentEList<Region>(Region.class, this, SGraphPackage.STATE__SUB_REGIONS);
|
|
|
+ subRegions = new EObjectContainmentEList<Region>(Region.class,
|
|
|
+ this, SGraphPackage.STATE__SUB_REGIONS);
|
|
|
}
|
|
|
return subRegions;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @generated
|
|
|
+ */
|
|
|
+ public Statechart getSubstatechart() {
|
|
|
+ if (substatechart != null && substatechart.eIsProxy()) {
|
|
|
+ InternalEObject oldSubstatechart = (InternalEObject) substatechart;
|
|
|
+ substatechart = (Statechart) eResolveProxy(oldSubstatechart);
|
|
|
+ if (substatechart != oldSubstatechart) {
|
|
|
+ if (eNotificationRequired())
|
|
|
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
|
|
|
+ SGraphPackage.STATE__SUBSTATECHART,
|
|
|
+ oldSubstatechart, substatechart));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return substatechart;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @generated
|
|
|
+ */
|
|
|
+ public Statechart basicGetSubstatechart() {
|
|
|
+ return substatechart;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @generated
|
|
|
+ */
|
|
|
+ public void setSubstatechart(Statechart newSubstatechart) {
|
|
|
+ Statechart oldSubstatechart = substatechart;
|
|
|
+ substatechart = newSubstatechart;
|
|
|
+ if (eNotificationRequired())
|
|
|
+ eNotify(new ENotificationImpl(this, Notification.SET,
|
|
|
+ SGraphPackage.STATE__SUBSTATECHART, oldSubstatechart,
|
|
|
+ substatechart));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @generated NOT
|
|
|
+ */
|
|
|
+ public boolean isSubmachineState() {
|
|
|
+ return getSubstatechart() != null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @generated NOT
|
|
|
+ */
|
|
|
+ public boolean isCompositeState() {
|
|
|
+ return getSubRegions() != null && getSubRegions().size() > 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
+ * @generated
|
|
|
+ */
|
|
|
+ public boolean isSimpleState() {
|
|
|
+ return getSubRegions() == null || getSubRegions().size() == 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
|
|
+ public NotificationChain eInverseRemove(InternalEObject otherEnd,
|
|
|
+ int featureID, NotificationChain msgs) {
|
|
|
switch (featureID) {
|
|
|
- case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
- return ((InternalEList<?>)getLocalReactions()).basicRemove(otherEnd, msgs);
|
|
|
- case SGraphPackage.STATE__SCOPES:
|
|
|
- return ((InternalEList<?>)getScopes()).basicRemove(otherEnd, msgs);
|
|
|
- case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
- return ((InternalEList<?>)getSubRegions()).basicRemove(otherEnd, msgs);
|
|
|
+ case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
+ return ((InternalEList<?>) getLocalReactions()).basicRemove(
|
|
|
+ otherEnd, msgs);
|
|
|
+ case SGraphPackage.STATE__SCOPES:
|
|
|
+ return ((InternalEList<?>) getScopes()).basicRemove(otherEnd, msgs);
|
|
|
+ case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
+ return ((InternalEList<?>) getSubRegions()).basicRemove(otherEnd,
|
|
|
+ msgs);
|
|
|
}
|
|
|
return super.eInverseRemove(otherEnd, featureID, msgs);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
|
|
switch (featureID) {
|
|
|
- case SGraphPackage.STATE__EXPRESSION:
|
|
|
- return getExpression();
|
|
|
- case SGraphPackage.STATE__REACTIONS:
|
|
|
- return getReactions();
|
|
|
- case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
- return getLocalReactions();
|
|
|
- case SGraphPackage.STATE__SCOPES:
|
|
|
- return getScopes();
|
|
|
- case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
- return getSubRegions();
|
|
|
+ case SGraphPackage.STATE__EXPRESSION:
|
|
|
+ return getExpression();
|
|
|
+ case SGraphPackage.STATE__REACTIONS:
|
|
|
+ return getReactions();
|
|
|
+ case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
+ return getLocalReactions();
|
|
|
+ case SGraphPackage.STATE__SCOPES:
|
|
|
+ return getScopes();
|
|
|
+ case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
+ return getSubRegions();
|
|
|
+ case SGraphPackage.STATE__SUBSTATECHART:
|
|
|
+ if (resolve)
|
|
|
+ return getSubstatechart();
|
|
|
+ return basicGetSubstatechart();
|
|
|
+ case SGraphPackage.STATE__SUBMACHINE_STATE:
|
|
|
+ return isSubmachineState();
|
|
|
+ case SGraphPackage.STATE__COMPOSITE_STATE:
|
|
|
+ return isCompositeState();
|
|
|
+ case SGraphPackage.STATE__SIMPLE_STATE:
|
|
|
+ return isSimpleState();
|
|
|
}
|
|
|
return super.eGet(featureID, resolve, coreType);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
public void eSet(int featureID, Object newValue) {
|
|
|
switch (featureID) {
|
|
|
- case SGraphPackage.STATE__EXPRESSION:
|
|
|
- setExpression((String)newValue);
|
|
|
- return;
|
|
|
- case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
- getLocalReactions().clear();
|
|
|
- getLocalReactions().addAll((Collection<? extends Reaction>)newValue);
|
|
|
- return;
|
|
|
- case SGraphPackage.STATE__SCOPES:
|
|
|
- getScopes().clear();
|
|
|
- getScopes().addAll((Collection<? extends Scope>)newValue);
|
|
|
- return;
|
|
|
- case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
- getSubRegions().clear();
|
|
|
- getSubRegions().addAll((Collection<? extends Region>)newValue);
|
|
|
- return;
|
|
|
+ case SGraphPackage.STATE__EXPRESSION:
|
|
|
+ setExpression((String) newValue);
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
+ getLocalReactions().clear();
|
|
|
+ getLocalReactions().addAll(
|
|
|
+ (Collection<? extends Reaction>) newValue);
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__SCOPES:
|
|
|
+ getScopes().clear();
|
|
|
+ getScopes().addAll((Collection<? extends Scope>) newValue);
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
+ getSubRegions().clear();
|
|
|
+ getSubRegions().addAll((Collection<? extends Region>) newValue);
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__SUBSTATECHART:
|
|
|
+ setSubstatechart((Statechart) newValue);
|
|
|
+ return;
|
|
|
}
|
|
|
super.eSet(featureID, newValue);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
public void eUnset(int featureID) {
|
|
|
switch (featureID) {
|
|
|
- case SGraphPackage.STATE__EXPRESSION:
|
|
|
- setExpression(EXPRESSION_EDEFAULT);
|
|
|
- return;
|
|
|
- case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
- getLocalReactions().clear();
|
|
|
- return;
|
|
|
- case SGraphPackage.STATE__SCOPES:
|
|
|
- getScopes().clear();
|
|
|
- return;
|
|
|
- case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
- getSubRegions().clear();
|
|
|
- return;
|
|
|
+ case SGraphPackage.STATE__EXPRESSION:
|
|
|
+ setExpression(EXPRESSION_EDEFAULT);
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
+ getLocalReactions().clear();
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__SCOPES:
|
|
|
+ getScopes().clear();
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
+ getSubRegions().clear();
|
|
|
+ return;
|
|
|
+ case SGraphPackage.STATE__SUBSTATECHART:
|
|
|
+ setSubstatechart((Statechart) null);
|
|
|
+ return;
|
|
|
}
|
|
|
super.eUnset(featureID);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
public boolean eIsSet(int featureID) {
|
|
|
switch (featureID) {
|
|
|
- case SGraphPackage.STATE__EXPRESSION:
|
|
|
- return EXPRESSION_EDEFAULT == null ? expression != null : !EXPRESSION_EDEFAULT.equals(expression);
|
|
|
- case SGraphPackage.STATE__REACTIONS:
|
|
|
- return reactions != null && !reactions.isEmpty();
|
|
|
- case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
- return localReactions != null && !localReactions.isEmpty();
|
|
|
- case SGraphPackage.STATE__SCOPES:
|
|
|
- return scopes != null && !scopes.isEmpty();
|
|
|
- case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
- return subRegions != null && !subRegions.isEmpty();
|
|
|
+ case SGraphPackage.STATE__EXPRESSION:
|
|
|
+ return EXPRESSION_EDEFAULT == null ? expression != null
|
|
|
+ : !EXPRESSION_EDEFAULT.equals(expression);
|
|
|
+ case SGraphPackage.STATE__REACTIONS:
|
|
|
+ return reactions != null && !reactions.isEmpty();
|
|
|
+ case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
+ return localReactions != null && !localReactions.isEmpty();
|
|
|
+ case SGraphPackage.STATE__SCOPES:
|
|
|
+ return scopes != null && !scopes.isEmpty();
|
|
|
+ case SGraphPackage.STATE__SUB_REGIONS:
|
|
|
+ return subRegions != null && !subRegions.isEmpty();
|
|
|
+ case SGraphPackage.STATE__SUBSTATECHART:
|
|
|
+ return substatechart != null;
|
|
|
+ case SGraphPackage.STATE__SUBMACHINE_STATE:
|
|
|
+ return isSubmachineState() != SUBMACHINE_STATE_EDEFAULT;
|
|
|
+ case SGraphPackage.STATE__COMPOSITE_STATE:
|
|
|
+ return isCompositeState() != COMPOSITE_STATE_EDEFAULT;
|
|
|
+ case SGraphPackage.STATE__SIMPLE_STATE:
|
|
|
+ return isSimpleState() != SIMPLE_STATE_EDEFAULT;
|
|
|
}
|
|
|
return super.eIsSet(featureID);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
|
|
|
if (baseClass == ExpressionElement.class) {
|
|
|
switch (derivedFeatureID) {
|
|
|
- case SGraphPackage.STATE__EXPRESSION: return SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION;
|
|
|
- default: return -1;
|
|
|
+ case SGraphPackage.STATE__EXPRESSION:
|
|
|
+ return SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
}
|
|
|
}
|
|
|
if (baseClass == ReactiveElement.class) {
|
|
|
switch (derivedFeatureID) {
|
|
|
- case SGraphPackage.STATE__REACTIONS: return SGraphPackage.REACTIVE_ELEMENT__REACTIONS;
|
|
|
- case SGraphPackage.STATE__LOCAL_REACTIONS: return SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS;
|
|
|
- default: return -1;
|
|
|
+ case SGraphPackage.STATE__REACTIONS:
|
|
|
+ return SGraphPackage.REACTIVE_ELEMENT__REACTIONS;
|
|
|
+ case SGraphPackage.STATE__LOCAL_REACTIONS:
|
|
|
+ return SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
}
|
|
|
}
|
|
|
if (baseClass == ScopedElement.class) {
|
|
|
switch (derivedFeatureID) {
|
|
|
- case SGraphPackage.STATE__SCOPES: return SGraphPackage.SCOPED_ELEMENT__SCOPES;
|
|
|
- default: return -1;
|
|
|
+ case SGraphPackage.STATE__SCOPES:
|
|
|
+ return SGraphPackage.SCOPED_ELEMENT__SCOPES;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
}
|
|
|
}
|
|
|
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
|
|
|
if (baseClass == ExpressionElement.class) {
|
|
|
switch (baseFeatureID) {
|
|
|
- case SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION: return SGraphPackage.STATE__EXPRESSION;
|
|
|
- default: return -1;
|
|
|
+ case SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION:
|
|
|
+ return SGraphPackage.STATE__EXPRESSION;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
}
|
|
|
}
|
|
|
if (baseClass == ReactiveElement.class) {
|
|
|
switch (baseFeatureID) {
|
|
|
- case SGraphPackage.REACTIVE_ELEMENT__REACTIONS: return SGraphPackage.STATE__REACTIONS;
|
|
|
- case SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS: return SGraphPackage.STATE__LOCAL_REACTIONS;
|
|
|
- default: return -1;
|
|
|
+ case SGraphPackage.REACTIVE_ELEMENT__REACTIONS:
|
|
|
+ return SGraphPackage.STATE__REACTIONS;
|
|
|
+ case SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS:
|
|
|
+ return SGraphPackage.STATE__LOCAL_REACTIONS;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
}
|
|
|
}
|
|
|
if (baseClass == ScopedElement.class) {
|
|
|
switch (baseFeatureID) {
|
|
|
- case SGraphPackage.SCOPED_ELEMENT__SCOPES: return SGraphPackage.STATE__SCOPES;
|
|
|
- default: return -1;
|
|
|
+ case SGraphPackage.SCOPED_ELEMENT__SCOPES:
|
|
|
+ return SGraphPackage.STATE__SCOPES;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
}
|
|
|
}
|
|
|
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * <!-- 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(" (expression: ");
|
|
@@ -391,4 +566,4 @@ public class StateImpl extends VertexImpl implements State {
|
|
|
return result.toString();
|
|
|
}
|
|
|
|
|
|
-} //StateImpl
|
|
|
+} // StateImpl
|