Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/simple_selectorImpl.java')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/simple_selectorImpl.java353
1 files changed, 353 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/simple_selectorImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/simple_selectorImpl.java
new file mode 100644
index 00000000000..518752b5445
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/cSS/impl/simple_selectorImpl.java
@@ -0,0 +1,353 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css3.cSS.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CSSPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CssSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ElementSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.UniversalSelector;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.simple_selector;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>simple selector</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css3.cSS.impl.simple_selectorImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css3.cSS.impl.simple_selectorImpl#getUniversal <em>Universal</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css3.cSS.impl.simple_selectorImpl#getSubSelectors <em>Sub Selectors</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class simple_selectorImpl extends MinimalEObjectImpl.Container implements simple_selector
+{
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected ElementSelector element;
+
+ /**
+ * The cached value of the '{@link #getUniversal() <em>Universal</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getUniversal()
+ * @generated
+ * @ordered
+ */
+ protected UniversalSelector universal;
+
+ /**
+ * The cached value of the '{@link #getSubSelectors() <em>Sub Selectors</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getSubSelectors()
+ * @generated
+ * @ordered
+ */
+ protected EList<CssSelector> subSelectors;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected simple_selectorImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return CSSPackage.Literals.SIMPLE_SELECTOR;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ElementSelector getElement()
+ {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetElement(ElementSelector newElement, NotificationChain msgs)
+ {
+ ElementSelector oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CSSPackage.SIMPLE_SELECTOR__ELEMENT, oldElement, newElement);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setElement(ElementSelector newElement)
+ {
+ if (newElement != element)
+ {
+ NotificationChain msgs = null;
+ if (element != null) {
+ msgs = ((InternalEObject) element).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CSSPackage.SIMPLE_SELECTOR__ELEMENT, null, msgs);
+ }
+ if (newElement != null) {
+ msgs = ((InternalEObject) newElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CSSPackage.SIMPLE_SELECTOR__ELEMENT, null, msgs);
+ }
+ msgs = basicSetElement(newElement, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ }
+ else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, CSSPackage.SIMPLE_SELECTOR__ELEMENT, newElement, newElement));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public UniversalSelector getUniversal()
+ {
+ return universal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetUniversal(UniversalSelector newUniversal, NotificationChain msgs)
+ {
+ UniversalSelector oldUniversal = universal;
+ universal = newUniversal;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CSSPackage.SIMPLE_SELECTOR__UNIVERSAL, oldUniversal, newUniversal);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setUniversal(UniversalSelector newUniversal)
+ {
+ if (newUniversal != universal)
+ {
+ NotificationChain msgs = null;
+ if (universal != null) {
+ msgs = ((InternalEObject) universal).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CSSPackage.SIMPLE_SELECTOR__UNIVERSAL, null, msgs);
+ }
+ if (newUniversal != null) {
+ msgs = ((InternalEObject) newUniversal).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CSSPackage.SIMPLE_SELECTOR__UNIVERSAL, null, msgs);
+ }
+ msgs = basicSetUniversal(newUniversal, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ }
+ else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, CSSPackage.SIMPLE_SELECTOR__UNIVERSAL, newUniversal, newUniversal));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<CssSelector> getSubSelectors()
+ {
+ if (subSelectors == null)
+ {
+ subSelectors = new EObjectContainmentEList<CssSelector>(CssSelector.class, this, CSSPackage.SIMPLE_SELECTOR__SUB_SELECTORS);
+ }
+ return subSelectors;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case CSSPackage.SIMPLE_SELECTOR__ELEMENT:
+ return basicSetElement(null, msgs);
+ case CSSPackage.SIMPLE_SELECTOR__UNIVERSAL:
+ return basicSetUniversal(null, msgs);
+ case CSSPackage.SIMPLE_SELECTOR__SUB_SELECTORS:
+ return ((InternalEList<?>) getSubSelectors()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case CSSPackage.SIMPLE_SELECTOR__ELEMENT:
+ return getElement();
+ case CSSPackage.SIMPLE_SELECTOR__UNIVERSAL:
+ return getUniversal();
+ case CSSPackage.SIMPLE_SELECTOR__SUB_SELECTORS:
+ return getSubSelectors();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case CSSPackage.SIMPLE_SELECTOR__ELEMENT:
+ setElement((ElementSelector) newValue);
+ return;
+ case CSSPackage.SIMPLE_SELECTOR__UNIVERSAL:
+ setUniversal((UniversalSelector) newValue);
+ return;
+ case CSSPackage.SIMPLE_SELECTOR__SUB_SELECTORS:
+ getSubSelectors().clear();
+ getSubSelectors().addAll((Collection<? extends CssSelector>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case CSSPackage.SIMPLE_SELECTOR__ELEMENT:
+ setElement((ElementSelector) null);
+ return;
+ case CSSPackage.SIMPLE_SELECTOR__UNIVERSAL:
+ setUniversal((UniversalSelector) null);
+ return;
+ case CSSPackage.SIMPLE_SELECTOR__SUB_SELECTORS:
+ getSubSelectors().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case CSSPackage.SIMPLE_SELECTOR__ELEMENT:
+ return element != null;
+ case CSSPackage.SIMPLE_SELECTOR__UNIVERSAL:
+ return universal != null;
+ case CSSPackage.SIMPLE_SELECTOR__SUB_SELECTORS:
+ return subSelectors != null && !subSelectors.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // simple_selectorImpl

Back to the top