diff options
author | 2021-06-26 21:43:55 +0200 | |
---|---|---|
committer | 2021-06-26 21:43:55 +0200 | |
commit | e92ebe4a61a106ff9c0e8f5bbbc3632f1dc60009 (patch) | |
tree | 29ae119d1e17ace16115a82eef60b5b0bd886aba /org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java | |
parent | Add initial prototype (diff) | |
download | refinery-e92ebe4a61a106ff9c0e8f5bbbc3632f1dc60009.tar.gz refinery-e92ebe4a61a106ff9c0e8f5bbbc3632f1dc60009.tar.zst refinery-e92ebe4a61a106ff9c0e8f5bbbc3632f1dc60009.zip |
FIx scoping, extend grammar
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java index 4571db14..d70fe90b 100644 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AtomImpl.java | |||
@@ -6,6 +6,7 @@ import java.util.Collection; | |||
6 | 6 | ||
7 | import org.eclipse.emf.common.notify.Notification; | 7 | import org.eclipse.emf.common.notify.Notification; |
8 | 8 | ||
9 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | import org.eclipse.emf.common.util.EList; | 10 | import org.eclipse.emf.common.util.EList; |
10 | 11 | ||
11 | import org.eclipse.emf.ecore.EClass; | 12 | import org.eclipse.emf.ecore.EClass; |
@@ -13,12 +14,12 @@ import org.eclipse.emf.ecore.InternalEObject; | |||
13 | 14 | ||
14 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
15 | 16 | ||
16 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | 17 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
17 | 18 | import org.eclipse.emf.ecore.util.InternalEList; | |
19 | import org.eclipse.viatra.solver.language.model.problem.Argument; | ||
18 | import org.eclipse.viatra.solver.language.model.problem.Atom; | 20 | import org.eclipse.viatra.solver.language.model.problem.Atom; |
19 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | 21 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; |
20 | import org.eclipse.viatra.solver.language.model.problem.Relation; | 22 | import org.eclipse.viatra.solver.language.model.problem.Relation; |
21 | import org.eclipse.viatra.solver.language.model.problem.Variable; | ||
22 | 23 | ||
23 | /** | 24 | /** |
24 | * <!-- begin-user-doc --> | 25 | * <!-- begin-user-doc --> |
@@ -29,8 +30,8 @@ import org.eclipse.viatra.solver.language.model.problem.Variable; | |||
29 | * </p> | 30 | * </p> |
30 | * <ul> | 31 | * <ul> |
31 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#getRelation <em>Relation</em>}</li> | 32 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#getRelation <em>Relation</em>}</li> |
32 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#getArguments <em>Arguments</em>}</li> | ||
33 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#isTransitiveClosure <em>Transitive Closure</em>}</li> | 33 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#isTransitiveClosure <em>Transitive Closure</em>}</li> |
34 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AtomImpl#getArguments <em>Arguments</em>}</li> | ||
34 | * </ul> | 35 | * </ul> |
35 | * | 36 | * |
36 | * @generated | 37 | * @generated |
@@ -47,34 +48,34 @@ public class AtomImpl extends LiteralImpl implements Atom { | |||
47 | protected Relation relation; | 48 | protected Relation relation; |
48 | 49 | ||
49 | /** | 50 | /** |
50 | * The cached value of the '{@link #getArguments() <em>Arguments</em>}' reference list. | 51 | * The default value of the '{@link #isTransitiveClosure() <em>Transitive Closure</em>}' attribute. |
51 | * <!-- begin-user-doc --> | 52 | * <!-- begin-user-doc --> |
52 | * <!-- end-user-doc --> | 53 | * <!-- end-user-doc --> |
53 | * @see #getArguments() | 54 | * @see #isTransitiveClosure() |
54 | * @generated | 55 | * @generated |
55 | * @ordered | 56 | * @ordered |
56 | */ | 57 | */ |
57 | protected EList<Variable> arguments; | 58 | protected static final boolean TRANSITIVE_CLOSURE_EDEFAULT = false; |
58 | 59 | ||
59 | /** | 60 | /** |
60 | * The default value of the '{@link #isTransitiveClosure() <em>Transitive Closure</em>}' attribute. | 61 | * The cached value of the '{@link #isTransitiveClosure() <em>Transitive Closure</em>}' attribute. |
61 | * <!-- begin-user-doc --> | 62 | * <!-- begin-user-doc --> |
62 | * <!-- end-user-doc --> | 63 | * <!-- end-user-doc --> |
63 | * @see #isTransitiveClosure() | 64 | * @see #isTransitiveClosure() |
64 | * @generated | 65 | * @generated |
65 | * @ordered | 66 | * @ordered |
66 | */ | 67 | */ |
67 | protected static final boolean TRANSITIVE_CLOSURE_EDEFAULT = false; | 68 | protected boolean transitiveClosure = TRANSITIVE_CLOSURE_EDEFAULT; |
68 | 69 | ||
69 | /** | 70 | /** |
70 | * The cached value of the '{@link #isTransitiveClosure() <em>Transitive Closure</em>}' attribute. | 71 | * The cached value of the '{@link #getArguments() <em>Arguments</em>}' containment reference list. |
71 | * <!-- begin-user-doc --> | 72 | * <!-- begin-user-doc --> |
72 | * <!-- end-user-doc --> | 73 | * <!-- end-user-doc --> |
73 | * @see #isTransitiveClosure() | 74 | * @see #getArguments() |
74 | * @generated | 75 | * @generated |
75 | * @ordered | 76 | * @ordered |
76 | */ | 77 | */ |
77 | protected boolean transitiveClosure = TRANSITIVE_CLOSURE_EDEFAULT; | 78 | protected EList<Argument> arguments; |
78 | 79 | ||
79 | /** | 80 | /** |
80 | * <!-- begin-user-doc --> | 81 | * <!-- begin-user-doc --> |
@@ -140,9 +141,9 @@ public class AtomImpl extends LiteralImpl implements Atom { | |||
140 | * <!-- end-user-doc --> | 141 | * <!-- end-user-doc --> |
141 | * @generated | 142 | * @generated |
142 | */ | 143 | */ |
143 | public EList<Variable> getArguments() { | 144 | public EList<Argument> getArguments() { |
144 | if (arguments == null) { | 145 | if (arguments == null) { |
145 | arguments = new EObjectResolvingEList<Variable>(Variable.class, this, ProblemPackage.ATOM__ARGUMENTS); | 146 | arguments = new EObjectContainmentEList<Argument>(Argument.class, this, ProblemPackage.ATOM__ARGUMENTS); |
146 | } | 147 | } |
147 | return arguments; | 148 | return arguments; |
148 | } | 149 | } |
@@ -175,16 +176,30 @@ public class AtomImpl extends LiteralImpl implements Atom { | |||
175 | * @generated | 176 | * @generated |
176 | */ | 177 | */ |
177 | @Override | 178 | @Override |
179 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
180 | switch (featureID) { | ||
181 | case ProblemPackage.ATOM__ARGUMENTS: | ||
182 | return ((InternalEList<?>) getArguments()).basicRemove(otherEnd, msgs); | ||
183 | } | ||
184 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
185 | } | ||
186 | |||
187 | /** | ||
188 | * <!-- begin-user-doc --> | ||
189 | * <!-- end-user-doc --> | ||
190 | * @generated | ||
191 | */ | ||
192 | @Override | ||
178 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 193 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
179 | switch (featureID) { | 194 | switch (featureID) { |
180 | case ProblemPackage.ATOM__RELATION: | 195 | case ProblemPackage.ATOM__RELATION: |
181 | if (resolve) | 196 | if (resolve) |
182 | return getRelation(); | 197 | return getRelation(); |
183 | return basicGetRelation(); | 198 | return basicGetRelation(); |
184 | case ProblemPackage.ATOM__ARGUMENTS: | ||
185 | return getArguments(); | ||
186 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: | 199 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: |
187 | return isTransitiveClosure(); | 200 | return isTransitiveClosure(); |
201 | case ProblemPackage.ATOM__ARGUMENTS: | ||
202 | return getArguments(); | ||
188 | } | 203 | } |
189 | return super.eGet(featureID, resolve, coreType); | 204 | return super.eGet(featureID, resolve, coreType); |
190 | } | 205 | } |
@@ -201,13 +216,13 @@ public class AtomImpl extends LiteralImpl implements Atom { | |||
201 | case ProblemPackage.ATOM__RELATION: | 216 | case ProblemPackage.ATOM__RELATION: |
202 | setRelation((Relation) newValue); | 217 | setRelation((Relation) newValue); |
203 | return; | 218 | return; |
204 | case ProblemPackage.ATOM__ARGUMENTS: | ||
205 | getArguments().clear(); | ||
206 | getArguments().addAll((Collection<? extends Variable>) newValue); | ||
207 | return; | ||
208 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: | 219 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: |
209 | setTransitiveClosure((Boolean) newValue); | 220 | setTransitiveClosure((Boolean) newValue); |
210 | return; | 221 | return; |
222 | case ProblemPackage.ATOM__ARGUMENTS: | ||
223 | getArguments().clear(); | ||
224 | getArguments().addAll((Collection<? extends Argument>) newValue); | ||
225 | return; | ||
211 | } | 226 | } |
212 | super.eSet(featureID, newValue); | 227 | super.eSet(featureID, newValue); |
213 | } | 228 | } |
@@ -223,12 +238,12 @@ public class AtomImpl extends LiteralImpl implements Atom { | |||
223 | case ProblemPackage.ATOM__RELATION: | 238 | case ProblemPackage.ATOM__RELATION: |
224 | setRelation((Relation) null); | 239 | setRelation((Relation) null); |
225 | return; | 240 | return; |
226 | case ProblemPackage.ATOM__ARGUMENTS: | ||
227 | getArguments().clear(); | ||
228 | return; | ||
229 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: | 241 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: |
230 | setTransitiveClosure(TRANSITIVE_CLOSURE_EDEFAULT); | 242 | setTransitiveClosure(TRANSITIVE_CLOSURE_EDEFAULT); |
231 | return; | 243 | return; |
244 | case ProblemPackage.ATOM__ARGUMENTS: | ||
245 | getArguments().clear(); | ||
246 | return; | ||
232 | } | 247 | } |
233 | super.eUnset(featureID); | 248 | super.eUnset(featureID); |
234 | } | 249 | } |
@@ -243,10 +258,10 @@ public class AtomImpl extends LiteralImpl implements Atom { | |||
243 | switch (featureID) { | 258 | switch (featureID) { |
244 | case ProblemPackage.ATOM__RELATION: | 259 | case ProblemPackage.ATOM__RELATION: |
245 | return relation != null; | 260 | return relation != null; |
246 | case ProblemPackage.ATOM__ARGUMENTS: | ||
247 | return arguments != null && !arguments.isEmpty(); | ||
248 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: | 261 | case ProblemPackage.ATOM__TRANSITIVE_CLOSURE: |
249 | return transitiveClosure != TRANSITIVE_CLOSURE_EDEFAULT; | 262 | return transitiveClosure != TRANSITIVE_CLOSURE_EDEFAULT; |
263 | case ProblemPackage.ATOM__ARGUMENTS: | ||
264 | return arguments != null && !arguments.isEmpty(); | ||
250 | } | 265 | } |
251 | return super.eIsSet(featureID); | 266 | return super.eIsSet(featureID); |
252 | } | 267 | } |