From b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 19 May 2020 21:18:06 +0200 Subject: Config language WIP --- .../language/solverLanguage/impl/CaseImpl.java | 246 +++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java') diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java new file mode 100644 index 00000000..d6905f3b --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CaseImpl.java @@ -0,0 +1,246 @@ +/** + * generated by Xtext 2.21.0 + */ +package org.eclipse.viatra.solver.language.solverLanguage.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.solverLanguage.Case; +import org.eclipse.viatra.solver.language.solverLanguage.Expression; +import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; + +/** + * + * An implementation of the model object 'Case'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class CaseImpl extends ExpressionImpl implements Case { + /** + * The cached value of the '{@link #getBody() Body}' containment reference. + * + * + * @see #getBody() + * @generated + * @ordered + */ + protected Expression body; + + /** + * The cached value of the '{@link #getCondition() Condition}' containment reference. + * + * + * @see #getCondition() + * @generated + * @ordered + */ + protected Expression condition; + + /** + * + * + * @generated + */ + protected CaseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SolverLanguagePackage.Literals.CASE; + } + + /** + * + * + * @generated + */ + @Override + public Expression getBody() { + return body; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { + Expression oldBody = body; + body = newBody; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__BODY, oldBody, newBody); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setBody(Expression newBody) { + if (newBody != body) { + NotificationChain msgs = null; + if (body != null) + msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__BODY, null, msgs); + if (newBody != null) + msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__BODY, null, msgs); + msgs = basicSetBody(newBody, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__BODY, newBody, newBody)); + } + + /** + * + * + * @generated + */ + @Override + public Expression getCondition() { + return condition; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCondition(Expression newCondition, NotificationChain msgs) { + Expression oldCondition = condition; + condition = newCondition; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__CONDITION, oldCondition, newCondition); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setCondition(Expression newCondition) { + if (newCondition != condition) { + NotificationChain msgs = null; + if (condition != null) + msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__CONDITION, null, msgs); + if (newCondition != null) + msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CASE__CONDITION, null, msgs); + msgs = basicSetCondition(newCondition, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CASE__CONDITION, newCondition, newCondition)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SolverLanguagePackage.CASE__BODY: + return basicSetBody(null, msgs); + case SolverLanguagePackage.CASE__CONDITION: + return basicSetCondition(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SolverLanguagePackage.CASE__BODY: + return getBody(); + case SolverLanguagePackage.CASE__CONDITION: + return getCondition(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SolverLanguagePackage.CASE__BODY: + setBody((Expression)newValue); + return; + case SolverLanguagePackage.CASE__CONDITION: + setCondition((Expression)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SolverLanguagePackage.CASE__BODY: + setBody((Expression)null); + return; + case SolverLanguagePackage.CASE__CONDITION: + setCondition((Expression)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SolverLanguagePackage.CASE__BODY: + return body != null; + case SolverLanguagePackage.CASE__CONDITION: + return condition != null; + } + return super.eIsSet(featureID); + } + +} //CaseImpl -- cgit v1.2.3-54-g00ecf