From 419e76265ecbdf65e960e0624be006d31ed1e191 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 8 May 2020 18:28:19 +0200 Subject: Update solver language grammar First version, still needs TokenSource and Linker to work. --- .../solverLanguage/impl/TypedArgumentImpl.java | 242 +++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypedArgumentImpl.java (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypedArgumentImpl.java') diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypedArgumentImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypedArgumentImpl.java new file mode 100644 index 00000000..2d93f402 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypedArgumentImpl.java @@ -0,0 +1,242 @@ +/** + * 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.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.solverLanguage.NamedElement; +import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; +import org.eclipse.viatra.solver.language.solverLanguage.TypedArgument; + +/** + * + * An implementation of the model object 'Typed Argument'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class TypedArgumentImpl extends ArgumentImpl implements TypedArgument +{ + /** + * The cached value of the '{@link #getType() Type}' reference. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected NamedElement type; + + /** + * The cached value of the '{@link #getVariable() Variable}' reference. + * + * + * @see #getVariable() + * @generated + * @ordered + */ + protected NamedElement variable; + + /** + * + * + * @generated + */ + protected TypedArgumentImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return SolverLanguagePackage.Literals.TYPED_ARGUMENT; + } + + /** + * + * + * @generated + */ + @Override + public NamedElement getType() + { + if (type != null && type.eIsProxy()) + { + InternalEObject oldType = (InternalEObject)type; + type = (NamedElement)eResolveProxy(oldType); + if (type != oldType) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.TYPED_ARGUMENT__TYPE, oldType, type)); + } + } + return type; + } + + /** + * + * + * @generated + */ + public NamedElement basicGetType() + { + return type; + } + + /** + * + * + * @generated + */ + @Override + public void setType(NamedElement newType) + { + NamedElement oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.TYPED_ARGUMENT__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public NamedElement getVariable() + { + if (variable != null && variable.eIsProxy()) + { + InternalEObject oldVariable = (InternalEObject)variable; + variable = (NamedElement)eResolveProxy(oldVariable); + if (variable != oldVariable) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.TYPED_ARGUMENT__VARIABLE, oldVariable, variable)); + } + } + return variable; + } + + /** + * + * + * @generated + */ + public NamedElement basicGetVariable() + { + return variable; + } + + /** + * + * + * @generated + */ + @Override + public void setVariable(NamedElement newVariable) + { + NamedElement oldVariable = variable; + variable = newVariable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.TYPED_ARGUMENT__VARIABLE, oldVariable, variable)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case SolverLanguagePackage.TYPED_ARGUMENT__TYPE: + if (resolve) return getType(); + return basicGetType(); + case SolverLanguagePackage.TYPED_ARGUMENT__VARIABLE: + if (resolve) return getVariable(); + return basicGetVariable(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case SolverLanguagePackage.TYPED_ARGUMENT__TYPE: + setType((NamedElement)newValue); + return; + case SolverLanguagePackage.TYPED_ARGUMENT__VARIABLE: + setVariable((NamedElement)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case SolverLanguagePackage.TYPED_ARGUMENT__TYPE: + setType((NamedElement)null); + return; + case SolverLanguagePackage.TYPED_ARGUMENT__VARIABLE: + setVariable((NamedElement)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case SolverLanguagePackage.TYPED_ARGUMENT__TYPE: + return type != null; + case SolverLanguagePackage.TYPED_ARGUMENT__VARIABLE: + return variable != null; + } + return super.eIsSet(featureID); + } + +} //TypedArgumentImpl -- cgit v1.2.3-70-g09d2