diff options
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/stylesheets/impl/ThemeImpl.java')
-rw-r--r-- | plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/stylesheets/impl/ThemeImpl.java | 327 |
1 files changed, 327 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/stylesheets/impl/ThemeImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/stylesheets/impl/ThemeImpl.java new file mode 100644 index 00000000000..3b2fe7bb3a8 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/stylesheets/impl/ThemeImpl.java @@ -0,0 +1,327 @@ +/** + */ +package org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.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.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet; +import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage; +import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Theme</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.impl.ThemeImpl#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.impl.ThemeImpl#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.impl.ThemeImpl#getIcon <em>Icon</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.impl.ThemeImpl#getStylesheets <em>Stylesheets</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ThemeImpl extends EObjectImpl implements Theme { + + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getLabel() <em>Label</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabel() + * @generated + * @ordered + */ + protected static final String LABEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabel() + * @generated + * @ordered + */ + protected String label = LABEL_EDEFAULT; + + /** + * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIcon() + * @generated + * @ordered + */ + protected static final String ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIcon() + * @generated + * @ordered + */ + protected String icon = ICON_EDEFAULT; + + /** + * The cached value of the '{@link #getStylesheets() <em>Stylesheets</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStylesheets() + * @generated + * @ordered + */ + protected EList<StyleSheet> stylesheets; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ThemeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return StylesheetsPackage.Literals.THEME; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StylesheetsPackage.THEME__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLabel() { + return label; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLabel(String newLabel) { + String oldLabel = label; + label = newLabel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StylesheetsPackage.THEME__LABEL, oldLabel, label)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getIcon() { + return icon; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIcon(String newIcon) { + String oldIcon = icon; + icon = newIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StylesheetsPackage.THEME__ICON, oldIcon, icon)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<StyleSheet> getStylesheets() { + if (stylesheets == null) { + stylesheets = new EObjectContainmentEList<StyleSheet>(StyleSheet.class, this, StylesheetsPackage.THEME__STYLESHEETS); + } + return stylesheets; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case StylesheetsPackage.THEME__STYLESHEETS: + return ((InternalEList<?>)getStylesheets()).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 StylesheetsPackage.THEME__ID: + return getId(); + case StylesheetsPackage.THEME__LABEL: + return getLabel(); + case StylesheetsPackage.THEME__ICON: + return getIcon(); + case StylesheetsPackage.THEME__STYLESHEETS: + return getStylesheets(); + } + 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 StylesheetsPackage.THEME__ID: + setId((String)newValue); + return; + case StylesheetsPackage.THEME__LABEL: + setLabel((String)newValue); + return; + case StylesheetsPackage.THEME__ICON: + setIcon((String)newValue); + return; + case StylesheetsPackage.THEME__STYLESHEETS: + getStylesheets().clear(); + getStylesheets().addAll((Collection<? extends StyleSheet>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case StylesheetsPackage.THEME__ID: + setId(ID_EDEFAULT); + return; + case StylesheetsPackage.THEME__LABEL: + setLabel(LABEL_EDEFAULT); + return; + case StylesheetsPackage.THEME__ICON: + setIcon(ICON_EDEFAULT); + return; + case StylesheetsPackage.THEME__STYLESHEETS: + getStylesheets().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case StylesheetsPackage.THEME__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case StylesheetsPackage.THEME__LABEL: + return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label); + case StylesheetsPackage.THEME__ICON: + return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon); + case StylesheetsPackage.THEME__STYLESHEETS: + return stylesheets != null && !stylesheets.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", label: "); + result.append(label); + result.append(", icon: "); + result.append(icon); + result.append(')'); + return result.toString(); + } + +} //ThemeImpl |