Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2017-08-02 07:04:37 -0400
committerJuergen Haug2017-08-02 07:04:37 -0400
commitaec89530bed7d6ca258446aa9a15fd1806752895 (patch)
tree96ac2fa7a75cc8d2e231d4016b5fac80ef936594
parent92e03aae3dad9b4163de30b19b973c0176bc6172 (diff)
downloadorg.eclipse.etrice-aec89530bed7d6ca258446aa9a15fd1806752895.tar.gz
org.eclipse.etrice-aec89530bed7d6ca258446aa9a15fd1806752895.tar.xz
org.eclipse.etrice-aec89530bed7d6ca258446aa9a15fd1806752895.zip
[genmodel.fsm] fixed model
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore8
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java16
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java18
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java18
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java8
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java76
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java79
7 files changed, 101 insertions, 122 deletions
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
index 8e21e576e..b8968421e 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
@@ -20,11 +20,11 @@
</eAnnotations>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1"
- eType="#//Node" containment="true"/>
+ eType="#//Node" containment="true" eOpposite="#//Node/graph"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
eType="#//Link" containment="true" eOpposite="#//Link/graph"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="stateGraph" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraph"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="#//Node" eOpposite="#//Node/graph"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="#//Node" eOpposite="#//Node/subgraph"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GraphItem" eSuperTypes="#//FSMGenElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="inherited" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
@@ -37,9 +37,9 @@
</eAnnotations>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="graph" eType="#//Graph"
- eOpposite="#//Graph/node"/>
+ eOpposite="#//Graph/nodes"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="subgraph" eType="#//Graph"
- containment="true"/>
+ containment="true" eOpposite="#//Graph/node"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="outgoing" upperBound="-1"
eType="#//Link" eOpposite="#//Link/source"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="incoming" upperBound="-1"
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
index eade0240a..0fdae6956 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
@@ -196,7 +196,7 @@ public interface FsmGenPackage extends EPackage {
int GRAPH__STATE_GRAPH = FSM_GEN_ELEMENT_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>Node</b></em>' reference.
+ * The feature id for the '<em><b>Node</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -288,7 +288,7 @@ public interface FsmGenPackage extends EPackage {
int NODE__INHERITED = GRAPH_ITEM__INHERITED;
/**
- * The feature id for the '<em><b>Graph</b></em>' reference.
+ * The feature id for the '<em><b>Graph</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -669,10 +669,10 @@ public interface FsmGenPackage extends EPackage {
EReference getGraph_StateGraph();
/**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}'.
+ * Returns the meta object for the container reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Node</em>'.
+ * @return the meta object for the container reference '<em>Node</em>'.
* @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode()
* @see #getGraph()
* @generated
@@ -721,10 +721,10 @@ public interface FsmGenPackage extends EPackage {
EClass getNode();
/**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}'.
+ * Returns the meta object for the container reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Graph</em>'.
+ * @return the meta object for the container reference '<em>Graph</em>'.
* @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph()
* @see #getNode()
* @generated
@@ -1087,7 +1087,7 @@ public interface FsmGenPackage extends EPackage {
EReference GRAPH__STATE_GRAPH = eINSTANCE.getGraph_StateGraph();
/**
- * The meta object literal for the '<em><b>Node</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Node</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1131,7 +1131,7 @@ public interface FsmGenPackage extends EPackage {
EClass NODE = eINSTANCE.getNode();
/**
- * The meta object literal for the '<em><b>Graph</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Graph</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java
index 3ccf32198..81760bb60 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java
@@ -28,6 +28,7 @@ public interface Graph extends FSMGenElement {
/**
* Returns the value of the '<em><b>Nodes</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Nodes</em>' containment reference list isn't clear,
@@ -36,7 +37,8 @@ public interface Graph extends FSMGenElement {
* <!-- end-user-doc -->
* @return the value of the '<em>Nodes</em>' containment reference list.
* @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph_Nodes()
- * @model containment="true"
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph
+ * @model opposite="graph" containment="true"
* @generated
*/
EList<Node> getNodes();
@@ -86,28 +88,28 @@ public interface Graph extends FSMGenElement {
void setStateGraph(StateGraph value);
/**
- * Returns the value of the '<em><b>Node</b></em>' reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}'.
+ * Returns the value of the '<em><b>Node</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph <em>Subgraph</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Node</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Node</em>' reference.
+ * @return the value of the '<em>Node</em>' container reference.
* @see #setNode(Node)
* @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph_Node()
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph
- * @model opposite="graph"
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph
+ * @model opposite="subgraph" transient="false"
* @generated
*/
Node getNode();
/**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Node</em>' reference.
+ * @param value the new value of the '<em>Node</em>' container reference.
* @see #getNode()
* @generated
*/
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java
index 2b0d00539..3b0530b00 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java
@@ -30,28 +30,28 @@ import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
*/
public interface Node extends GraphItem {
/**
- * Returns the value of the '<em><b>Graph</b></em>' reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}'.
+ * Returns the value of the '<em><b>Graph</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes <em>Nodes</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Graph</em>' container reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Graph</em>' reference.
+ * @return the value of the '<em>Graph</em>' container reference.
* @see #setGraph(Graph)
* @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_Graph()
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode
- * @model opposite="node"
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes
+ * @model opposite="nodes" transient="false"
* @generated
*/
Graph getGraph();
/**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Graph</em>' reference.
+ * @param value the new value of the '<em>Graph</em>' container reference.
* @see #getGraph()
* @generated
*/
@@ -59,6 +59,7 @@ public interface Node extends GraphItem {
/**
* Returns the value of the '<em><b>Subgraph</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Subgraph</em>' containment reference isn't clear,
@@ -68,7 +69,8 @@ public interface Node extends GraphItem {
* @return the value of the '<em>Subgraph</em>' containment reference.
* @see #setSubgraph(Graph)
* @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_Subgraph()
- * @model containment="true"
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode
+ * @model opposite="node" containment="true"
* @generated
*/
Graph getSubgraph();
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
index d5f779776..e20daf7a2 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
@@ -615,10 +615,10 @@ public class FsmGenPackageImpl extends EPackageImpl implements FsmGenPackage {
initEAttribute(getGraphContainer_InitializedCommonData(), ecorePackage.getEBoolean(), "initializedCommonData", null, 0, 1, GraphContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(graphEClass, Graph.class, "Graph", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getGraph_Nodes(), this.getNode(), null, "nodes", null, 0, -1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraph_Nodes(), this.getNode(), this.getNode_Graph(), "nodes", null, 0, -1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getGraph_Links(), this.getLink(), this.getLink_Graph(), "links", null, 0, -1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getGraph_StateGraph(), theFSMPackage.getStateGraph(), null, "stateGraph", null, 0, 1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getGraph_Node(), this.getNode(), this.getNode_Graph(), "node", null, 0, 1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraph_Node(), this.getNode(), this.getNode_Subgraph(), "node", null, 0, 1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEOperation(getGraph__ToString(), ecorePackage.getEString(), "toString", 0, 1, IS_UNIQUE, IS_ORDERED);
@@ -626,8 +626,8 @@ public class FsmGenPackageImpl extends EPackageImpl implements FsmGenPackage {
initEAttribute(getGraphItem_Inherited(), ecorePackage.getEBoolean(), "inherited", "false", 0, 1, GraphItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getNode_Graph(), this.getGraph(), this.getGraph_Node(), "graph", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getNode_Subgraph(), this.getGraph(), null, "subgraph", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_Graph(), this.getGraph(), this.getGraph_Nodes(), "graph", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_Subgraph(), this.getGraph(), this.getGraph_Node(), "subgraph", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNode_Outgoing(), this.getLink(), this.getLink_Source(), "outgoing", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNode_Incoming(), this.getLink(), this.getLink_Target(), "incoming", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNode_StateGraphNode(), theFSMPackage.getStateGraphNode(), null, "stateGraphNode", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java
index d99be696b..b6dadf54c 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java
@@ -14,8 +14,8 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.etrice.core.fsm.fSM.StateGraph;
import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
@@ -71,16 +71,6 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
protected StateGraph stateGraph;
/**
- * The cached value of the '{@link #getNode() <em>Node</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNode()
- * @generated
- * @ordered
- */
- protected Node node;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -106,7 +96,7 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
*/
public EList<Node> getNodes() {
if (nodes == null) {
- nodes = new EObjectContainmentEList<Node>(Node.class, this, FsmGenPackage.GRAPH__NODES);
+ nodes = new EObjectContainmentWithInverseEList<Node>(Node.class, this, FsmGenPackage.GRAPH__NODES, FsmGenPackage.NODE__GRAPH);
}
return nodes;
}
@@ -167,24 +157,8 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
* @generated
*/
public Node getNode() {
- if (node != null && node.eIsProxy()) {
- InternalEObject oldNode = (InternalEObject)node;
- node = (Node)eResolveProxy(oldNode);
- if (node != oldNode) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.GRAPH__NODE, oldNode, node));
- }
- }
- return node;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Node basicGetNode() {
- return node;
+ if (eContainerFeatureID() != FsmGenPackage.GRAPH__NODE) return null;
+ return (Node)eInternalContainer();
}
/**
@@ -193,12 +167,7 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
* @generated
*/
public NotificationChain basicSetNode(Node newNode, NotificationChain msgs) {
- Node oldNode = node;
- node = newNode;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH__NODE, oldNode, newNode);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
+ msgs = eBasicSetContainer((InternalEObject)newNode, FsmGenPackage.GRAPH__NODE, msgs);
return msgs;
}
@@ -208,12 +177,14 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
* @generated
*/
public void setNode(Node newNode) {
- if (newNode != node) {
+ if (newNode != eInternalContainer() || (eContainerFeatureID() != FsmGenPackage.GRAPH__NODE && newNode != null)) {
+ if (EcoreUtil.isAncestor(this, newNode))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
- if (node != null)
- msgs = ((InternalEObject)node).eInverseRemove(this, FsmGenPackage.NODE__GRAPH, Node.class, msgs);
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
if (newNode != null)
- msgs = ((InternalEObject)newNode).eInverseAdd(this, FsmGenPackage.NODE__GRAPH, Node.class, msgs);
+ msgs = ((InternalEObject)newNode).eInverseAdd(this, FsmGenPackage.NODE__SUBGRAPH, Node.class, msgs);
msgs = basicSetNode(newNode, msgs);
if (msgs != null) msgs.dispatch();
}
@@ -248,11 +219,13 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getNodes()).basicAdd(otherEnd, msgs);
case FsmGenPackage.GRAPH__LINKS:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getLinks()).basicAdd(otherEnd, msgs);
case FsmGenPackage.GRAPH__NODE:
- if (node != null)
- msgs = ((InternalEObject)node).eInverseRemove(this, FsmGenPackage.NODE__GRAPH, Node.class, msgs);
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
return basicSetNode((Node)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
@@ -282,6 +255,20 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
* @generated
*/
@Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FsmGenPackage.GRAPH__NODE:
+ return eInternalContainer().eInverseRemove(this, FsmGenPackage.NODE__SUBGRAPH, Node.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FsmGenPackage.GRAPH__NODES:
@@ -292,8 +279,7 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
if (resolve) return getStateGraph();
return basicGetStateGraph();
case FsmGenPackage.GRAPH__NODE:
- if (resolve) return getNode();
- return basicGetNode();
+ return getNode();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -364,7 +350,7 @@ public class GraphImpl extends FSMGenElementImpl implements Graph {
case FsmGenPackage.GRAPH__STATE_GRAPH:
return stateGraph != null;
case FsmGenPackage.GRAPH__NODE:
- return node != null;
+ return getNode() != null;
}
return super.eIsSet(featureID);
}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java
index 345898daa..edd491e7c 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
@@ -52,16 +53,6 @@ import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
*/
public class NodeImpl extends GraphItemImpl implements Node {
/**
- * The cached value of the '{@link #getGraph() <em>Graph</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGraph()
- * @generated
- * @ordered
- */
- protected Graph graph;
-
- /**
* The cached value of the '{@link #getSubgraph() <em>Subgraph</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -156,24 +147,8 @@ public class NodeImpl extends GraphItemImpl implements Node {
* @generated
*/
public Graph getGraph() {
- if (graph != null && graph.eIsProxy()) {
- InternalEObject oldGraph = (InternalEObject)graph;
- graph = (Graph)eResolveProxy(oldGraph);
- if (graph != oldGraph) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.NODE__GRAPH, oldGraph, graph));
- }
- }
- return graph;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Graph basicGetGraph() {
- return graph;
+ if (eContainerFeatureID() != FsmGenPackage.NODE__GRAPH) return null;
+ return (Graph)eInternalContainer();
}
/**
@@ -182,12 +157,7 @@ public class NodeImpl extends GraphItemImpl implements Node {
* @generated
*/
public NotificationChain basicSetGraph(Graph newGraph, NotificationChain msgs) {
- Graph oldGraph = graph;
- graph = newGraph;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.NODE__GRAPH, oldGraph, newGraph);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
+ msgs = eBasicSetContainer((InternalEObject)newGraph, FsmGenPackage.NODE__GRAPH, msgs);
return msgs;
}
@@ -197,12 +167,14 @@ public class NodeImpl extends GraphItemImpl implements Node {
* @generated
*/
public void setGraph(Graph newGraph) {
- if (newGraph != graph) {
+ if (newGraph != eInternalContainer() || (eContainerFeatureID() != FsmGenPackage.NODE__GRAPH && newGraph != null)) {
+ if (EcoreUtil.isAncestor(this, newGraph))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
- if (graph != null)
- msgs = ((InternalEObject)graph).eInverseRemove(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
if (newGraph != null)
- msgs = ((InternalEObject)newGraph).eInverseAdd(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
+ msgs = ((InternalEObject)newGraph).eInverseAdd(this, FsmGenPackage.GRAPH__NODES, Graph.class, msgs);
msgs = basicSetGraph(newGraph, msgs);
if (msgs != null) msgs.dispatch();
}
@@ -243,9 +215,9 @@ public class NodeImpl extends GraphItemImpl implements Node {
if (newSubgraph != subgraph) {
NotificationChain msgs = null;
if (subgraph != null)
- msgs = ((InternalEObject)subgraph).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.NODE__SUBGRAPH, null, msgs);
+ msgs = ((InternalEObject)subgraph).eInverseRemove(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
if (newSubgraph != null)
- msgs = ((InternalEObject)newSubgraph).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.NODE__SUBGRAPH, null, msgs);
+ msgs = ((InternalEObject)newSubgraph).eInverseAdd(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
msgs = basicSetSubgraph(newSubgraph, msgs);
if (msgs != null) msgs.dispatch();
}
@@ -380,9 +352,13 @@ public class NodeImpl extends GraphItemImpl implements Node {
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FsmGenPackage.NODE__GRAPH:
- if (graph != null)
- msgs = ((InternalEObject)graph).eInverseRemove(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
return basicSetGraph((Graph)otherEnd, msgs);
+ case FsmGenPackage.NODE__SUBGRAPH:
+ if (subgraph != null)
+ msgs = ((InternalEObject)subgraph).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.NODE__SUBGRAPH, null, msgs);
+ return basicSetSubgraph((Graph)otherEnd, msgs);
case FsmGenPackage.NODE__OUTGOING:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getOutgoing()).basicAdd(otherEnd, msgs);
case FsmGenPackage.NODE__INCOMING:
@@ -419,11 +395,24 @@ public class NodeImpl extends GraphItemImpl implements Node {
* @generated
*/
@Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FsmGenPackage.NODE__GRAPH:
+ return eInternalContainer().eInverseRemove(this, FsmGenPackage.GRAPH__NODES, Graph.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FsmGenPackage.NODE__GRAPH:
- if (resolve) return getGraph();
- return basicGetGraph();
+ return getGraph();
case FsmGenPackage.NODE__SUBGRAPH:
return getSubgraph();
case FsmGenPackage.NODE__OUTGOING:
@@ -520,7 +509,7 @@ public class NodeImpl extends GraphItemImpl implements Node {
public boolean eIsSet(int featureID) {
switch (featureID) {
case FsmGenPackage.NODE__GRAPH:
- return graph != null;
+ return getGraph() != null;
case FsmGenPackage.NODE__SUBGRAPH:
return subgraph != null;
case FsmGenPackage.NODE__OUTGOING:

Back to the top