diff options
author | 2019-08-01 18:38:15 +0200 | |
---|---|---|
committer | 2019-08-01 18:38:15 +0200 | |
commit | 6eb760ee960cd3efe51ca6e4107153c09838a1da (patch) | |
tree | 2edd0e21be50265f65f0cfd2fd43f18a252aef02 /Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java | |
parent | Dump required Xbase version down to 2.17 (diff) | |
download | VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.tar.gz VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.tar.zst VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.zip |
Clean up CPS and Satellite domains
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java | 116 |
1 files changed, 111 insertions, 5 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java index cdfbd6de..21e385a8 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java | |||
@@ -2,11 +2,16 @@ | |||
2 | */ | 2 | */ |
3 | package satellite.impl; | 3 | package satellite.impl; |
4 | 4 | ||
5 | import java.util.Collection; | ||
5 | import org.eclipse.emf.common.notify.Notification; | 6 | import org.eclipse.emf.common.notify.Notification; |
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | import org.eclipse.emf.common.util.EList; | ||
6 | import org.eclipse.emf.ecore.EClass; | 9 | import org.eclipse.emf.ecore.EClass; |
7 | import org.eclipse.emf.ecore.InternalEObject; | 10 | import org.eclipse.emf.ecore.InternalEObject; |
8 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
9 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | 12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
13 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
14 | import org.eclipse.emf.ecore.util.InternalEList; | ||
10 | import satellite.CommSubsystem; | 15 | import satellite.CommSubsystem; |
11 | import satellite.SatellitePackage; | 16 | import satellite.SatellitePackage; |
12 | 17 | ||
@@ -19,6 +24,7 @@ import satellite.SatellitePackage; | |||
19 | * </p> | 24 | * </p> |
20 | * <ul> | 25 | * <ul> |
21 | * <li>{@link satellite.impl.CommSubsystemImpl#getTarget <em>Target</em>}</li> | 26 | * <li>{@link satellite.impl.CommSubsystemImpl#getTarget <em>Target</em>}</li> |
27 | * <li>{@link satellite.impl.CommSubsystemImpl#getSource <em>Source</em>}</li> | ||
22 | * </ul> | 28 | * </ul> |
23 | * | 29 | * |
24 | * @generated | 30 | * @generated |
@@ -35,6 +41,16 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
35 | protected CommSubsystem target; | 41 | protected CommSubsystem target; |
36 | 42 | ||
37 | /** | 43 | /** |
44 | * The cached value of the '{@link #getSource() <em>Source</em>}' reference list. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getSource() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected EList<CommSubsystem> source; | ||
52 | |||
53 | /** | ||
38 | * <!-- begin-user-doc --> | 54 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> | 55 | * <!-- end-user-doc --> |
40 | * @generated | 56 | * @generated |
@@ -86,13 +102,91 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
86 | * <!-- end-user-doc --> | 102 | * <!-- end-user-doc --> |
87 | * @generated | 103 | * @generated |
88 | */ | 104 | */ |
89 | @Override | 105 | public NotificationChain basicSetTarget(CommSubsystem newTarget, NotificationChain msgs) { |
90 | public void setTarget(CommSubsystem newTarget) { | ||
91 | CommSubsystem oldTarget = target; | 106 | CommSubsystem oldTarget = target; |
92 | target = newTarget; | 107 | target = newTarget; |
93 | if (eNotificationRequired()) | 108 | if (eNotificationRequired()) { |
94 | eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__TARGET, oldTarget, | 109 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, |
95 | target)); | 110 | SatellitePackage.COMM_SUBSYSTEM__TARGET, oldTarget, newTarget); |
111 | if (msgs == null) | ||
112 | msgs = notification; | ||
113 | else | ||
114 | msgs.add(notification); | ||
115 | } | ||
116 | return msgs; | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public void setTarget(CommSubsystem newTarget) { | ||
126 | if (newTarget != target) { | ||
127 | NotificationChain msgs = null; | ||
128 | if (target != null) | ||
129 | msgs = ((InternalEObject) target).eInverseRemove(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, | ||
130 | CommSubsystem.class, msgs); | ||
131 | if (newTarget != null) | ||
132 | msgs = ((InternalEObject) newTarget).eInverseAdd(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, | ||
133 | CommSubsystem.class, msgs); | ||
134 | msgs = basicSetTarget(newTarget, msgs); | ||
135 | if (msgs != null) | ||
136 | msgs.dispatch(); | ||
137 | } else if (eNotificationRequired()) | ||
138 | eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__TARGET, newTarget, | ||
139 | newTarget)); | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | @Override | ||
148 | public EList<CommSubsystem> getSource() { | ||
149 | if (source == null) { | ||
150 | source = new EObjectWithInverseResolvingEList<CommSubsystem>(CommSubsystem.class, this, | ||
151 | SatellitePackage.COMM_SUBSYSTEM__SOURCE, SatellitePackage.COMM_SUBSYSTEM__TARGET); | ||
152 | } | ||
153 | return source; | ||
154 | } | ||
155 | |||
156 | /** | ||
157 | * <!-- begin-user-doc --> | ||
158 | * <!-- end-user-doc --> | ||
159 | * @generated | ||
160 | */ | ||
161 | @SuppressWarnings("unchecked") | ||
162 | @Override | ||
163 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
164 | switch (featureID) { | ||
165 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | ||
166 | if (target != null) | ||
167 | msgs = ((InternalEObject) target).eInverseRemove(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, | ||
168 | CommSubsystem.class, msgs); | ||
169 | return basicSetTarget((CommSubsystem) otherEnd, msgs); | ||
170 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
171 | return ((InternalEList<InternalEObject>) (InternalEList<?>) getSource()).basicAdd(otherEnd, msgs); | ||
172 | } | ||
173 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
183 | switch (featureID) { | ||
184 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | ||
185 | return basicSetTarget(null, msgs); | ||
186 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
187 | return ((InternalEList<?>) getSource()).basicRemove(otherEnd, msgs); | ||
188 | } | ||
189 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
96 | } | 190 | } |
97 | 191 | ||
98 | /** | 192 | /** |
@@ -107,6 +201,8 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
107 | if (resolve) | 201 | if (resolve) |
108 | return getTarget(); | 202 | return getTarget(); |
109 | return basicGetTarget(); | 203 | return basicGetTarget(); |
204 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
205 | return getSource(); | ||
110 | } | 206 | } |
111 | return super.eGet(featureID, resolve, coreType); | 207 | return super.eGet(featureID, resolve, coreType); |
112 | } | 208 | } |
@@ -116,12 +212,17 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
116 | * <!-- end-user-doc --> | 212 | * <!-- end-user-doc --> |
117 | * @generated | 213 | * @generated |
118 | */ | 214 | */ |
215 | @SuppressWarnings("unchecked") | ||
119 | @Override | 216 | @Override |
120 | public void eSet(int featureID, Object newValue) { | 217 | public void eSet(int featureID, Object newValue) { |
121 | switch (featureID) { | 218 | switch (featureID) { |
122 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | 219 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: |
123 | setTarget((CommSubsystem) newValue); | 220 | setTarget((CommSubsystem) newValue); |
124 | return; | 221 | return; |
222 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
223 | getSource().clear(); | ||
224 | getSource().addAll((Collection<? extends CommSubsystem>) newValue); | ||
225 | return; | ||
125 | } | 226 | } |
126 | super.eSet(featureID, newValue); | 227 | super.eSet(featureID, newValue); |
127 | } | 228 | } |
@@ -137,6 +238,9 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
137 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | 238 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: |
138 | setTarget((CommSubsystem) null); | 239 | setTarget((CommSubsystem) null); |
139 | return; | 240 | return; |
241 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
242 | getSource().clear(); | ||
243 | return; | ||
140 | } | 244 | } |
141 | super.eUnset(featureID); | 245 | super.eUnset(featureID); |
142 | } | 246 | } |
@@ -151,6 +255,8 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
151 | switch (featureID) { | 255 | switch (featureID) { |
152 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | 256 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: |
153 | return target != null; | 257 | return target != null; |
258 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
259 | return source != null && !source.isEmpty(); | ||
154 | } | 260 | } |
155 | return super.eIsSet(featureID); | 261 | return super.eIsSet(featureID); |
156 | } | 262 | } |