diff options
author | 2020-06-07 20:19:26 -0400 | |
---|---|---|
committer | 2020-06-07 20:19:26 -0400 | |
commit | adddfa282a0fe78bfdc5ffb967996d89293aa45c (patch) | |
tree | ef9b3dbed5bd4fa850d890a67b4c7ee3c1648782 /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java | |
parent | VAMPIRE: Rebase on Master (diff) | |
parent | VAMPIRE: Rebase on Master (diff) | |
download | VIATRA-Generator-adddfa282a0fe78bfdc5ffb967996d89293aa45c.tar.gz VIATRA-Generator-adddfa282a0fe78bfdc5ffb967996d89293aa45c.tar.zst VIATRA-Generator-adddfa282a0fe78bfdc5ffb967996d89293aa45c.zip |
Merge branch 'Vampire-New' into Vampire-New
Conflicts:
Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java
Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore
Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/ContentInNotLive.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/DirectSupertype.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Live.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/LoopInInheritence.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/NonSymmetricOpposite.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Opposite.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/OppositeDifferentClass.java
Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/PatternContent.java
Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF
Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF
Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeScopeMapping.xtend
Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/META-INF/MANIFEST.MF
Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Entry.java
Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Synchronization.java
Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java
Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java | 284 |
1 files changed, 284 insertions, 0 deletions
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..dfbca048 --- /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 | ||