diff options
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.graphdef/src/org/eclipse/papyrus/gmf/gmfgraph/impl/CustomLayoutImpl.java')
-rw-r--r-- | plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.graphdef/src/org/eclipse/papyrus/gmf/gmfgraph/impl/CustomLayoutImpl.java | 281 |
1 files changed, 0 insertions, 281 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.graphdef/src/org/eclipse/papyrus/gmf/gmfgraph/impl/CustomLayoutImpl.java b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.graphdef/src/org/eclipse/papyrus/gmf/gmfgraph/impl/CustomLayoutImpl.java deleted file mode 100644 index 4fa3c840ded..00000000000 --- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.graphdef/src/org/eclipse/papyrus/gmf/gmfgraph/impl/CustomLayoutImpl.java +++ /dev/null @@ -1,281 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2020 Borland Software Corporation, CEA LIST, ARTAL - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Borland - initial API and implementation - * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174 - ******************************************************************************/ -/** - * <copyright> - * </copyright> - * - * $Id$ - */ -package org.eclipse.papyrus.gmf.gmfgraph.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.InternalEList; -import org.eclipse.papyrus.gmf.gmfgraph.CustomAttribute; -import org.eclipse.papyrus.gmf.gmfgraph.CustomAttributeOwner; -import org.eclipse.papyrus.gmf.gmfgraph.CustomClass; -import org.eclipse.papyrus.gmf.gmfgraph.CustomLayout; -import org.eclipse.papyrus.gmf.gmfgraph.GMFGraphPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Custom Layout</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.papyrus.gmf.gmfgraph.impl.CustomLayoutImpl#getAttributes <em>Attributes</em>}</li> - * <li>{@link org.eclipse.papyrus.gmf.gmfgraph.impl.CustomLayoutImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class CustomLayoutImpl extends EObjectImpl implements CustomLayout { - /** - * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAttributes() - * @generated - * @ordered - */ - protected EList<CustomAttribute> attributes; - - /** - * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getQualifiedClassName() - * @generated - * @ordered - */ - protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getQualifiedClassName() - * @generated - * @ordered - */ - protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected CustomLayoutImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return GMFGraphPackage.eINSTANCE.getCustomLayout(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getQualifiedClassName() { - return qualifiedClassName; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setQualifiedClassName(String newQualifiedClassName) { - String oldQualifiedClassName = qualifiedClassName; - qualifiedClassName = newQualifiedClassName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList<CustomAttribute> getAttributes() { - if (attributes == null) { - attributes = new EObjectContainmentEList<CustomAttribute>(CustomAttribute.class, this, GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES); - } - return attributes; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: - return ((InternalEList<?>)getAttributes()).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 GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: - return getAttributes(); - case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME: - return getQualifiedClassName(); - } - 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 GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection<? extends CustomAttribute>)newValue); - return; - case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME: - setQualifiedClassName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: - getAttributes().clear(); - return; - case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME: - setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME: - return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { - if (baseClass == CustomAttributeOwner.class) { - switch (derivedFeatureID) { - case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: return GMFGraphPackage.CUSTOM_ATTRIBUTE_OWNER__ATTRIBUTES; - default: return -1; - } - } - if (baseClass == CustomClass.class) { - switch (derivedFeatureID) { - case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME: return GMFGraphPackage.CUSTOM_CLASS__QUALIFIED_CLASS_NAME; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { - if (baseClass == CustomAttributeOwner.class) { - switch (baseFeatureID) { - case GMFGraphPackage.CUSTOM_ATTRIBUTE_OWNER__ATTRIBUTES: return GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES; - default: return -1; - } - } - if (baseClass == CustomClass.class) { - switch (baseFeatureID) { - case GMFGraphPackage.CUSTOM_CLASS__QUALIFIED_CLASS_NAME: return GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (qualifiedClassName: "); - result.append(qualifiedClassName); - result.append(')'); - return result.toString(); - } - -} //CustomLayoutImpl |