diff options
Diffstat (limited to 'plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion/src-gen/org/eclipse/papyrus/infra/gmfdiag/expansion/expansionmodel/impl/DiagramExpansionImpl.java')
-rw-r--r-- | plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion/src-gen/org/eclipse/papyrus/infra/gmfdiag/expansion/expansionmodel/impl/DiagramExpansionImpl.java | 323 |
1 files changed, 323 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion/src-gen/org/eclipse/papyrus/infra/gmfdiag/expansion/expansionmodel/impl/DiagramExpansionImpl.java b/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion/src-gen/org/eclipse/papyrus/infra/gmfdiag/expansion/expansionmodel/impl/DiagramExpansionImpl.java new file mode 100644 index 00000000000..c19a27c8a0f --- /dev/null +++ b/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion/src-gen/org/eclipse/papyrus/infra/gmfdiag/expansion/expansionmodel/impl/DiagramExpansionImpl.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2015 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.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.expansion.expansionmodel.DiagramExpansion; +import org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.ExpansionmodelPackage; +import org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.GraphicalElementLibrary; +import org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.UseContext; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Diagram Expansion</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.impl.DiagramExpansionImpl#getUsages <em>Usages</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.impl.DiagramExpansionImpl#getLibraries <em>Libraries</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.impl.DiagramExpansionImpl#getID <em>ID</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.impl.DiagramExpansionImpl#getDescription <em>Description</em>}</li> + * </ul> + * + * @generated + */ +public class DiagramExpansionImpl extends MinimalEObjectImpl.Container implements DiagramExpansion { + /** + * The cached value of the '{@link #getUsages() <em>Usages</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUsages() + * @generated + * @ordered + */ + protected EList<UseContext> usages; + + /** + * The cached value of the '{@link #getLibraries() <em>Libraries</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLibraries() + * @generated + * @ordered + */ + protected EList<GraphicalElementLibrary> libraries; + + /** + * 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 = null; + + /** + * 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 #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DiagramExpansionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExpansionmodelPackage.Literals.DIAGRAM_EXPANSION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<UseContext> getUsages() { + if (usages == null) { + usages = new EObjectContainmentEList<UseContext>(UseContext.class, this, ExpansionmodelPackage.DIAGRAM_EXPANSION__USAGES); + } + return usages; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<GraphicalElementLibrary> getLibraries() { + if (libraries == null) { + libraries = new EObjectContainmentEList<GraphicalElementLibrary>(GraphicalElementLibrary.class, this, ExpansionmodelPackage.DIAGRAM_EXPANSION__LIBRARIES); + } + return libraries; + } + + /** + * <!-- 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, ExpansionmodelPackage.DIAGRAM_EXPANSION__ID, oldID, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ExpansionmodelPackage.DIAGRAM_EXPANSION__DESCRIPTION, oldDescription, description)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ExpansionmodelPackage.DIAGRAM_EXPANSION__USAGES: + return ((InternalEList<?>)getUsages()).basicRemove(otherEnd, msgs); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__LIBRARIES: + return ((InternalEList<?>)getLibraries()).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 ExpansionmodelPackage.DIAGRAM_EXPANSION__USAGES: + return getUsages(); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__LIBRARIES: + return getLibraries(); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__ID: + return getID(); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__DESCRIPTION: + return getDescription(); + } + 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 ExpansionmodelPackage.DIAGRAM_EXPANSION__USAGES: + getUsages().clear(); + getUsages().addAll((Collection<? extends UseContext>)newValue); + return; + case ExpansionmodelPackage.DIAGRAM_EXPANSION__LIBRARIES: + getLibraries().clear(); + getLibraries().addAll((Collection<? extends GraphicalElementLibrary>)newValue); + return; + case ExpansionmodelPackage.DIAGRAM_EXPANSION__ID: + setID((String)newValue); + return; + case ExpansionmodelPackage.DIAGRAM_EXPANSION__DESCRIPTION: + setDescription((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExpansionmodelPackage.DIAGRAM_EXPANSION__USAGES: + getUsages().clear(); + return; + case ExpansionmodelPackage.DIAGRAM_EXPANSION__LIBRARIES: + getLibraries().clear(); + return; + case ExpansionmodelPackage.DIAGRAM_EXPANSION__ID: + setID(ID_EDEFAULT); + return; + case ExpansionmodelPackage.DIAGRAM_EXPANSION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExpansionmodelPackage.DIAGRAM_EXPANSION__USAGES: + return usages != null && !usages.isEmpty(); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__LIBRARIES: + return libraries != null && !libraries.isEmpty(); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case ExpansionmodelPackage.DIAGRAM_EXPANSION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + 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(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //DiagramExpansionImpl |