diff options
author | 2019-02-15 12:42:15 -0500 | |
---|---|---|
committer | 2020-06-07 19:06:30 -0400 | |
commit | cd87de919c733033557401e011102edc67c5f169 (patch) | |
tree | c19225558d63945cf7afea5e0dc92c738788d71a /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl | |
parent | Fix FAM Test. Begin Grammar Fix. (diff) | |
download | VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.tar.gz VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.tar.zst VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.zip |
Set up #19
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl')
15 files changed, 1950 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java new file mode 100644 index 00000000..8fc4883b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Choice</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class ChoiceImpl extends PseudostateImpl implements Choice { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected ChoiceImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.CHOICE; | ||
35 | } | ||
36 | |||
37 | } //ChoiceImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java new file mode 100644 index 00000000..0218f9c7 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java | |||
@@ -0,0 +1,152 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
19 | |||
20 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
21 | import org.eclipse.emf.ecore.util.InternalEList; | ||
22 | |||
23 | /** | ||
24 | * <!-- begin-user-doc --> | ||
25 | * An implementation of the model object '<em><b>Composite Element</b></em>'. | ||
26 | * <!-- end-user-doc --> | ||
27 | * <p> | ||
28 | * The following features are implemented: | ||
29 | * </p> | ||
30 | * <ul> | ||
31 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.CompositeElementImpl#getRegions <em>Regions</em>}</li> | ||
32 | * </ul> | ||
33 | * | ||
34 | * @generated | ||
35 | */ | ||
36 | public abstract class CompositeElementImpl extends MinimalEObjectImpl.Container implements CompositeElement { | ||
37 | /** | ||
38 | * The cached value of the '{@link #getRegions() <em>Regions</em>}' containment reference list. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @see #getRegions() | ||
42 | * @generated | ||
43 | * @ordered | ||
44 | */ | ||
45 | protected EList<Region> regions; | ||
46 | |||
47 | /** | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @generated | ||
51 | */ | ||
52 | protected CompositeElementImpl() { | ||
53 | super(); | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @generated | ||
60 | */ | ||
61 | @Override | ||
62 | protected EClass eStaticClass() { | ||
63 | return yakinduPackage.Literals.COMPOSITE_ELEMENT; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | public EList<Region> getRegions() { | ||
72 | if (regions == null) { | ||
73 | regions = new EObjectContainmentEList<Region>(Region.class, this, yakinduPackage.COMPOSITE_ELEMENT__REGIONS); | ||
74 | } | ||
75 | return regions; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | @Override | ||
84 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
85 | switch (featureID) { | ||
86 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: | ||
87 | return ((InternalEList<?>)getRegions()).basicRemove(otherEnd, msgs); | ||
88 | } | ||
89 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | @Override | ||
98 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
99 | switch (featureID) { | ||
100 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: | ||
101 | return getRegions(); | ||
102 | } | ||
103 | return super.eGet(featureID, resolve, coreType); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | @SuppressWarnings("unchecked") | ||
112 | @Override | ||
113 | public void eSet(int featureID, Object newValue) { | ||
114 | switch (featureID) { | ||
115 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: | ||
116 | getRegions().clear(); | ||
117 | getRegions().addAll((Collection<? extends Region>)newValue); | ||
118 | return; | ||
119 | } | ||
120 | super.eSet(featureID, newValue); | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | @Override | ||
129 | public void eUnset(int featureID) { | ||
130 | switch (featureID) { | ||
131 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: | ||
132 | getRegions().clear(); | ||
133 | return; | ||
134 | } | ||
135 | super.eUnset(featureID); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | @Override | ||
144 | public boolean eIsSet(int featureID) { | ||
145 | switch (featureID) { | ||
146 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: | ||
147 | return regions != null && !regions.isEmpty(); | ||
148 | } | ||
149 | return super.eIsSet(featureID); | ||
150 | } | ||
151 | |||
152 | } //CompositeElementImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java new file mode 100644 index 00000000..d0334475 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Entry</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class EntryImpl extends PseudostateImpl implements Entry { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected EntryImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.ENTRY; | ||
35 | } | ||
36 | |||
37 | } //EntryImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java new file mode 100644 index 00000000..d1448776 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Exit</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class ExitImpl extends PseudostateImpl implements Exit { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected ExitImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.EXIT; | ||
35 | } | ||
36 | |||
37 | } //ExitImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java new file mode 100644 index 00000000..716c096e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Final State</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class FinalStateImpl extends RegularStateImpl implements FinalState { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected FinalStateImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.FINAL_STATE; | ||
35 | } | ||
36 | |||
37 | } //FinalStateImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java new file mode 100644 index 00000000..b9fc27f3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Pseudostate</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public abstract class PseudostateImpl extends VertexImpl implements Pseudostate { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected PseudostateImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.PSEUDOSTATE; | ||
35 | } | ||
36 | |||
37 | } //PseudostateImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java new file mode 100644 index 00000000..fa873aeb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java | |||
@@ -0,0 +1,152 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
19 | |||
20 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
21 | import org.eclipse.emf.ecore.util.InternalEList; | ||
22 | |||
23 | /** | ||
24 | * <!-- begin-user-doc --> | ||
25 | * An implementation of the model object '<em><b>Region</b></em>'. | ||
26 | * <!-- end-user-doc --> | ||
27 | * <p> | ||
28 | * The following features are implemented: | ||
29 | * </p> | ||
30 | * <ul> | ||
31 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl#getVertices <em>Vertices</em>}</li> | ||
32 | * </ul> | ||
33 | * | ||
34 | * @generated | ||
35 | */ | ||
36 | public class RegionImpl extends MinimalEObjectImpl.Container implements Region { | ||
37 | /** | ||
38 | * The cached value of the '{@link #getVertices() <em>Vertices</em>}' containment reference list. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @see #getVertices() | ||
42 | * @generated | ||
43 | * @ordered | ||
44 | */ | ||
45 | protected EList<Vertex> vertices; | ||
46 | |||
47 | /** | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @generated | ||
51 | */ | ||
52 | protected RegionImpl() { | ||
53 | super(); | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @generated | ||
60 | */ | ||
61 | @Override | ||
62 | protected EClass eStaticClass() { | ||
63 | return yakinduPackage.Literals.REGION; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | public EList<Vertex> getVertices() { | ||
72 | if (vertices == null) { | ||
73 | vertices = new EObjectContainmentEList<Vertex>(Vertex.class, this, yakinduPackage.REGION__VERTICES); | ||
74 | } | ||
75 | return vertices; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | @Override | ||
84 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
85 | switch (featureID) { | ||
86 | case yakinduPackage.REGION__VERTICES: | ||
87 | return ((InternalEList<?>)getVertices()).basicRemove(otherEnd, msgs); | ||
88 | } | ||
89 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | @Override | ||
98 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
99 | switch (featureID) { | ||
100 | case yakinduPackage.REGION__VERTICES: | ||
101 | return getVertices(); | ||
102 | } | ||
103 | return super.eGet(featureID, resolve, coreType); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | @SuppressWarnings("unchecked") | ||
112 | @Override | ||
113 | public void eSet(int featureID, Object newValue) { | ||
114 | switch (featureID) { | ||
115 | case yakinduPackage.REGION__VERTICES: | ||
116 | getVertices().clear(); | ||
117 | getVertices().addAll((Collection<? extends Vertex>)newValue); | ||
118 | return; | ||
119 | } | ||
120 | super.eSet(featureID, newValue); | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | @Override | ||
129 | public void eUnset(int featureID) { | ||
130 | switch (featureID) { | ||
131 | case yakinduPackage.REGION__VERTICES: | ||
132 | getVertices().clear(); | ||
133 | return; | ||
134 | } | ||
135 | super.eUnset(featureID); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | @Override | ||
144 | public boolean eIsSet(int featureID) { | ||
145 | switch (featureID) { | ||
146 | case yakinduPackage.REGION__VERTICES: | ||
147 | return vertices != null && !vertices.isEmpty(); | ||
148 | } | ||
149 | return super.eIsSet(featureID); | ||
150 | } | ||
151 | |||
152 | } //RegionImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java new file mode 100644 index 00000000..bbe21a14 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Regular State</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public abstract class RegularStateImpl extends VertexImpl implements RegularState { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected RegularStateImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.REGULAR_STATE; | ||
35 | } | ||
36 | |||
37 | } //RegularStateImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java new file mode 100644 index 00000000..66ab2a8f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java | |||
@@ -0,0 +1,183 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State; | ||
8 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.NotificationChain; | ||
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
20 | import org.eclipse.emf.ecore.util.InternalEList; | ||
21 | |||
22 | /** | ||
23 | * <!-- begin-user-doc --> | ||
24 | * An implementation of the model object '<em><b>State</b></em>'. | ||
25 | * <!-- end-user-doc --> | ||
26 | * <p> | ||
27 | * The following features are implemented: | ||
28 | * </p> | ||
29 | * <ul> | ||
30 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl#getRegions <em>Regions</em>}</li> | ||
31 | * </ul> | ||
32 | * | ||
33 | * @generated | ||
34 | */ | ||
35 | public class StateImpl extends RegularStateImpl implements State { | ||
36 | /** | ||
37 | * The cached value of the '{@link #getRegions() <em>Regions</em>}' containment reference list. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @see #getRegions() | ||
41 | * @generated | ||
42 | * @ordered | ||
43 | */ | ||
44 | protected EList<Region> regions; | ||
45 | |||
46 | /** | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @generated | ||
50 | */ | ||
51 | protected StateImpl() { | ||
52 | super(); | ||
53 | } | ||
54 | |||
55 | /** | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @generated | ||
59 | */ | ||
60 | @Override | ||
61 | protected EClass eStaticClass() { | ||
62 | return yakinduPackage.Literals.STATE; | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @generated | ||
69 | */ | ||
70 | public EList<Region> getRegions() { | ||
71 | if (regions == null) { | ||
72 | regions = new EObjectContainmentEList<Region>(Region.class, this, yakinduPackage.STATE__REGIONS); | ||
73 | } | ||
74 | return regions; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
84 | switch (featureID) { | ||
85 | case yakinduPackage.STATE__REGIONS: | ||
86 | return ((InternalEList<?>)getRegions()).basicRemove(otherEnd, msgs); | ||
87 | } | ||
88 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
98 | switch (featureID) { | ||
99 | case yakinduPackage.STATE__REGIONS: | ||
100 | return getRegions(); | ||
101 | } | ||
102 | return super.eGet(featureID, resolve, coreType); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @SuppressWarnings("unchecked") | ||
111 | @Override | ||
112 | public void eSet(int featureID, Object newValue) { | ||
113 | switch (featureID) { | ||
114 | case yakinduPackage.STATE__REGIONS: | ||
115 | getRegions().clear(); | ||
116 | getRegions().addAll((Collection<? extends Region>)newValue); | ||
117 | return; | ||
118 | } | ||
119 | super.eSet(featureID, newValue); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | @Override | ||
128 | public void eUnset(int featureID) { | ||
129 | switch (featureID) { | ||
130 | case yakinduPackage.STATE__REGIONS: | ||
131 | getRegions().clear(); | ||
132 | return; | ||
133 | } | ||
134 | super.eUnset(featureID); | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * <!-- begin-user-doc --> | ||
139 | * <!-- end-user-doc --> | ||
140 | * @generated | ||
141 | */ | ||
142 | @Override | ||
143 | public boolean eIsSet(int featureID) { | ||
144 | switch (featureID) { | ||
145 | case yakinduPackage.STATE__REGIONS: | ||
146 | return regions != null && !regions.isEmpty(); | ||
147 | } | ||
148 | return super.eIsSet(featureID); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | @Override | ||
157 | public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { | ||
158 | if (baseClass == CompositeElement.class) { | ||
159 | switch (derivedFeatureID) { | ||
160 | case yakinduPackage.STATE__REGIONS: return yakinduPackage.COMPOSITE_ELEMENT__REGIONS; | ||
161 | default: return -1; | ||
162 | } | ||
163 | } | ||
164 | return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
173 | public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { | ||
174 | if (baseClass == CompositeElement.class) { | ||
175 | switch (baseFeatureID) { | ||
176 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: return yakinduPackage.STATE__REGIONS; | ||
177 | default: return -1; | ||
178 | } | ||
179 | } | ||
180 | return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); | ||
181 | } | ||
182 | |||
183 | } //StateImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java new file mode 100644 index 00000000..056820ca --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Statechart</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class StatechartImpl extends CompositeElementImpl implements Statechart { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected StatechartImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.STATECHART; | ||
35 | } | ||
36 | |||
37 | } //StatechartImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java new file mode 100644 index 00000000..28ef69ea --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Synchronization</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class SynchronizationImpl extends PseudostateImpl implements Synchronization { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected SynchronizationImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return yakinduPackage.Literals.SYNCHRONIZATION; | ||
35 | } | ||
36 | |||
37 | } //SynchronizationImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java new file mode 100644 index 00000000..ea1677ee --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java | |||
@@ -0,0 +1,284 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | import org.eclipse.emf.common.notify.NotificationChain; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
19 | |||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * An implementation of the model object '<em><b>Transition</b></em>'. | ||
23 | * <!-- end-user-doc --> | ||
24 | * <p> | ||
25 | * The following features are implemented: | ||
26 | * </p> | ||
27 | * <ul> | ||
28 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl#getTarget <em>Target</em>}</li> | ||
29 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl#getSource <em>Source</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class TransitionImpl extends MinimalEObjectImpl.Container implements Transition { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getTarget() <em>Target</em>}' reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getTarget() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected Vertex target; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | protected TransitionImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | protected EClass eStaticClass() { | ||
61 | return yakinduPackage.Literals.TRANSITION; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | public Vertex getTarget() { | ||
70 | if (target != null && target.eIsProxy()) { | ||
71 | InternalEObject oldTarget = (InternalEObject)target; | ||
72 | target = (Vertex)eResolveProxy(oldTarget); | ||
73 | if (target != oldTarget) { | ||
74 | if (eNotificationRequired()) | ||
75 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, yakinduPackage.TRANSITION__TARGET, oldTarget, target)); | ||
76 | } | ||
77 | } | ||
78 | return target; | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | public Vertex basicGetTarget() { | ||
87 | return target; | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | public NotificationChain basicSetTarget(Vertex newTarget, NotificationChain msgs) { | ||
96 | Vertex oldTarget = target; | ||
97 | target = newTarget; | ||
98 | if (eNotificationRequired()) { | ||
99 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, yakinduPackage.TRANSITION__TARGET, oldTarget, newTarget); | ||
100 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
101 | } | ||
102 | return msgs; | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | public void setTarget(Vertex newTarget) { | ||
111 | if (newTarget != target) { | ||
112 | NotificationChain msgs = null; | ||
113 | if (target != null) | ||
114 | msgs = ((InternalEObject)target).eInverseRemove(this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); | ||
115 | if (newTarget != null) | ||
116 | msgs = ((InternalEObject)newTarget).eInverseAdd(this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); | ||
117 | msgs = basicSetTarget(newTarget, msgs); | ||
118 | if (msgs != null) msgs.dispatch(); | ||
119 | } | ||
120 | else if (eNotificationRequired()) | ||
121 | eNotify(new ENotificationImpl(this, Notification.SET, yakinduPackage.TRANSITION__TARGET, newTarget, newTarget)); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | public Vertex getSource() { | ||
130 | if (eContainerFeatureID() != yakinduPackage.TRANSITION__SOURCE) return null; | ||
131 | return (Vertex)eInternalContainer(); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | public NotificationChain basicSetSource(Vertex newSource, NotificationChain msgs) { | ||
140 | msgs = eBasicSetContainer((InternalEObject)newSource, yakinduPackage.TRANSITION__SOURCE, msgs); | ||
141 | return msgs; | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | public void setSource(Vertex newSource) { | ||
150 | if (newSource != eInternalContainer() || (eContainerFeatureID() != yakinduPackage.TRANSITION__SOURCE && newSource != null)) { | ||
151 | if (EcoreUtil.isAncestor(this, newSource)) | ||
152 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
153 | NotificationChain msgs = null; | ||
154 | if (eInternalContainer() != null) | ||
155 | msgs = eBasicRemoveFromContainer(msgs); | ||
156 | if (newSource != null) | ||
157 | msgs = ((InternalEObject)newSource).eInverseAdd(this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, Vertex.class, msgs); | ||
158 | msgs = basicSetSource(newSource, msgs); | ||
159 | if (msgs != null) msgs.dispatch(); | ||
160 | } | ||
161 | else if (eNotificationRequired()) | ||
162 | eNotify(new ENotificationImpl(this, Notification.SET, yakinduPackage.TRANSITION__SOURCE, newSource, newSource)); | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @generated | ||
169 | */ | ||
170 | @Override | ||
171 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
172 | switch (featureID) { | ||
173 | case yakinduPackage.TRANSITION__TARGET: | ||
174 | if (target != null) | ||
175 | msgs = ((InternalEObject)target).eInverseRemove(this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); | ||
176 | return basicSetTarget((Vertex)otherEnd, msgs); | ||
177 | case yakinduPackage.TRANSITION__SOURCE: | ||
178 | if (eInternalContainer() != null) | ||
179 | msgs = eBasicRemoveFromContainer(msgs); | ||
180 | return basicSetSource((Vertex)otherEnd, msgs); | ||
181 | } | ||
182 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @generated | ||
189 | */ | ||
190 | @Override | ||
191 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
192 | switch (featureID) { | ||
193 | case yakinduPackage.TRANSITION__TARGET: | ||
194 | return basicSetTarget(null, msgs); | ||
195 | case yakinduPackage.TRANSITION__SOURCE: | ||
196 | return basicSetSource(null, msgs); | ||
197 | } | ||
198 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * <!-- begin-user-doc --> | ||
203 | * <!-- end-user-doc --> | ||
204 | * @generated | ||
205 | */ | ||
206 | @Override | ||
207 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
208 | switch (eContainerFeatureID()) { | ||
209 | case yakinduPackage.TRANSITION__SOURCE: | ||
210 | return eInternalContainer().eInverseRemove(this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, Vertex.class, msgs); | ||
211 | } | ||
212 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * <!-- begin-user-doc --> | ||
217 | * <!-- end-user-doc --> | ||
218 | * @generated | ||
219 | */ | ||
220 | @Override | ||
221 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
222 | switch (featureID) { | ||
223 | case yakinduPackage.TRANSITION__TARGET: | ||
224 | if (resolve) return getTarget(); | ||
225 | return basicGetTarget(); | ||
226 | case yakinduPackage.TRANSITION__SOURCE: | ||
227 | return getSource(); | ||
228 | } | ||
229 | return super.eGet(featureID, resolve, coreType); | ||
230 | } | ||
231 | |||
232 | /** | ||
233 | * <!-- begin-user-doc --> | ||
234 | * <!-- end-user-doc --> | ||
235 | * @generated | ||
236 | */ | ||
237 | @Override | ||
238 | public void eSet(int featureID, Object newValue) { | ||
239 | switch (featureID) { | ||
240 | case yakinduPackage.TRANSITION__TARGET: | ||
241 | setTarget((Vertex)newValue); | ||
242 | return; | ||
243 | case yakinduPackage.TRANSITION__SOURCE: | ||
244 | setSource((Vertex)newValue); | ||
245 | return; | ||
246 | } | ||
247 | super.eSet(featureID, newValue); | ||
248 | } | ||
249 | |||
250 | /** | ||
251 | * <!-- begin-user-doc --> | ||
252 | * <!-- end-user-doc --> | ||
253 | * @generated | ||
254 | */ | ||
255 | @Override | ||
256 | public void eUnset(int featureID) { | ||
257 | switch (featureID) { | ||
258 | case yakinduPackage.TRANSITION__TARGET: | ||
259 | setTarget((Vertex)null); | ||
260 | return; | ||
261 | case yakinduPackage.TRANSITION__SOURCE: | ||
262 | setSource((Vertex)null); | ||
263 | return; | ||
264 | } | ||
265 | super.eUnset(featureID); | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | @Override | ||
274 | public boolean eIsSet(int featureID) { | ||
275 | switch (featureID) { | ||
276 | case yakinduPackage.TRANSITION__TARGET: | ||
277 | return target != null; | ||
278 | case yakinduPackage.TRANSITION__SOURCE: | ||
279 | return getSource() != null; | ||
280 | } | ||
281 | return super.eIsSet(featureID); | ||
282 | } | ||
283 | |||
284 | } //TransitionImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java new file mode 100644 index 00000000..6f5b9ed3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java | |||
@@ -0,0 +1,206 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
19 | |||
20 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
21 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
22 | import org.eclipse.emf.ecore.util.InternalEList; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model object '<em><b>Vertex</b></em>'. | ||
27 | * <!-- end-user-doc --> | ||
28 | * <p> | ||
29 | * The following features are implemented: | ||
30 | * </p> | ||
31 | * <ul> | ||
32 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl#getIncomingTransitions <em>Incoming Transitions</em>}</li> | ||
33 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl#getOutgoingTransitions <em>Outgoing Transitions</em>}</li> | ||
34 | * </ul> | ||
35 | * | ||
36 | * @generated | ||
37 | */ | ||
38 | public abstract class VertexImpl extends MinimalEObjectImpl.Container implements Vertex { | ||
39 | /** | ||
40 | * The cached value of the '{@link #getIncomingTransitions() <em>Incoming Transitions</em>}' reference list. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getIncomingTransitions() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected EList<Transition> incomingTransitions; | ||
48 | |||
49 | /** | ||
50 | * The cached value of the '{@link #getOutgoingTransitions() <em>Outgoing Transitions</em>}' containment reference list. | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @see #getOutgoingTransitions() | ||
54 | * @generated | ||
55 | * @ordered | ||
56 | */ | ||
57 | protected EList<Transition> outgoingTransitions; | ||
58 | |||
59 | /** | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @generated | ||
63 | */ | ||
64 | protected VertexImpl() { | ||
65 | super(); | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @generated | ||
72 | */ | ||
73 | @Override | ||
74 | protected EClass eStaticClass() { | ||
75 | return yakinduPackage.Literals.VERTEX; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public EList<Transition> getIncomingTransitions() { | ||
84 | if (incomingTransitions == null) { | ||
85 | incomingTransitions = new EObjectWithInverseResolvingEList<Transition>(Transition.class, this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, yakinduPackage.TRANSITION__TARGET); | ||
86 | } | ||
87 | return incomingTransitions; | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | public EList<Transition> getOutgoingTransitions() { | ||
96 | if (outgoingTransitions == null) { | ||
97 | outgoingTransitions = new EObjectContainmentWithInverseEList<Transition>(Transition.class, this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, yakinduPackage.TRANSITION__SOURCE); | ||
98 | } | ||
99 | return outgoingTransitions; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @generated | ||
106 | */ | ||
107 | @SuppressWarnings("unchecked") | ||
108 | @Override | ||
109 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
110 | switch (featureID) { | ||
111 | case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: | ||
112 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getIncomingTransitions()).basicAdd(otherEnd, msgs); | ||
113 | case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: | ||
114 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getOutgoingTransitions()).basicAdd(otherEnd, msgs); | ||
115 | } | ||
116 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
126 | switch (featureID) { | ||
127 | case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: | ||
128 | return ((InternalEList<?>)getIncomingTransitions()).basicRemove(otherEnd, msgs); | ||
129 | case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: | ||
130 | return ((InternalEList<?>)getOutgoingTransitions()).basicRemove(otherEnd, msgs); | ||
131 | } | ||
132 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | @Override | ||
141 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
142 | switch (featureID) { | ||
143 | case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: | ||
144 | return getIncomingTransitions(); | ||
145 | case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: | ||
146 | return getOutgoingTransitions(); | ||
147 | } | ||
148 | return super.eGet(featureID, resolve, coreType); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | @SuppressWarnings("unchecked") | ||
157 | @Override | ||
158 | public void eSet(int featureID, Object newValue) { | ||
159 | switch (featureID) { | ||
160 | case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: | ||
161 | getIncomingTransitions().clear(); | ||
162 | getIncomingTransitions().addAll((Collection<? extends Transition>)newValue); | ||
163 | return; | ||
164 | case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: | ||
165 | getOutgoingTransitions().clear(); | ||
166 | getOutgoingTransitions().addAll((Collection<? extends Transition>)newValue); | ||
167 | return; | ||
168 | } | ||
169 | super.eSet(featureID, newValue); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @generated | ||
176 | */ | ||
177 | @Override | ||
178 | public void eUnset(int featureID) { | ||
179 | switch (featureID) { | ||
180 | case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: | ||
181 | getIncomingTransitions().clear(); | ||
182 | return; | ||
183 | case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: | ||
184 | getOutgoingTransitions().clear(); | ||
185 | return; | ||
186 | } | ||
187 | super.eUnset(featureID); | ||
188 | } | ||
189 | |||
190 | /** | ||
191 | * <!-- begin-user-doc --> | ||
192 | * <!-- end-user-doc --> | ||
193 | * @generated | ||
194 | */ | ||
195 | @Override | ||
196 | public boolean eIsSet(int featureID) { | ||
197 | switch (featureID) { | ||
198 | case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: | ||
199 | return incomingTransitions != null && !incomingTransitions.isEmpty(); | ||
200 | case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: | ||
201 | return outgoingTransitions != null && !outgoingTransitions.isEmpty(); | ||
202 | } | ||
203 | return super.eIsSet(featureID); | ||
204 | } | ||
205 | |||
206 | } //VertexImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java new file mode 100644 index 00000000..5d004565 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java | |||
@@ -0,0 +1,183 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
12 | |||
13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model <b>Factory</b>. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @generated | ||
20 | */ | ||
21 | public class yakinduFactoryImpl extends EFactoryImpl implements yakinduFactory { | ||
22 | /** | ||
23 | * Creates the default factory implementation. | ||
24 | * <!-- begin-user-doc --> | ||
25 | * <!-- end-user-doc --> | ||
26 | * @generated | ||
27 | */ | ||
28 | public static yakinduFactory init() { | ||
29 | try { | ||
30 | yakinduFactory theyakinduFactory = (yakinduFactory)EPackage.Registry.INSTANCE.getEFactory(yakinduPackage.eNS_URI); | ||
31 | if (theyakinduFactory != null) { | ||
32 | return theyakinduFactory; | ||
33 | } | ||
34 | } | ||
35 | catch (Exception exception) { | ||
36 | EcorePlugin.INSTANCE.log(exception); | ||
37 | } | ||
38 | return new yakinduFactoryImpl(); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * Creates an instance of the factory. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | public yakinduFactoryImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | public EObject create(EClass eClass) { | ||
58 | switch (eClass.getClassifierID()) { | ||
59 | case yakinduPackage.REGION: return createRegion(); | ||
60 | case yakinduPackage.TRANSITION: return createTransition(); | ||
61 | case yakinduPackage.STATECHART: return createStatechart(); | ||
62 | case yakinduPackage.ENTRY: return createEntry(); | ||
63 | case yakinduPackage.SYNCHRONIZATION: return createSynchronization(); | ||
64 | case yakinduPackage.STATE: return createState(); | ||
65 | case yakinduPackage.CHOICE: return createChoice(); | ||
66 | case yakinduPackage.EXIT: return createExit(); | ||
67 | case yakinduPackage.FINAL_STATE: return createFinalState(); | ||
68 | default: | ||
69 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
70 | } | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | public Region createRegion() { | ||
79 | RegionImpl region = new RegionImpl(); | ||
80 | return region; | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @generated | ||
87 | */ | ||
88 | public Transition createTransition() { | ||
89 | TransitionImpl transition = new TransitionImpl(); | ||
90 | return transition; | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | public Statechart createStatechart() { | ||
99 | StatechartImpl statechart = new StatechartImpl(); | ||
100 | return statechart; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public Entry createEntry() { | ||
109 | EntryImpl entry = new EntryImpl(); | ||
110 | return entry; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public Synchronization createSynchronization() { | ||
119 | SynchronizationImpl synchronization = new SynchronizationImpl(); | ||
120 | return synchronization; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | public State createState() { | ||
129 | StateImpl state = new StateImpl(); | ||
130 | return state; | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | public Choice createChoice() { | ||
139 | ChoiceImpl choice = new ChoiceImpl(); | ||
140 | return choice; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | public Exit createExit() { | ||
149 | ExitImpl exit = new ExitImpl(); | ||
150 | return exit; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | public FinalState createFinalState() { | ||
159 | FinalStateImpl finalState = new FinalStateImpl(); | ||
160 | return finalState; | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | public yakinduPackage getyakinduPackage() { | ||
169 | return (yakinduPackage)getEPackage(); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @deprecated | ||
176 | * @generated | ||
177 | */ | ||
178 | @Deprecated | ||
179 | public static yakinduPackage getPackage() { | ||
180 | return yakinduPackage.eINSTANCE; | ||
181 | } | ||
182 | |||
183 | } //yakinduFactoryImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java new file mode 100644 index 00000000..2213e07f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java | |||
@@ -0,0 +1,494 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry; | ||
8 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit; | ||
9 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState; | ||
10 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate; | ||
11 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; | ||
12 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState; | ||
13 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State; | ||
14 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart; | ||
15 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization; | ||
16 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; | ||
17 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; | ||
18 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduFactory; | ||
19 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
20 | |||
21 | import org.eclipse.emf.ecore.EClass; | ||
22 | import org.eclipse.emf.ecore.EPackage; | ||
23 | import org.eclipse.emf.ecore.EReference; | ||
24 | |||
25 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * An implementation of the model <b>Package</b>. | ||
30 | * <!-- end-user-doc --> | ||
31 | * @generated | ||
32 | */ | ||
33 | public class yakinduPackageImpl extends EPackageImpl implements yakinduPackage { | ||
34 | /** | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @generated | ||
38 | */ | ||
39 | private EClass pseudostateEClass = null; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | private EClass vertexEClass = null; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | private EClass regionEClass = null; | ||
54 | |||
55 | /** | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @generated | ||
59 | */ | ||
60 | private EClass transitionEClass = null; | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | private EClass statechartEClass = null; | ||
68 | |||
69 | /** | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @generated | ||
73 | */ | ||
74 | private EClass entryEClass = null; | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | private EClass synchronizationEClass = null; | ||
82 | |||
83 | /** | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @generated | ||
87 | */ | ||
88 | private EClass stateEClass = null; | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | private EClass regularStateEClass = null; | ||
96 | |||
97 | /** | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | private EClass compositeElementEClass = null; | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | private EClass choiceEClass = null; | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | private EClass exitEClass = null; | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | private EClass finalStateEClass = null; | ||
124 | |||
125 | /** | ||
126 | * Creates an instance of the model <b>Package</b>, registered with | ||
127 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
128 | * package URI value. | ||
129 | * <p>Note: the correct way to create the package is via the static | ||
130 | * factory method {@link #init init()}, which also performs | ||
131 | * initialization of the package, or returns the registered package, | ||
132 | * if one already exists. | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
136 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#eNS_URI | ||
137 | * @see #init() | ||
138 | * @generated | ||
139 | */ | ||
140 | private yakinduPackageImpl() { | ||
141 | super(eNS_URI, yakinduFactory.eINSTANCE); | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | private static boolean isInited = false; | ||
150 | |||
151 | /** | ||
152 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
153 | * | ||
154 | * <p>This method is used to initialize {@link yakinduPackage#eINSTANCE} when that field is accessed. | ||
155 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @see #eNS_URI | ||
159 | * @see #createPackageContents() | ||
160 | * @see #initializePackageContents() | ||
161 | * @generated | ||
162 | */ | ||
163 | public static yakinduPackage init() { | ||
164 | if (isInited) return (yakinduPackage)EPackage.Registry.INSTANCE.getEPackage(yakinduPackage.eNS_URI); | ||
165 | |||
166 | // Obtain or create and register package | ||
167 | yakinduPackageImpl theyakinduPackage = (yakinduPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof yakinduPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new yakinduPackageImpl()); | ||
168 | |||
169 | isInited = true; | ||
170 | |||
171 | // Create package meta-data objects | ||
172 | theyakinduPackage.createPackageContents(); | ||
173 | |||
174 | // Initialize created meta-data | ||
175 | theyakinduPackage.initializePackageContents(); | ||
176 | |||
177 | // Mark meta-data to indicate it can't be changed | ||
178 | theyakinduPackage.freeze(); | ||
179 | |||
180 | |||
181 | // Update the registry and return the package | ||
182 | EPackage.Registry.INSTANCE.put(yakinduPackage.eNS_URI, theyakinduPackage); | ||
183 | return theyakinduPackage; | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @generated | ||
190 | */ | ||
191 | public EClass getPseudostate() { | ||
192 | return pseudostateEClass; | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | public EClass getVertex() { | ||
201 | return vertexEClass; | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * <!-- begin-user-doc --> | ||
206 | * <!-- end-user-doc --> | ||
207 | * @generated | ||
208 | */ | ||
209 | public EReference getVertex_IncomingTransitions() { | ||
210 | return (EReference)vertexEClass.getEStructuralFeatures().get(0); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | public EReference getVertex_OutgoingTransitions() { | ||
219 | return (EReference)vertexEClass.getEStructuralFeatures().get(1); | ||
220 | } | ||
221 | |||
222 | /** | ||
223 | * <!-- begin-user-doc --> | ||
224 | * <!-- end-user-doc --> | ||
225 | * @generated | ||
226 | */ | ||
227 | public EClass getRegion() { | ||
228 | return regionEClass; | ||
229 | } | ||
230 | |||
231 | /** | ||
232 | * <!-- begin-user-doc --> | ||
233 | * <!-- end-user-doc --> | ||
234 | * @generated | ||
235 | */ | ||
236 | public EReference getRegion_Vertices() { | ||
237 | return (EReference)regionEClass.getEStructuralFeatures().get(0); | ||
238 | } | ||
239 | |||
240 | /** | ||
241 | * <!-- begin-user-doc --> | ||
242 | * <!-- end-user-doc --> | ||
243 | * @generated | ||
244 | */ | ||
245 | public EClass getTransition() { | ||
246 | return transitionEClass; | ||
247 | } | ||
248 | |||
249 | /** | ||
250 | * <!-- begin-user-doc --> | ||
251 | * <!-- end-user-doc --> | ||
252 | * @generated | ||
253 | */ | ||
254 | public EReference getTransition_Target() { | ||
255 | return (EReference)transitionEClass.getEStructuralFeatures().get(0); | ||
256 | } | ||
257 | |||
258 | /** | ||
259 | * <!-- begin-user-doc --> | ||
260 | * <!-- end-user-doc --> | ||
261 | * @generated | ||
262 | */ | ||
263 | public EReference getTransition_Source() { | ||
264 | return (EReference)transitionEClass.getEStructuralFeatures().get(1); | ||
265 | } | ||
266 | |||
267 | /** | ||
268 | * <!-- begin-user-doc --> | ||
269 | * <!-- end-user-doc --> | ||
270 | * @generated | ||
271 | */ | ||
272 | public EClass getStatechart() { | ||
273 | return statechartEClass; | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * <!-- begin-user-doc --> | ||
278 | * <!-- end-user-doc --> | ||
279 | * @generated | ||
280 | */ | ||
281 | public EClass getEntry() { | ||
282 | return entryEClass; | ||
283 | } | ||
284 | |||
285 | /** | ||
286 | * <!-- begin-user-doc --> | ||
287 | * <!-- end-user-doc --> | ||
288 | * @generated | ||
289 | */ | ||
290 | public EClass getSynchronization() { | ||
291 | return synchronizationEClass; | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * <!-- begin-user-doc --> | ||
296 | * <!-- end-user-doc --> | ||
297 | * @generated | ||
298 | */ | ||
299 | public EClass getState() { | ||
300 | return stateEClass; | ||
301 | } | ||
302 | |||
303 | /** | ||
304 | * <!-- begin-user-doc --> | ||
305 | * <!-- end-user-doc --> | ||
306 | * @generated | ||
307 | */ | ||
308 | public EClass getRegularState() { | ||
309 | return regularStateEClass; | ||
310 | } | ||
311 | |||
312 | /** | ||
313 | * <!-- begin-user-doc --> | ||
314 | * <!-- end-user-doc --> | ||
315 | * @generated | ||
316 | */ | ||
317 | public EClass getCompositeElement() { | ||
318 | return compositeElementEClass; | ||
319 | } | ||
320 | |||
321 | /** | ||
322 | * <!-- begin-user-doc --> | ||
323 | * <!-- end-user-doc --> | ||
324 | * @generated | ||
325 | */ | ||
326 | public EReference getCompositeElement_Regions() { | ||
327 | return (EReference)compositeElementEClass.getEStructuralFeatures().get(0); | ||
328 | } | ||
329 | |||
330 | /** | ||
331 | * <!-- begin-user-doc --> | ||
332 | * <!-- end-user-doc --> | ||
333 | * @generated | ||
334 | */ | ||
335 | public EClass getChoice() { | ||
336 | return choiceEClass; | ||
337 | } | ||
338 | |||
339 | /** | ||
340 | * <!-- begin-user-doc --> | ||
341 | * <!-- end-user-doc --> | ||
342 | * @generated | ||
343 | */ | ||
344 | public EClass getExit() { | ||
345 | return exitEClass; | ||
346 | } | ||
347 | |||
348 | /** | ||
349 | * <!-- begin-user-doc --> | ||
350 | * <!-- end-user-doc --> | ||
351 | * @generated | ||
352 | */ | ||
353 | public EClass getFinalState() { | ||
354 | return finalStateEClass; | ||
355 | } | ||
356 | |||
357 | /** | ||
358 | * <!-- begin-user-doc --> | ||
359 | * <!-- end-user-doc --> | ||
360 | * @generated | ||
361 | */ | ||
362 | public yakinduFactory getyakinduFactory() { | ||
363 | return (yakinduFactory)getEFactoryInstance(); | ||
364 | } | ||
365 | |||
366 | /** | ||
367 | * <!-- begin-user-doc --> | ||
368 | * <!-- end-user-doc --> | ||
369 | * @generated | ||
370 | */ | ||
371 | private boolean isCreated = false; | ||
372 | |||
373 | /** | ||
374 | * Creates the meta-model objects for the package. This method is | ||
375 | * guarded to have no affect on any invocation but its first. | ||
376 | * <!-- begin-user-doc --> | ||
377 | * <!-- end-user-doc --> | ||
378 | * @generated | ||
379 | */ | ||
380 | public void createPackageContents() { | ||
381 | if (isCreated) return; | ||
382 | isCreated = true; | ||
383 | |||
384 | // Create classes and their features | ||
385 | pseudostateEClass = createEClass(PSEUDOSTATE); | ||
386 | |||
387 | vertexEClass = createEClass(VERTEX); | ||
388 | createEReference(vertexEClass, VERTEX__INCOMING_TRANSITIONS); | ||
389 | createEReference(vertexEClass, VERTEX__OUTGOING_TRANSITIONS); | ||
390 | |||
391 | regionEClass = createEClass(REGION); | ||
392 | createEReference(regionEClass, REGION__VERTICES); | ||
393 | |||
394 | transitionEClass = createEClass(TRANSITION); | ||
395 | createEReference(transitionEClass, TRANSITION__TARGET); | ||
396 | createEReference(transitionEClass, TRANSITION__SOURCE); | ||
397 | |||
398 | statechartEClass = createEClass(STATECHART); | ||
399 | |||
400 | entryEClass = createEClass(ENTRY); | ||
401 | |||
402 | synchronizationEClass = createEClass(SYNCHRONIZATION); | ||
403 | |||
404 | stateEClass = createEClass(STATE); | ||
405 | |||
406 | regularStateEClass = createEClass(REGULAR_STATE); | ||
407 | |||
408 | compositeElementEClass = createEClass(COMPOSITE_ELEMENT); | ||
409 | createEReference(compositeElementEClass, COMPOSITE_ELEMENT__REGIONS); | ||
410 | |||
411 | choiceEClass = createEClass(CHOICE); | ||
412 | |||
413 | exitEClass = createEClass(EXIT); | ||
414 | |||
415 | finalStateEClass = createEClass(FINAL_STATE); | ||
416 | } | ||
417 | |||
418 | /** | ||
419 | * <!-- begin-user-doc --> | ||
420 | * <!-- end-user-doc --> | ||
421 | * @generated | ||
422 | */ | ||
423 | private boolean isInitialized = false; | ||
424 | |||
425 | /** | ||
426 | * Complete the initialization of the package and its meta-model. This | ||
427 | * method is guarded to have no affect on any invocation but its first. | ||
428 | * <!-- begin-user-doc --> | ||
429 | * <!-- end-user-doc --> | ||
430 | * @generated | ||
431 | */ | ||
432 | public void initializePackageContents() { | ||
433 | if (isInitialized) return; | ||
434 | isInitialized = true; | ||
435 | |||
436 | // Initialize package | ||
437 | setName(eNAME); | ||
438 | setNsPrefix(eNS_PREFIX); | ||
439 | setNsURI(eNS_URI); | ||
440 | |||
441 | // Create type parameters | ||
442 | |||
443 | // Set bounds for type parameters | ||
444 | |||
445 | // Add supertypes to classes | ||
446 | pseudostateEClass.getESuperTypes().add(this.getVertex()); | ||
447 | statechartEClass.getESuperTypes().add(this.getCompositeElement()); | ||
448 | entryEClass.getESuperTypes().add(this.getPseudostate()); | ||
449 | synchronizationEClass.getESuperTypes().add(this.getPseudostate()); | ||
450 | stateEClass.getESuperTypes().add(this.getRegularState()); | ||
451 | stateEClass.getESuperTypes().add(this.getCompositeElement()); | ||
452 | regularStateEClass.getESuperTypes().add(this.getVertex()); | ||
453 | choiceEClass.getESuperTypes().add(this.getPseudostate()); | ||
454 | exitEClass.getESuperTypes().add(this.getPseudostate()); | ||
455 | finalStateEClass.getESuperTypes().add(this.getRegularState()); | ||
456 | |||
457 | // Initialize classes, features, and operations; add parameters | ||
458 | initEClass(pseudostateEClass, Pseudostate.class, "Pseudostate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
459 | |||
460 | initEClass(vertexEClass, Vertex.class, "Vertex", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
461 | initEReference(getVertex_IncomingTransitions(), this.getTransition(), this.getTransition_Target(), "incomingTransitions", null, 0, -1, Vertex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); | ||
462 | initEReference(getVertex_OutgoingTransitions(), this.getTransition(), this.getTransition_Source(), "outgoingTransitions", null, 0, -1, Vertex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); | ||
463 | |||
464 | initEClass(regionEClass, Region.class, "Region", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
465 | initEReference(getRegion_Vertices(), this.getVertex(), null, "vertices", null, 0, -1, Region.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); | ||
466 | |||
467 | initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
468 | initEReference(getTransition_Target(), this.getVertex(), this.getVertex_IncomingTransitions(), "target", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); | ||
469 | initEReference(getTransition_Source(), this.getVertex(), this.getVertex_OutgoingTransitions(), "source", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); | ||
470 | |||
471 | initEClass(statechartEClass, Statechart.class, "Statechart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
472 | |||
473 | initEClass(entryEClass, Entry.class, "Entry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
474 | |||
475 | initEClass(synchronizationEClass, Synchronization.class, "Synchronization", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
476 | |||
477 | initEClass(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
478 | |||
479 | initEClass(regularStateEClass, RegularState.class, "RegularState", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
480 | |||
481 | initEClass(compositeElementEClass, CompositeElement.class, "CompositeElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
482 | initEReference(getCompositeElement_Regions(), this.getRegion(), null, "regions", null, 0, -1, CompositeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
483 | |||
484 | initEClass(choiceEClass, Choice.class, "Choice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
485 | |||
486 | initEClass(exitEClass, Exit.class, "Exit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
487 | |||
488 | initEClass(finalStateEClass, FinalState.class, "FinalState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
489 | |||
490 | // Create resource | ||
491 | createResource(eNS_URI); | ||
492 | } | ||
493 | |||
494 | } //yakinduPackageImpl | ||