diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf')
68 files changed, 24842 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ArrowStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ArrowStyleImpl.java new file mode 100644 index 0000000000..d2feef6eae --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ArrowStyleImpl.java @@ -0,0 +1,205 @@ +/****************************************************************************** + * Copyright (c) 2008, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.ArrowStyle; +import org.eclipse.gmf.runtime.notation.ArrowType; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Arrow Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ArrowStyleImpl#getArrowSource <em>Arrow Source</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ArrowStyleImpl#getArrowTarget <em>Arrow Target</em>}</li> + * </ul> + * + * @generated + */ +public class ArrowStyleImpl extends CDOObjectImpl implements ArrowStyle +{ + /** + * The default value of the '{@link #getArrowSource() <em>Arrow Source</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArrowSource() + * @generated + * @ordered + */ + protected static final ArrowType ARROW_SOURCE_EDEFAULT = ArrowType.NONE_LITERAL; + + /** + * The default value of the '{@link #getArrowTarget() <em>Arrow Target</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArrowTarget() + * @generated + * @ordered + */ + protected static final ArrowType ARROW_TARGET_EDEFAULT = ArrowType.NONE_LITERAL; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ArrowStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.ARROW_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ArrowType getArrowSource() + { + return (ArrowType)eDynamicGet(NotationPackage.ARROW_STYLE__ARROW_SOURCE, NotationPackage.Literals.ARROW_STYLE__ARROW_SOURCE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setArrowSource(ArrowType newArrowSource) + { + eDynamicSet(NotationPackage.ARROW_STYLE__ARROW_SOURCE, NotationPackage.Literals.ARROW_STYLE__ARROW_SOURCE, newArrowSource); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ArrowType getArrowTarget() + { + return (ArrowType)eDynamicGet(NotationPackage.ARROW_STYLE__ARROW_TARGET, NotationPackage.Literals.ARROW_STYLE__ARROW_TARGET, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setArrowTarget(ArrowType newArrowTarget) + { + eDynamicSet(NotationPackage.ARROW_STYLE__ARROW_TARGET, NotationPackage.Literals.ARROW_STYLE__ARROW_TARGET, newArrowTarget); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.ARROW_STYLE__ARROW_SOURCE: + return getArrowSource(); + case NotationPackage.ARROW_STYLE__ARROW_TARGET: + return getArrowTarget(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.ARROW_STYLE__ARROW_SOURCE: + setArrowSource((ArrowType)newValue); + return; + case NotationPackage.ARROW_STYLE__ARROW_TARGET: + setArrowTarget((ArrowType)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.ARROW_STYLE__ARROW_SOURCE: + setArrowSource(ARROW_SOURCE_EDEFAULT); + return; + case NotationPackage.ARROW_STYLE__ARROW_TARGET: + setArrowTarget(ARROW_TARGET_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.ARROW_STYLE__ARROW_SOURCE: + return getArrowSource() != ARROW_SOURCE_EDEFAULT; + case NotationPackage.ARROW_STYLE__ARROW_TARGET: + return getArrowTarget() != ARROW_TARGET_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // ArrowStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicCompartmentImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicCompartmentImpl.java new file mode 100644 index 0000000000..7b4a8c3583 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicCompartmentImpl.java @@ -0,0 +1,395 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.BasicCompartment; +import org.eclipse.gmf.runtime.notation.DrawerStyle; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Style; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Compartment</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.BasicCompartmentImpl#isCollapsed <em>Collapsed</em>}</li> + * </ul> + * + * @generated + */ +public class BasicCompartmentImpl extends DecorationNodeImpl implements BasicCompartment +{ + /** + * The default value of the '{@link #isCollapsed() <em>Collapsed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isCollapsed() + * @generated + * @ordered + */ + protected static final boolean COLLAPSED_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicCompartmentImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BASIC_COMPARTMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isCollapsed() + { + return ((Boolean)eDynamicGet(NotationPackage.BASIC_COMPARTMENT__COLLAPSED - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DRAWER_STYLE__COLLAPSED, true, + true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCollapsed(boolean newCollapsed) + { + eDynamicSet(NotationPackage.BASIC_COMPARTMENT__COLLAPSED - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DRAWER_STYLE__COLLAPSED, + new Boolean(newCollapsed)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.BASIC_COMPARTMENT__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.BASIC_COMPARTMENT__TYPE: + return getType(); + case NotationPackage.BASIC_COMPARTMENT__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.BASIC_COMPARTMENT__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.BASIC_COMPARTMENT__STYLES: + return getStyles(); + case NotationPackage.BASIC_COMPARTMENT__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.BASIC_COMPARTMENT__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.BASIC_COMPARTMENT__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.BASIC_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + case NotationPackage.BASIC_COMPARTMENT__COLLAPSED: + return isCollapsed() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + return; + default: + eSetGen(featureID, newValue); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void eSetGen(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.BASIC_COMPARTMENT__TYPE: + setType((String)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + case NotationPackage.BASIC_COMPARTMENT__COLLAPSED: + setCollapsed(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + return; + default: + eUnsetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void eUnsetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.BASIC_COMPARTMENT__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.BASIC_COMPARTMENT__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.BASIC_COMPARTMENT__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.BASIC_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.BASIC_COMPARTMENT__STYLES: + getStyles().clear(); + return; + case NotationPackage.BASIC_COMPARTMENT__ELEMENT: + unsetElement(); + return; + case NotationPackage.BASIC_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.BASIC_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + case NotationPackage.BASIC_COMPARTMENT__COLLAPSED: + setCollapsed(COLLAPSED_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + return false; + default: + return eIsSetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean eIsSetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_COMPARTMENT__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.BASIC_COMPARTMENT__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.BASIC_COMPARTMENT__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.BASIC_COMPARTMENT__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.BASIC_COMPARTMENT__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.BASIC_COMPARTMENT__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.BASIC_COMPARTMENT__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.BASIC_COMPARTMENT__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.BASIC_COMPARTMENT__ELEMENT: + return isSetElement(); + case NotationPackage.BASIC_COMPARTMENT__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.BASIC_COMPARTMENT__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.BASIC_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + case NotationPackage.BASIC_COMPARTMENT__COLLAPSED: + return isCollapsed() != COLLAPSED_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Style.class) + { + switch (derivedFeatureID) + { + default: + return -1; + } + } + if (baseClass == DrawerStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.BASIC_COMPARTMENT__COLLAPSED: + return NotationPackage.DRAWER_STYLE__COLLAPSED; + 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 == Style.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + if (baseClass == DrawerStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.DRAWER_STYLE__COLLAPSED: + return NotationPackage.BASIC_COMPARTMENT__COLLAPSED; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // BasicCompartmentImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicDecorationNodeImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicDecorationNodeImpl.java new file mode 100644 index 0000000000..b4f4d9c783 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicDecorationNodeImpl.java @@ -0,0 +1,537 @@ +/****************************************************************************** + * Copyright (c) 2008, 2018 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + * Eike Stepper - Migration to CDO + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EcoreEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.BasicDecorationNode; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.NamedStyle; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Style; +import org.eclipse.gmf.runtime.notation.View; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Decoration Node</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated NOT + * @since 1.2 + */ +public class BasicDecorationNodeImpl extends org.eclipse.emf.cdo.ecore.impl.EModelElementImpl implements BasicDecorationNode +{ + protected static final boolean VISIBLE_EDEFAULT = true; + + protected static final String TYPE_EDEFAULT = ""; + + protected static final boolean MUTABLE_EDEFAULT = false; + + protected static final EStructuralFeature[] childrenFeatures = new EStructuralFeature[] { NotationPackage.Literals.VIEW__PERSISTED_CHILDREN, + NotationPackage.Literals.VIEW__TRANSIENT_CHILDREN }; + + protected static final int ESTATIC_FEATURE_COUNT = 0; + + protected BasicDecorationNodeImpl() + { + super(); + setVisible(VISIBLE_EDEFAULT); + } + + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BASIC_DECORATION_NODE; + } + + public EList getSourceEdges() + { + return new EcoreEList.UnmodifiableEList(this, NotationPackage.eINSTANCE.getView_SourceEdges(), 0, null); + } + + public EList getTargetEdges() + { + return new EcoreEList.UnmodifiableEList(this, NotationPackage.eINSTANCE.getView_TargetEdges(), 0, null); + } + + public EList getPersistedChildren() + { + return new EcoreEList.UnmodifiableEList(this, NotationPackage.eINSTANCE.getView_PersistedChildren(), 0, null); + } + + public EList getTransientChildren() + { + return new EcoreEList.UnmodifiableEList(this, NotationPackage.eINSTANCE.getView_TransientChildren(), 0, null); + } + + public EList getChildren() + { + return ECollections.emptyEList(); + } + + public EList getStyles() + { + return new EcoreEList.UnmodifiableEList(this, NotationPackage.eINSTANCE.getView_TransientChildren(), 0, null); + } + + public Style getStyle(EClass eClass) + { + if (eClass != null && NotationPackage.eINSTANCE.getStyle().isSuperTypeOf(eClass)) + { + EClass thisEClass = eClass(); + if (eClass.isSuperTypeOf(thisEClass) || eClass == thisEClass) + { + return (Style)this; + } + if (eIsSet(NotationPackage.Literals.VIEW__STYLES)) + { + for (Iterator i = getStyles().iterator(); i.hasNext();) + { + Style style = (Style)i.next(); + if (style.eClass() == eClass || eClass.isInstance(style)) + { + return style; + } + } + } + } + return null; + } + + public NamedStyle getNamedStyle(EClass eClass, String name) + { + if (eClass != null && eIsSet(NotationPackage.Literals.VIEW__STYLES) && NotationPackage.eINSTANCE.getNamedStyle().isSuperTypeOf(eClass)) + { + for (Iterator i = getStyles().iterator(); i.hasNext();) + { + Style style = (Style)i.next(); + if (style.eClass() == eClass || eClass.isInstance(style)) + { + if (style.eGet(NotationPackage.eINSTANCE.getNamedStyle_Name()).equals(name)) + { + return (NamedStyle)style; + } + } + } + } + return null; + } + + public LayoutConstraint createLayoutConstraint(EClass eClass) + { + LayoutConstraint newLayoutConstraint = (LayoutConstraint)eClass.getEPackage().getEFactoryInstance().create(eClass); + setLayoutConstraint(newLayoutConstraint); + return newLayoutConstraint; + } + + public void setLayoutConstraint(LayoutConstraint newLayoutConstraint) + { + throw new UnsupportedOperationException("BasicDecorationNodeImpl#setLayoutConstraint(LayoutConstraint newLayoutConstraint)"); //$NON-NLS-1$ + } + + public NotificationChain basicSetLayoutConstraint(LayoutConstraint newLayoutConstraint, NotificationChain msgs) + { + return msgs; + } + + public LayoutConstraint getLayoutConstraint() + { + return null; + } + + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.BASIC_DECORATION_NODE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); + } + return eDynamicInverseAdd(otherEnd, featureID, msgs); + } + + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.BASIC_DECORATION_NODE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BASIC_DECORATION_NODE__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.BASIC_DECORATION_NODE__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.BASIC_DECORATION_NODE__TYPE: + return getType(); + case NotationPackage.BASIC_DECORATION_NODE__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.BASIC_DECORATION_NODE__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.BASIC_DECORATION_NODE__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.BASIC_DECORATION_NODE__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.BASIC_DECORATION_NODE__STYLES: + return getStyles(); + case NotationPackage.BASIC_DECORATION_NODE__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.BASIC_DECORATION_NODE__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.BASIC_DECORATION_NODE__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.BASIC_DECORATION_NODE__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BASIC_DECORATION_NODE__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_DECORATION_NODE__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.BASIC_DECORATION_NODE__TYPE: + setType((String)newValue); + return; + case NotationPackage.BASIC_DECORATION_NODE__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.BASIC_DECORATION_NODE__SOURCE_EDGES: + case NotationPackage.BASIC_DECORATION_NODE__TARGET_EDGES: + case NotationPackage.BASIC_DECORATION_NODE__PERSISTED_CHILDREN: + case NotationPackage.BASIC_DECORATION_NODE__STYLES: + case NotationPackage.BASIC_DECORATION_NODE__TRANSIENT_CHILDREN: + case NotationPackage.BASIC_DECORATION_NODE__LAYOUT_CONSTRAINT: + return; + case NotationPackage.BASIC_DECORATION_NODE__ELEMENT: + setElement((EObject)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_DECORATION_NODE__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.BASIC_DECORATION_NODE__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.BASIC_DECORATION_NODE__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.BASIC_DECORATION_NODE__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.BASIC_DECORATION_NODE__SOURCE_EDGES: + case NotationPackage.BASIC_DECORATION_NODE__TARGET_EDGES: + case NotationPackage.BASIC_DECORATION_NODE__PERSISTED_CHILDREN: + case NotationPackage.BASIC_DECORATION_NODE__STYLES: + case NotationPackage.BASIC_DECORATION_NODE__TRANSIENT_CHILDREN: + case NotationPackage.BASIC_DECORATION_NODE__LAYOUT_CONSTRAINT: + return; + case NotationPackage.BASIC_DECORATION_NODE__ELEMENT: + unsetElement(); + return; + } + eDynamicUnset(featureID); + } + + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_DECORATION_NODE__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.BASIC_DECORATION_NODE__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.BASIC_DECORATION_NODE__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.BASIC_DECORATION_NODE__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.BASIC_DECORATION_NODE__SOURCE_EDGES: + case NotationPackage.BASIC_DECORATION_NODE__TARGET_EDGES: + case NotationPackage.BASIC_DECORATION_NODE__PERSISTED_CHILDREN: + case NotationPackage.BASIC_DECORATION_NODE__STYLES: + case NotationPackage.BASIC_DECORATION_NODE__TRANSIENT_CHILDREN: + case NotationPackage.BASIC_DECORATION_NODE__LAYOUT_CONSTRAINT: + return false; + case NotationPackage.BASIC_DECORATION_NODE__ELEMENT: + return isSetElement(); + case NotationPackage.BASIC_DECORATION_NODE__DIAGRAM: + return basicGetDiagram() != null; + } + return eDynamicIsSet(featureID); + } + + public boolean isVisible() + { + return ((Boolean)eDynamicGet(NotationPackage.VIEW__VISIBLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__VISIBLE, true, true)).booleanValue(); + } + + public void setVisible(boolean newVisible) + { + eDynamicSet(NotationPackage.VIEW__VISIBLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__VISIBLE, new Boolean(newVisible)); + } + + public String getType() + { + return (String)eDynamicGet(NotationPackage.VIEW__TYPE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TYPE, true, true); + } + + public void setType(String newType) + { + setTypeGen(newType == null ? null : newType.intern()); + } + + public void setTypeGen(String newType) + { + eDynamicSet(NotationPackage.VIEW__TYPE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TYPE, newType); + } + + public boolean isMutable() + { + return ((Boolean)eDynamicGet(NotationPackage.VIEW__MUTABLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__MUTABLE, true, true)).booleanValue(); + } + + public void setMutable(boolean newMutable) + { + eDynamicSet(NotationPackage.VIEW__MUTABLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__MUTABLE, new Boolean(newMutable)); + } + + public EObject getElement() + { + if (!isSetElement()) + { + EObject container = eContainer(); + if (container instanceof View) + { + View view = (View)container; + return view.getElement(); + } + } + + return getElementGen(); + } + + public EObject getElementGen() + { + return (EObject)eDynamicGet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT, true, true); + } + + public EObject basicGetElement() + { + return (EObject)eDynamicGet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT, false, true); + } + + public void setElement(EObject newElement) + { + eDynamicSet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT, newElement); + } + + public void unsetElement() + { + eDynamicUnset(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT); + } + + public boolean isSetElement() + { + return eDynamicIsSet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT); + } + + public Diagram getDiagram() + { + Diagram diagram = basicGetDiagram(); + return diagram != null && diagram.eIsProxy() ? (Diagram)eResolveProxy((InternalEObject)diagram) : diagram; + } + + public Diagram basicGetDiagram() + { + for (EObject parent = this; parent != null; parent = ((InternalEObject)parent).eInternalContainer()) + { + if (NotationPackage.Literals.DIAGRAM.isSuperTypeOf(parent.eClass())) + { + return (Diagram)parent; + } + } + return null; + } + + public Node createChild(EClass eClass) + { + Node newChild = (Node)eClass.getEPackage().getEFactoryInstance().create(eClass); + getPersistedChildren().add(newChild); + return newChild; + } + + public Style createStyle(EClass eClass) + { + Style newStyle = (Style)eClass.getEPackage().getEFactoryInstance().create(eClass); + getStyles().add(newStyle); + return newStyle; + } + + public void persistChildren() + { + if (eIsSet(NotationPackage.VIEW__TRANSIENT_CHILDREN)) + { + getPersistedChildren().addAll(getTransientChildren()); + } + } + + public void insertChild(View child) + { + persistChildren(); + getPersistedChildren().add(child); + } + + public void insertChild(View child, boolean persisted) + { + List children = null; + if (persisted) + { + children = getPersistedChildren(); + } + else + { + children = getTransientChildren(); + } + children.add(child); + } + + public void insertChildAt(View child, int index) + { + persistChildren(); + if (getPersistedChildren().size() >= index) + { + getPersistedChildren().add(index, child); + } + } + + public void removeChild(View child) + { + if (child.eContainer() == this) + { + EStructuralFeature eContainingFeature = child.eContainingFeature(); + if (eContainingFeature == NotationPackage.Literals.VIEW__TRANSIENT_CHILDREN) + { + getTransientChildren().remove(child); + } + else if (eContainingFeature == NotationPackage.Literals.VIEW__PERSISTED_CHILDREN) + { + getPersistedChildren().remove(child); + } + } + } + + public void persist() + { + EObject eContainer = eContainer(); + if (eContainer instanceof View) + { + EStructuralFeature eContaingFeature = eContainingFeature(); + if (eContaingFeature != null && eContaingFeature.isTransient()) + { + View vContainer = (View)eContainer; + vContainer.persistChildren(); + } + } + } + + public EList getVisibleChildren() + { + boolean persistedChildrenSet = eIsSet(NotationPackage.VIEW__PERSISTED_CHILDREN); + boolean transientChildrenSet = eIsSet(NotationPackage.VIEW__TRANSIENT_CHILDREN); + + if (persistedChildrenSet && transientChildrenSet) + { + return ECollections.EMPTY_ELIST; + } + + List _children = new ArrayList(); + if (persistedChildrenSet) + { + EList persistedChildren = getPersistedChildren(); + for (Iterator iter = persistedChildren.iterator(); iter.hasNext();) + { + View view = (View)iter.next(); + if (view.isVisible()) + { + _children.add(view); + } + } + } + + if (transientChildrenSet) + { + EList transientChildren = getTransientChildren(); + for (Iterator iter = transientChildren.iterator(); iter.hasNext();) + { + View view = (View)iter.next(); + if (view.isVisible()) + { + _children.add(view); + } + } + } + + return new BasicEList.UnmodifiableEList(_children.size(), _children.toArray()); + } + +} // BasicDecorationNodeImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicSemanticCompartmentImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicSemanticCompartmentImpl.java new file mode 100644 index 0000000000..43ff0a3e97 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BasicSemanticCompartmentImpl.java @@ -0,0 +1,449 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.BasicSemanticCompartment; +import org.eclipse.gmf.runtime.notation.DrawerStyle; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Style; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Semantic Compartment</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.BasicSemanticCompartmentImpl#isCollapsed <em>Collapsed</em>}</li> + * </ul> + * + * @generated + */ +public class BasicSemanticCompartmentImpl extends BasicDecorationNodeImpl implements BasicSemanticCompartment +{ + + /** + * The default value of the '{@link #isCollapsed() <em>Collapsed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isCollapsed() + * @generated + * @ordered + */ + protected static final boolean COLLAPSED_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicSemanticCompartmentImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BASIC_SEMANTIC_COMPARTMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isCollapsed() + { + return ((Boolean)eDynamicGet(NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.DRAWER_STYLE__COLLAPSED, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCollapsed(boolean newCollapsed) + { + eDynamicSet(NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DRAWER_STYLE__COLLAPSED, + new Boolean(newCollapsed)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TYPE: + return getType(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + return getStyles(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED: + return isCollapsed() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + return; + default: + eSetGen(featureID, newValue); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void eSetGen(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TYPE: + setType((String)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED: + setCollapsed(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + return; + default: + eUnsetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void eUnsetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + getStyles().clear(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__ELEMENT: + unsetElement(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED: + setCollapsed(COLLAPSED_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + return false; + default: + return eIsSetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean eIsSetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__ELEMENT: + return isSetElement(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED: + return isCollapsed() != COLLAPSED_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Style.class) + { + switch (derivedFeatureID) + { + default: + return -1; + } + } + if (baseClass == DrawerStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED: + return NotationPackage.DRAWER_STYLE__COLLAPSED; + 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 == Style.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + if (baseClass == DrawerStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.DRAWER_STYLE__COLLAPSED: + return NotationPackage.BASIC_SEMANTIC_COMPARTMENT__COLLAPSED; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT__LAYOUT_CONSTRAINT: + return basicSetLayoutConstraint(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + @Override + public LayoutConstraint createLayoutConstraint(EClass eClass) + { + LayoutConstraint newLayoutConstraint = (LayoutConstraint)eClass.getEPackage().getEFactoryInstance().create(eClass); + setLayoutConstraint(newLayoutConstraint); + return newLayoutConstraint; + } + + @Override + public LayoutConstraint getLayoutConstraint() + { + return (LayoutConstraint)eDynamicGet(NotationPackage.NODE__LAYOUT_CONSTRAINT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.NODE__LAYOUT_CONSTRAINT, + true, true); + } + + @Override + public NotificationChain basicSetLayoutConstraint(LayoutConstraint newLayoutConstraint, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newLayoutConstraint, NotationPackage.NODE__LAYOUT_CONSTRAINT, msgs); + return msgs; + } + + @Override + public void setLayoutConstraint(LayoutConstraint newLayoutConstraint) + { + eDynamicSet(NotationPackage.NODE__LAYOUT_CONSTRAINT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.NODE__LAYOUT_CONSTRAINT, newLayoutConstraint); + } + +} // BasicSemanticCompartmentImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BooleanListValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BooleanListValueStyleImpl.java new file mode 100644 index 0000000000..ffca3a2457 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BooleanListValueStyleImpl.java @@ -0,0 +1,145 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.BooleanListValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Boolean List Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.BooleanListValueStyleImpl#getBooleanListValue <em>Boolean List Value</em>}</li> + * </ul> + * + * @generated + */ +public class BooleanListValueStyleImpl extends NamedStyleImpl implements BooleanListValueStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BooleanListValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BOOLEAN_LIST_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getBooleanListValue() + { + return (EList)eDynamicGet(NotationPackage.BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE, + NotationPackage.Literals.BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE: + return getBooleanListValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE: + getBooleanListValue().clear(); + getBooleanListValue().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE: + getBooleanListValue().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE: + return !getBooleanListValue().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // BooleanListValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BooleanValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BooleanValueStyleImpl.java new file mode 100644 index 0000000000..a8122dd1c4 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BooleanValueStyleImpl.java @@ -0,0 +1,161 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.BooleanValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Boolean Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.BooleanValueStyleImpl#isBooleanValue <em>Boolean Value</em>}</li> + * </ul> + * + * @generated + */ +public class BooleanValueStyleImpl extends NamedStyleImpl implements BooleanValueStyle +{ + /** + * The default value of the '{@link #isBooleanValue() <em>Boolean Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isBooleanValue() + * @generated + * @ordered + */ + protected static final boolean BOOLEAN_VALUE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BooleanValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BOOLEAN_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isBooleanValue() + { + return ((Boolean)eDynamicGet(NotationPackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE, NotationPackage.Literals.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBooleanValue(boolean newBooleanValue) + { + eDynamicSet(NotationPackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE, NotationPackage.Literals.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE, new Boolean(newBooleanValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE: + return isBooleanValue() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE: + setBooleanValue(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE: + setBooleanValue(BOOLEAN_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BOOLEAN_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE: + return isBooleanValue() != BOOLEAN_VALUE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // BooleanValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BoundsImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BoundsImpl.java new file mode 100644 index 0000000000..9e55576a85 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/BoundsImpl.java @@ -0,0 +1,262 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.Bounds; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Size; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Bounds</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.BoundsImpl#getWidth <em>Width</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.BoundsImpl#getHeight <em>Height</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class BoundsImpl extends LocationImpl implements Bounds +{ + /** + * The default value of the '{@link #getWidth() <em>Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getWidth() + * @generated + * @ordered + */ + protected static final int WIDTH_EDEFAULT = -1; + + /** + * The default value of the '{@link #getHeight() <em>Height</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getHeight() + * @generated + * @ordered + */ + protected static final int HEIGHT_EDEFAULT = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BoundsImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BOUNDS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getWidth() + { + return ((Integer)eDynamicGet(NotationPackage.BOUNDS__WIDTH, NotationPackage.Literals.SIZE__WIDTH, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setWidth(int newWidth) + { + eDynamicSet(NotationPackage.BOUNDS__WIDTH, NotationPackage.Literals.SIZE__WIDTH, new Integer(newWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getHeight() + { + return ((Integer)eDynamicGet(NotationPackage.BOUNDS__HEIGHT, NotationPackage.Literals.SIZE__HEIGHT, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setHeight(int newHeight) + { + eDynamicSet(NotationPackage.BOUNDS__HEIGHT, NotationPackage.Literals.SIZE__HEIGHT, new Integer(newHeight)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BOUNDS__X: + return new Integer(getX()); + case NotationPackage.BOUNDS__Y: + return new Integer(getY()); + case NotationPackage.BOUNDS__WIDTH: + return new Integer(getWidth()); + case NotationPackage.BOUNDS__HEIGHT: + return new Integer(getHeight()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BOUNDS__X: + setX(((Integer)newValue).intValue()); + return; + case NotationPackage.BOUNDS__Y: + setY(((Integer)newValue).intValue()); + return; + case NotationPackage.BOUNDS__WIDTH: + setWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.BOUNDS__HEIGHT: + setHeight(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BOUNDS__X: + setX(X_EDEFAULT); + return; + case NotationPackage.BOUNDS__Y: + setY(Y_EDEFAULT); + return; + case NotationPackage.BOUNDS__WIDTH: + setWidth(WIDTH_EDEFAULT); + return; + case NotationPackage.BOUNDS__HEIGHT: + setHeight(HEIGHT_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BOUNDS__X: + return getX() != X_EDEFAULT; + case NotationPackage.BOUNDS__Y: + return getY() != Y_EDEFAULT; + case NotationPackage.BOUNDS__WIDTH: + return getWidth() != WIDTH_EDEFAULT; + case NotationPackage.BOUNDS__HEIGHT: + return getHeight() != HEIGHT_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Size.class) + { + switch (derivedFeatureID) + { + case NotationPackage.BOUNDS__WIDTH: + return NotationPackage.SIZE__WIDTH; + case NotationPackage.BOUNDS__HEIGHT: + return NotationPackage.SIZE__HEIGHT; + 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 == Size.class) + { + switch (baseFeatureID) + { + case NotationPackage.SIZE__WIDTH: + return NotationPackage.BOUNDS__WIDTH; + case NotationPackage.SIZE__HEIGHT: + return NotationPackage.BOUNDS__HEIGHT; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // BoundsImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ByteArrayValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ByteArrayValueStyleImpl.java new file mode 100644 index 0000000000..c8dc25c3e2 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ByteArrayValueStyleImpl.java @@ -0,0 +1,161 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.ByteArrayValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Byte Array Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ByteArrayValueStyleImpl#getByteArrayValue <em>Byte Array Value</em>}</li> + * </ul> + * + * @generated + */ +public class ByteArrayValueStyleImpl extends NamedStyleImpl implements ByteArrayValueStyle +{ + /** + * The default value of the '{@link #getByteArrayValue() <em>Byte Array Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getByteArrayValue() + * @generated + * @ordered + */ + protected static final byte[] BYTE_ARRAY_VALUE_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ByteArrayValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.BYTE_ARRAY_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public byte[] getByteArrayValue() + { + return (byte[])eDynamicGet(NotationPackage.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE, NotationPackage.Literals.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setByteArrayValue(byte[] newByteArrayValue) + { + eDynamicSet(NotationPackage.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE, NotationPackage.Literals.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE, newByteArrayValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE: + return getByteArrayValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE: + setByteArrayValue((byte[])newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE: + setByteArrayValue(BYTE_ARRAY_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE: + return BYTE_ARRAY_VALUE_EDEFAULT == null ? getByteArrayValue() != null : !BYTE_ARRAY_VALUE_EDEFAULT.equals(getByteArrayValue()); + } + return eDynamicIsSet(featureID); + } + +} // ByteArrayValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/CanonicalStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/CanonicalStyleImpl.java new file mode 100644 index 0000000000..92edf662f5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/CanonicalStyleImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.CanonicalStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Canonical Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.CanonicalStyleImpl#isCanonical <em>Canonical</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class CanonicalStyleImpl extends CDOObjectImpl implements CanonicalStyle +{ + /** + * The default value of the '{@link #isCanonical() <em>Canonical</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isCanonical() + * @generated + * @ordered + */ + protected static final boolean CANONICAL_EDEFAULT = true; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CanonicalStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.CANONICAL_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isCanonical() + { + return ((Boolean)eDynamicGet(NotationPackage.CANONICAL_STYLE__CANONICAL, NotationPackage.Literals.CANONICAL_STYLE__CANONICAL, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCanonical(boolean newCanonical) + { + eDynamicSet(NotationPackage.CANONICAL_STYLE__CANONICAL, NotationPackage.Literals.CANONICAL_STYLE__CANONICAL, new Boolean(newCanonical)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.CANONICAL_STYLE__CANONICAL: + return isCanonical() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.CANONICAL_STYLE__CANONICAL: + setCanonical(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.CANONICAL_STYLE__CANONICAL: + setCanonical(CANONICAL_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.CANONICAL_STYLE__CANONICAL: + return isCanonical() != CANONICAL_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // CanonicalStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/CompartmentImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/CompartmentImpl.java new file mode 100644 index 0000000000..b8eaf5ec92 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/CompartmentImpl.java @@ -0,0 +1,453 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.CanonicalStyle; +import org.eclipse.gmf.runtime.notation.Compartment; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.TitleStyle; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Compartment</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.CompartmentImpl#isCanonical <em>Canonical</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.CompartmentImpl#isShowTitle <em>Show Title</em>}</li> + * </ul> + * + * @generated + */ +public class CompartmentImpl extends BasicCompartmentImpl implements Compartment +{ + /** + * The default value of the '{@link #isCanonical() <em>Canonical</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isCanonical() + * @generated + * @ordered + */ + protected static final boolean CANONICAL_EDEFAULT = true; + + /** + * The default value of the '{@link #isShowTitle() <em>Show Title</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isShowTitle() + * @generated + * @ordered + */ + protected static final boolean SHOW_TITLE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CompartmentImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.COMPARTMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isCanonical() + { + return ((Boolean)eDynamicGet(NotationPackage.COMPARTMENT__CANONICAL - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.CANONICAL_STYLE__CANONICAL, true, + true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCanonical(boolean newCanonical) + { + eDynamicSet(NotationPackage.COMPARTMENT__CANONICAL - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.CANONICAL_STYLE__CANONICAL, new Boolean(newCanonical)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isShowTitle() + { + return ((Boolean)eDynamicGet(NotationPackage.COMPARTMENT__SHOW_TITLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setShowTitle(boolean newShowTitle) + { + eDynamicSet(NotationPackage.COMPARTMENT__SHOW_TITLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, new Boolean(newShowTitle)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.COMPARTMENT__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.COMPARTMENT__TYPE: + return getType(); + case NotationPackage.COMPARTMENT__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.COMPARTMENT__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.COMPARTMENT__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.COMPARTMENT__STYLES: + return getStyles(); + case NotationPackage.COMPARTMENT__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.COMPARTMENT__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.COMPARTMENT__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + case NotationPackage.COMPARTMENT__COLLAPSED: + return isCollapsed() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.COMPARTMENT__CANONICAL: + return isCanonical() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.COMPARTMENT__SHOW_TITLE: + return isShowTitle() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + case NotationPackage.COMPARTMENT__TARGET_EDGES: + return; + default: + eSetGen(featureID, newValue); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSetGen(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.COMPARTMENT__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.COMPARTMENT__TYPE: + setType((String)newValue); + return; + case NotationPackage.COMPARTMENT__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.COMPARTMENT__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.COMPARTMENT__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + case NotationPackage.COMPARTMENT__COLLAPSED: + setCollapsed(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.COMPARTMENT__CANONICAL: + setCanonical(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.COMPARTMENT__SHOW_TITLE: + setShowTitle(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + case NotationPackage.COMPARTMENT__TARGET_EDGES: + return; + default: + eUnsetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnsetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.COMPARTMENT__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.COMPARTMENT__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.COMPARTMENT__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.COMPARTMENT__STYLES: + getStyles().clear(); + return; + case NotationPackage.COMPARTMENT__ELEMENT: + unsetElement(); + return; + case NotationPackage.COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + case NotationPackage.COMPARTMENT__COLLAPSED: + setCollapsed(COLLAPSED_EDEFAULT); + return; + case NotationPackage.COMPARTMENT__CANONICAL: + setCanonical(CANONICAL_EDEFAULT); + return; + case NotationPackage.COMPARTMENT__SHOW_TITLE: + setShowTitle(SHOW_TITLE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + case NotationPackage.COMPARTMENT__TARGET_EDGES: + return false; + default: + return eIsSetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.COMPARTMENT__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.COMPARTMENT__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.COMPARTMENT__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.COMPARTMENT__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.COMPARTMENT__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.COMPARTMENT__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.COMPARTMENT__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.COMPARTMENT__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.COMPARTMENT__ELEMENT: + return isSetElement(); + case NotationPackage.COMPARTMENT__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.COMPARTMENT__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + case NotationPackage.COMPARTMENT__COLLAPSED: + return isCollapsed() != COLLAPSED_EDEFAULT; + case NotationPackage.COMPARTMENT__CANONICAL: + return isCanonical() != CANONICAL_EDEFAULT; + case NotationPackage.COMPARTMENT__SHOW_TITLE: + return isShowTitle() != SHOW_TITLE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == CanonicalStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.COMPARTMENT__CANONICAL: + return NotationPackage.CANONICAL_STYLE__CANONICAL; + default: + return -1; + } + } + if (baseClass == TitleStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.COMPARTMENT__SHOW_TITLE: + return NotationPackage.TITLE_STYLE__SHOW_TITLE; + 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 == CanonicalStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.CANONICAL_STYLE__CANONICAL: + return NotationPackage.COMPARTMENT__CANONICAL; + default: + return -1; + } + } + if (baseClass == TitleStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + return NotationPackage.COMPARTMENT__SHOW_TITLE; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // CompartmentImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ConnectorImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ConnectorImpl.java new file mode 100644 index 0000000000..6a20ff55c0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ConnectorImpl.java @@ -0,0 +1,858 @@ +/****************************************************************************** + * Copyright (c) 2009, 2010 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.Anchor; +import org.eclipse.gmf.runtime.notation.Bendpoints; +import org.eclipse.gmf.runtime.notation.Connector; +import org.eclipse.gmf.runtime.notation.ConnectorStyle; +import org.eclipse.gmf.runtime.notation.JumpLinkStatus; +import org.eclipse.gmf.runtime.notation.JumpLinkType; +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.RoundedCornersStyle; +import org.eclipse.gmf.runtime.notation.Routing; +import org.eclipse.gmf.runtime.notation.RoutingStyle; +import org.eclipse.gmf.runtime.notation.Smoothness; +import org.eclipse.gmf.runtime.notation.Style; +import org.eclipse.gmf.runtime.notation.View; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Connector</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getRoundedBendpointsRadius <em>Rounded Bendpoints Radius</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getRouting <em>Routing</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getSmoothness <em>Smoothness</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#isAvoidObstructions <em>Avoid Obstructions</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#isClosestDistance <em>Closest Distance</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getJumpLinkStatus <em>Jump Link Status</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getJumpLinkType <em>Jump Link Type</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#isJumpLinksReverse <em>Jump Links Reverse</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getLineColor <em>Line Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl#getLineWidth <em>Line Width</em>}</li> + * </ul> + * + * @generated + */ +public class ConnectorImpl extends EdgeImpl implements Connector +{ + /** + * The default value of the '{@link #getRoundedBendpointsRadius() <em>Rounded Bendpoints Radius</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRoundedBendpointsRadius() + * @generated + * @ordered + */ + protected static final int ROUNDED_BENDPOINTS_RADIUS_EDEFAULT = 0; + + /** + * The default value of the '{@link #getRouting() <em>Routing</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRouting() + * @generated + * @ordered + */ + protected static final Routing ROUTING_EDEFAULT = Routing.MANUAL_LITERAL; + + /** + * The default value of the '{@link #getSmoothness() <em>Smoothness</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSmoothness() + * @generated + * @ordered + */ + protected static final Smoothness SMOOTHNESS_EDEFAULT = Smoothness.NONE_LITERAL; + + /** + * The default value of the '{@link #isAvoidObstructions() <em>Avoid Obstructions</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isAvoidObstructions() + * @generated + * @ordered + */ + protected static final boolean AVOID_OBSTRUCTIONS_EDEFAULT = false; + + /** + * The default value of the '{@link #isClosestDistance() <em>Closest Distance</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isClosestDistance() + * @generated + * @ordered + */ + protected static final boolean CLOSEST_DISTANCE_EDEFAULT = false; + + /** + * The default value of the '{@link #getJumpLinkStatus() <em>Jump Link Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJumpLinkStatus() + * @generated + * @ordered + */ + protected static final JumpLinkStatus JUMP_LINK_STATUS_EDEFAULT = JumpLinkStatus.NONE_LITERAL; + + /** + * The default value of the '{@link #getJumpLinkType() <em>Jump Link Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJumpLinkType() + * @generated + * @ordered + */ + protected static final JumpLinkType JUMP_LINK_TYPE_EDEFAULT = JumpLinkType.SEMICIRCLE_LITERAL; + + /** + * The default value of the '{@link #isJumpLinksReverse() <em>Jump Links Reverse</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isJumpLinksReverse() + * @generated + * @ordered + */ + protected static final boolean JUMP_LINKS_REVERSE_EDEFAULT = false; + + /** + * The default value of the '{@link #getLineColor() <em>Line Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineColor() + * @generated + * @ordered + */ + protected static final int LINE_COLOR_EDEFAULT = 11579568; + + /** + * The default value of the '{@link #getLineWidth() <em>Line Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineWidth() + * @generated + * @ordered + */ + protected static final int LINE_WIDTH_EDEFAULT = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ConnectorImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.CONNECTOR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Routing getRouting() + { + return (Routing)eDynamicGet(NotationPackage.CONNECTOR__ROUTING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__ROUTING, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRouting(Routing newRouting) + { + eDynamicSet(NotationPackage.CONNECTOR__ROUTING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__ROUTING, newRouting); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Smoothness getSmoothness() + { + return (Smoothness)eDynamicGet(NotationPackage.CONNECTOR__SMOOTHNESS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__SMOOTHNESS, true, + true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSmoothness(Smoothness newSmoothness) + { + eDynamicSet(NotationPackage.CONNECTOR__SMOOTHNESS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__SMOOTHNESS, newSmoothness); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isAvoidObstructions() + { + return ((Boolean)eDynamicGet(NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUTING_STYLE__AVOID_OBSTRUCTIONS, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAvoidObstructions(boolean newAvoidObstructions) + { + eDynamicSet(NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__AVOID_OBSTRUCTIONS, + new Boolean(newAvoidObstructions)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isClosestDistance() + { + return ((Boolean)eDynamicGet(NotationPackage.CONNECTOR__CLOSEST_DISTANCE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__CLOSEST_DISTANCE, + true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setClosestDistance(boolean newClosestDistance) + { + eDynamicSet(NotationPackage.CONNECTOR__CLOSEST_DISTANCE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__CLOSEST_DISTANCE, + new Boolean(newClosestDistance)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JumpLinkStatus getJumpLinkStatus() + { + return (JumpLinkStatus)eDynamicGet(NotationPackage.CONNECTOR__JUMP_LINK_STATUS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_STATUS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJumpLinkStatus(JumpLinkStatus newJumpLinkStatus) + { + eDynamicSet(NotationPackage.CONNECTOR__JUMP_LINK_STATUS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_STATUS, + newJumpLinkStatus); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JumpLinkType getJumpLinkType() + { + return (JumpLinkType)eDynamicGet(NotationPackage.CONNECTOR__JUMP_LINK_TYPE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_TYPE, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJumpLinkType(JumpLinkType newJumpLinkType) + { + eDynamicSet(NotationPackage.CONNECTOR__JUMP_LINK_TYPE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_TYPE, newJumpLinkType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isJumpLinksReverse() + { + return ((Boolean)eDynamicGet(NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUTING_STYLE__JUMP_LINKS_REVERSE, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJumpLinksReverse(boolean newJumpLinksReverse) + { + eDynamicSet(NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINKS_REVERSE, + new Boolean(newJumpLinksReverse)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getRoundedBendpointsRadius() + { + return ((Integer)eDynamicGet(NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRoundedBendpointsRadius(int newRoundedBendpointsRadius) + { + eDynamicSet(NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, new Integer(newRoundedBendpointsRadius)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineColor() + { + return ((Integer)eDynamicGet(NotationPackage.CONNECTOR__LINE_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineColor(int newLineColor) + { + eDynamicSet(NotationPackage.CONNECTOR__LINE_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, new Integer(newLineColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineWidth() + { + return ((Integer)eDynamicGet(NotationPackage.CONNECTOR__LINE_WIDTH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineWidth(int newLineWidth) + { + eDynamicSet(NotationPackage.CONNECTOR__LINE_WIDTH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, new Integer(newLineWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.CONNECTOR__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.CONNECTOR__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR__TYPE: + return getType(); + case NotationPackage.CONNECTOR__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.CONNECTOR__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.CONNECTOR__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.CONNECTOR__STYLES: + return getStyles(); + case NotationPackage.CONNECTOR__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.CONNECTOR__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.CONNECTOR__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.CONNECTOR__SOURCE: + return getSource(); + case NotationPackage.CONNECTOR__TARGET: + return getTarget(); + case NotationPackage.CONNECTOR__BENDPOINTS: + return getBendpoints(); + case NotationPackage.CONNECTOR__SOURCE_ANCHOR: + return getSourceAnchor(); + case NotationPackage.CONNECTOR__TARGET_ANCHOR: + return getTargetAnchor(); + case NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS: + return new Integer(getRoundedBendpointsRadius()); + case NotationPackage.CONNECTOR__ROUTING: + return getRouting(); + case NotationPackage.CONNECTOR__SMOOTHNESS: + return getSmoothness(); + case NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS: + return isAvoidObstructions() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR__CLOSEST_DISTANCE: + return isClosestDistance() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR__JUMP_LINK_STATUS: + return getJumpLinkStatus(); + case NotationPackage.CONNECTOR__JUMP_LINK_TYPE: + return getJumpLinkType(); + case NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE: + return isJumpLinksReverse() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR__LINE_COLOR: + return new Integer(getLineColor()); + case NotationPackage.CONNECTOR__LINE_WIDTH: + return new Integer(getLineWidth()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.CONNECTOR__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.CONNECTOR__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR__TYPE: + setType((String)newValue); + return; + case NotationPackage.CONNECTOR__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.CONNECTOR__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.CONNECTOR__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.CONNECTOR__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.CONNECTOR__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.CONNECTOR__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.CONNECTOR__SOURCE: + setSource((View)newValue); + return; + case NotationPackage.CONNECTOR__TARGET: + setTarget((View)newValue); + return; + case NotationPackage.CONNECTOR__BENDPOINTS: + setBendpoints((Bendpoints)newValue); + return; + case NotationPackage.CONNECTOR__SOURCE_ANCHOR: + setSourceAnchor((Anchor)newValue); + return; + case NotationPackage.CONNECTOR__TARGET_ANCHOR: + setTargetAnchor((Anchor)newValue); + return; + case NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(((Integer)newValue).intValue()); + return; + case NotationPackage.CONNECTOR__ROUTING: + setRouting((Routing)newValue); + return; + case NotationPackage.CONNECTOR__SMOOTHNESS: + setSmoothness((Smoothness)newValue); + return; + case NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS: + setAvoidObstructions(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR__CLOSEST_DISTANCE: + setClosestDistance(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR__JUMP_LINK_STATUS: + setJumpLinkStatus((JumpLinkStatus)newValue); + return; + case NotationPackage.CONNECTOR__JUMP_LINK_TYPE: + setJumpLinkType((JumpLinkType)newValue); + return; + case NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE: + setJumpLinksReverse(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR__LINE_COLOR: + setLineColor(((Integer)newValue).intValue()); + return; + case NotationPackage.CONNECTOR__LINE_WIDTH: + setLineWidth(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.CONNECTOR__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.CONNECTOR__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.CONNECTOR__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.CONNECTOR__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.CONNECTOR__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.CONNECTOR__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.CONNECTOR__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.CONNECTOR__STYLES: + getStyles().clear(); + return; + case NotationPackage.CONNECTOR__ELEMENT: + unsetElement(); + return; + case NotationPackage.CONNECTOR__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.CONNECTOR__SOURCE: + setSource((View)null); + return; + case NotationPackage.CONNECTOR__TARGET: + setTarget((View)null); + return; + case NotationPackage.CONNECTOR__BENDPOINTS: + setBendpoints((Bendpoints)null); + return; + case NotationPackage.CONNECTOR__SOURCE_ANCHOR: + setSourceAnchor((Anchor)null); + return; + case NotationPackage.CONNECTOR__TARGET_ANCHOR: + setTargetAnchor((Anchor)null); + return; + case NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(ROUNDED_BENDPOINTS_RADIUS_EDEFAULT); + return; + case NotationPackage.CONNECTOR__ROUTING: + setRouting(ROUTING_EDEFAULT); + return; + case NotationPackage.CONNECTOR__SMOOTHNESS: + setSmoothness(SMOOTHNESS_EDEFAULT); + return; + case NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS: + setAvoidObstructions(AVOID_OBSTRUCTIONS_EDEFAULT); + return; + case NotationPackage.CONNECTOR__CLOSEST_DISTANCE: + setClosestDistance(CLOSEST_DISTANCE_EDEFAULT); + return; + case NotationPackage.CONNECTOR__JUMP_LINK_STATUS: + setJumpLinkStatus(JUMP_LINK_STATUS_EDEFAULT); + return; + case NotationPackage.CONNECTOR__JUMP_LINK_TYPE: + setJumpLinkType(JUMP_LINK_TYPE_EDEFAULT); + return; + case NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE: + setJumpLinksReverse(JUMP_LINKS_REVERSE_EDEFAULT); + return; + case NotationPackage.CONNECTOR__LINE_COLOR: + setLineColor(LINE_COLOR_EDEFAULT); + return; + case NotationPackage.CONNECTOR__LINE_WIDTH: + setLineWidth(LINE_WIDTH_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.CONNECTOR__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.CONNECTOR__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.CONNECTOR__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.CONNECTOR__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.CONNECTOR__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.CONNECTOR__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.CONNECTOR__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.CONNECTOR__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.CONNECTOR__ELEMENT: + return isSetElement(); + case NotationPackage.CONNECTOR__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.CONNECTOR__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.CONNECTOR__SOURCE: + return getSource() != null; + case NotationPackage.CONNECTOR__TARGET: + return getTarget() != null; + case NotationPackage.CONNECTOR__BENDPOINTS: + return getBendpoints() != null; + case NotationPackage.CONNECTOR__SOURCE_ANCHOR: + return getSourceAnchor() != null; + case NotationPackage.CONNECTOR__TARGET_ANCHOR: + return getTargetAnchor() != null; + case NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS: + return getRoundedBendpointsRadius() != ROUNDED_BENDPOINTS_RADIUS_EDEFAULT; + case NotationPackage.CONNECTOR__ROUTING: + return getRouting() != ROUTING_EDEFAULT; + case NotationPackage.CONNECTOR__SMOOTHNESS: + return getSmoothness() != SMOOTHNESS_EDEFAULT; + case NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS: + return isAvoidObstructions() != AVOID_OBSTRUCTIONS_EDEFAULT; + case NotationPackage.CONNECTOR__CLOSEST_DISTANCE: + return isClosestDistance() != CLOSEST_DISTANCE_EDEFAULT; + case NotationPackage.CONNECTOR__JUMP_LINK_STATUS: + return getJumpLinkStatus() != JUMP_LINK_STATUS_EDEFAULT; + case NotationPackage.CONNECTOR__JUMP_LINK_TYPE: + return getJumpLinkType() != JUMP_LINK_TYPE_EDEFAULT; + case NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE: + return isJumpLinksReverse() != JUMP_LINKS_REVERSE_EDEFAULT; + case NotationPackage.CONNECTOR__LINE_COLOR: + return getLineColor() != LINE_COLOR_EDEFAULT; + case NotationPackage.CONNECTOR__LINE_WIDTH: + return getLineWidth() != LINE_WIDTH_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Style.class) + { + switch (derivedFeatureID) + { + default: + return -1; + } + } + if (baseClass == RoundedCornersStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS: + return NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS; + default: + return -1; + } + } + if (baseClass == RoutingStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.CONNECTOR__ROUTING: + return NotationPackage.ROUTING_STYLE__ROUTING; + case NotationPackage.CONNECTOR__SMOOTHNESS: + return NotationPackage.ROUTING_STYLE__SMOOTHNESS; + case NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS: + return NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS; + case NotationPackage.CONNECTOR__CLOSEST_DISTANCE: + return NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE; + case NotationPackage.CONNECTOR__JUMP_LINK_STATUS: + return NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS; + case NotationPackage.CONNECTOR__JUMP_LINK_TYPE: + return NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE; + case NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE: + return NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE; + default: + return -1; + } + } + if (baseClass == LineStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.CONNECTOR__LINE_COLOR: + return NotationPackage.LINE_STYLE__LINE_COLOR; + case NotationPackage.CONNECTOR__LINE_WIDTH: + return NotationPackage.LINE_STYLE__LINE_WIDTH; + default: + return -1; + } + } + if (baseClass == ConnectorStyle.class) + { + switch (derivedFeatureID) + { + 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 == Style.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + if (baseClass == RoundedCornersStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return NotationPackage.CONNECTOR__ROUNDED_BENDPOINTS_RADIUS; + default: + return -1; + } + } + if (baseClass == RoutingStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.ROUTING_STYLE__ROUTING: + return NotationPackage.CONNECTOR__ROUTING; + case NotationPackage.ROUTING_STYLE__SMOOTHNESS: + return NotationPackage.CONNECTOR__SMOOTHNESS; + case NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS: + return NotationPackage.CONNECTOR__AVOID_OBSTRUCTIONS; + case NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE: + return NotationPackage.CONNECTOR__CLOSEST_DISTANCE; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS: + return NotationPackage.CONNECTOR__JUMP_LINK_STATUS; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE: + return NotationPackage.CONNECTOR__JUMP_LINK_TYPE; + case NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE: + return NotationPackage.CONNECTOR__JUMP_LINKS_REVERSE; + default: + return -1; + } + } + if (baseClass == LineStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + return NotationPackage.CONNECTOR__LINE_COLOR; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + return NotationPackage.CONNECTOR__LINE_WIDTH; + default: + return -1; + } + } + if (baseClass == ConnectorStyle.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // ConnectorImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ConnectorStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ConnectorStyleImpl.java new file mode 100644 index 0000000000..e02e3f1986 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ConnectorStyleImpl.java @@ -0,0 +1,327 @@ +/****************************************************************************** + * Copyright (c) 2004, 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.ConnectorStyle; +import org.eclipse.gmf.runtime.notation.JumpLinkStatus; +import org.eclipse.gmf.runtime.notation.JumpLinkType; +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Routing; +import org.eclipse.gmf.runtime.notation.Smoothness; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Connector Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorStyleImpl#getLineColor <em>Line Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ConnectorStyleImpl#getLineWidth <em>Line Width</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class ConnectorStyleImpl extends RoutingStyleImpl implements ConnectorStyle +{ + + /** + * The default value of the '{@link #getLineColor() <em>Line Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineColor() + * @generated + * @ordered + */ + protected static final int LINE_COLOR_EDEFAULT = 11579568; + + /** + * The default value of the '{@link #getLineWidth() <em>Line Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineWidth() + * @generated + * @ordered + */ + protected static final int LINE_WIDTH_EDEFAULT = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ConnectorStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.CONNECTOR_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineColor() + { + return ((Integer)eDynamicGet(NotationPackage.CONNECTOR_STYLE__LINE_COLOR, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineColor(int newLineColor) + { + eDynamicSet(NotationPackage.CONNECTOR_STYLE__LINE_COLOR, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, new Integer(newLineColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineWidth() + { + return ((Integer)eDynamicGet(NotationPackage.CONNECTOR_STYLE__LINE_WIDTH, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineWidth(int newLineWidth) + { + eDynamicSet(NotationPackage.CONNECTOR_STYLE__LINE_WIDTH, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, new Integer(newLineWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.CONNECTOR_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return new Integer(getRoundedBendpointsRadius()); + case NotationPackage.CONNECTOR_STYLE__ROUTING: + return getRouting(); + case NotationPackage.CONNECTOR_STYLE__SMOOTHNESS: + return getSmoothness(); + case NotationPackage.CONNECTOR_STYLE__AVOID_OBSTRUCTIONS: + return isAvoidObstructions() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR_STYLE__CLOSEST_DISTANCE: + return isClosestDistance() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_STATUS: + return getJumpLinkStatus(); + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_TYPE: + return getJumpLinkType(); + case NotationPackage.CONNECTOR_STYLE__JUMP_LINKS_REVERSE: + return isJumpLinksReverse() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.CONNECTOR_STYLE__LINE_COLOR: + return new Integer(getLineColor()); + case NotationPackage.CONNECTOR_STYLE__LINE_WIDTH: + return new Integer(getLineWidth()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.CONNECTOR_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(((Integer)newValue).intValue()); + return; + case NotationPackage.CONNECTOR_STYLE__ROUTING: + setRouting((Routing)newValue); + return; + case NotationPackage.CONNECTOR_STYLE__SMOOTHNESS: + setSmoothness((Smoothness)newValue); + return; + case NotationPackage.CONNECTOR_STYLE__AVOID_OBSTRUCTIONS: + setAvoidObstructions(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR_STYLE__CLOSEST_DISTANCE: + setClosestDistance(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_STATUS: + setJumpLinkStatus((JumpLinkStatus)newValue); + return; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_TYPE: + setJumpLinkType((JumpLinkType)newValue); + return; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINKS_REVERSE: + setJumpLinksReverse(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.CONNECTOR_STYLE__LINE_COLOR: + setLineColor(((Integer)newValue).intValue()); + return; + case NotationPackage.CONNECTOR_STYLE__LINE_WIDTH: + setLineWidth(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.CONNECTOR_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(ROUNDED_BENDPOINTS_RADIUS_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__ROUTING: + setRouting(ROUTING_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__SMOOTHNESS: + setSmoothness(SMOOTHNESS_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__AVOID_OBSTRUCTIONS: + setAvoidObstructions(AVOID_OBSTRUCTIONS_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__CLOSEST_DISTANCE: + setClosestDistance(CLOSEST_DISTANCE_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_STATUS: + setJumpLinkStatus(JUMP_LINK_STATUS_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_TYPE: + setJumpLinkType(JUMP_LINK_TYPE_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINKS_REVERSE: + setJumpLinksReverse(JUMP_LINKS_REVERSE_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__LINE_COLOR: + setLineColor(LINE_COLOR_EDEFAULT); + return; + case NotationPackage.CONNECTOR_STYLE__LINE_WIDTH: + setLineWidth(LINE_WIDTH_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.CONNECTOR_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return getRoundedBendpointsRadius() != ROUNDED_BENDPOINTS_RADIUS_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__ROUTING: + return getRouting() != ROUTING_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__SMOOTHNESS: + return getSmoothness() != SMOOTHNESS_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__AVOID_OBSTRUCTIONS: + return isAvoidObstructions() != AVOID_OBSTRUCTIONS_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__CLOSEST_DISTANCE: + return isClosestDistance() != CLOSEST_DISTANCE_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_STATUS: + return getJumpLinkStatus() != JUMP_LINK_STATUS_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINK_TYPE: + return getJumpLinkType() != JUMP_LINK_TYPE_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__JUMP_LINKS_REVERSE: + return isJumpLinksReverse() != JUMP_LINKS_REVERSE_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__LINE_COLOR: + return getLineColor() != LINE_COLOR_EDEFAULT; + case NotationPackage.CONNECTOR_STYLE__LINE_WIDTH: + return getLineWidth() != LINE_WIDTH_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == LineStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.CONNECTOR_STYLE__LINE_COLOR: + return NotationPackage.LINE_STYLE__LINE_COLOR; + case NotationPackage.CONNECTOR_STYLE__LINE_WIDTH: + return NotationPackage.LINE_STYLE__LINE_WIDTH; + 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 == LineStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + return NotationPackage.CONNECTOR_STYLE__LINE_COLOR; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + return NotationPackage.CONNECTOR_STYLE__LINE_WIDTH; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // ConnectorStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DataTypeStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DataTypeStyleImpl.java new file mode 100644 index 0000000000..6b3369d354 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DataTypeStyleImpl.java @@ -0,0 +1,194 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.gmf.runtime.notation.DataTypeStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Data Type Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DataTypeStyleImpl#getInstanceType <em>Instance Type</em>}</li> + * </ul> + * + * @generated + */ +public class DataTypeStyleImpl extends NamedStyleImpl implements DataTypeStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DataTypeStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DATA_TYPE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getInstanceType() + { + return (EDataType)eDynamicGet(NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE, NotationPackage.Literals.DATA_TYPE_STYLE__INSTANCE_TYPE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType basicGetInstanceType() + { + return (EDataType)eDynamicGet(NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE, NotationPackage.Literals.DATA_TYPE_STYLE__INSTANCE_TYPE, false, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setInstanceType(EDataType newInstanceType) + { + eDynamicSet(NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE, NotationPackage.Literals.DATA_TYPE_STYLE__INSTANCE_TYPE, newInstanceType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String getStringFromObject(Object objectValue) + { + if (getInstanceType() == null && objectValue instanceof String) + { + return (String)objectValue; + } + return EcoreUtil.convertToString(getInstanceType(), objectValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Object getObjectFromString(String stringValue) + { + if (getInstanceType() == null) + { + return stringValue; + } + return EcoreUtil.createFromString(getInstanceType(), stringValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DATA_TYPE_STYLE__NAME: + return getName(); + case NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE: + if (resolve) + { + return getInstanceType(); + } + return basicGetInstanceType(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DATA_TYPE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE: + setInstanceType((EDataType)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DATA_TYPE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE: + setInstanceType((EDataType)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DATA_TYPE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.DATA_TYPE_STYLE__INSTANCE_TYPE: + return basicGetInstanceType() != null; + } + return eDynamicIsSet(featureID); + } + +} // DataTypeStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DecorationNodeImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DecorationNodeImpl.java new file mode 100644 index 0000000000..743f46113a --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DecorationNodeImpl.java @@ -0,0 +1,279 @@ +/****************************************************************************** + * Copyright (c) 2008, 2010, 2018 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + * Eike Stepper - Migration to CDO + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +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.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EContentsEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Decoration Node</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated NOT + * @since 1.2 + */ +public class DecorationNodeImpl extends BasicDecorationNodeImpl implements DecorationNode +{ + + protected DecorationNodeImpl() + { + super(); + } + + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DECORATION_NODE; + } + + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.DECORATION_NODE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.DECORATION_NODE__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.DECORATION_NODE__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.DECORATION_NODE__PERSISTED_CHILDREN: + return ((InternalEList)getPersistedChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.DECORATION_NODE__STYLES: + return ((InternalEList)getStyles()).basicRemove(otherEnd, msgs); + case NotationPackage.DECORATION_NODE__TRANSIENT_CHILDREN: + return ((InternalEList)getTransientChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.DECORATION_NODE__LAYOUT_CONSTRAINT: + return basicSetLayoutConstraint(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DECORATION_NODE__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.DECORATION_NODE__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.DECORATION_NODE__TYPE: + return getType(); + case NotationPackage.DECORATION_NODE__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.DECORATION_NODE__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.DECORATION_NODE__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.DECORATION_NODE__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.DECORATION_NODE__STYLES: + return getStyles(); + case NotationPackage.DECORATION_NODE__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.DECORATION_NODE__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.DECORATION_NODE__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.DECORATION_NODE__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DECORATION_NODE__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.DECORATION_NODE__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.DECORATION_NODE__TYPE: + setType((String)newValue); + return; + case NotationPackage.DECORATION_NODE__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.DECORATION_NODE__SOURCE_EDGES: + case NotationPackage.DECORATION_NODE__TARGET_EDGES: + return; + case NotationPackage.DECORATION_NODE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.DECORATION_NODE__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.DECORATION_NODE__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.DECORATION_NODE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.DECORATION_NODE__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DECORATION_NODE__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.DECORATION_NODE__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.DECORATION_NODE__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.DECORATION_NODE__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.DECORATION_NODE__SOURCE_EDGES: + case NotationPackage.DECORATION_NODE__TARGET_EDGES: + return; + case NotationPackage.DECORATION_NODE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.DECORATION_NODE__STYLES: + getStyles().clear(); + return; + case NotationPackage.DECORATION_NODE__ELEMENT: + unsetElement(); + return; + case NotationPackage.DECORATION_NODE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.DECORATION_NODE__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + } + eDynamicUnset(featureID); + } + + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DECORATION_NODE__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.DECORATION_NODE__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.DECORATION_NODE__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.DECORATION_NODE__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.DECORATION_NODE__SOURCE_EDGES: + return false; + case NotationPackage.DECORATION_NODE__TARGET_EDGES: + return false; + case NotationPackage.DECORATION_NODE__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.DECORATION_NODE__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.DECORATION_NODE__ELEMENT: + return isSetElement(); + case NotationPackage.DECORATION_NODE__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.DECORATION_NODE__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.DECORATION_NODE__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + } + return eDynamicIsSet(featureID); + } + + @Override + public EList getPersistedChildren() + { + return (EList)eDynamicGet(NotationPackage.VIEW__PERSISTED_CHILDREN - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__PERSISTED_CHILDREN, true, true); + } + + @Override + public EList getChildren() + { + return new EContentsEList(this, childrenFeatures); + // if (allChildren == null) { + // allChildren = new EContentsEList(this, childrenFeatures); + // } + // return allChildren; + } + + @Override + public EList getStyles() + { + return (EList)eDynamicGet(NotationPackage.VIEW__STYLES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__STYLES, true, true); + } + + @Override + public EList getTransientChildren() + { + return (EList)eDynamicGet(NotationPackage.VIEW__TRANSIENT_CHILDREN - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TRANSIENT_CHILDREN, true, true); + } + + @Override + public LayoutConstraint getLayoutConstraint() + { + return (LayoutConstraint)eDynamicGet(NotationPackage.NODE__LAYOUT_CONSTRAINT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.NODE__LAYOUT_CONSTRAINT, + true, true); + } + + @Override + public NotificationChain basicSetLayoutConstraint(LayoutConstraint newLayoutConstraint, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newLayoutConstraint, NotationPackage.NODE__LAYOUT_CONSTRAINT, msgs); + return msgs; + } + + @Override + public void setLayoutConstraint(LayoutConstraint newLayoutConstraint) + { + eDynamicSet(NotationPackage.NODE__LAYOUT_CONSTRAINT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.NODE__LAYOUT_CONSTRAINT, newLayoutConstraint); + } + +} // DecorationNodeImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DescriptionStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DescriptionStyleImpl.java new file mode 100644 index 0000000000..b6036cfb2b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DescriptionStyleImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Description Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DescriptionStyleImpl#getDescription <em>Description</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class DescriptionStyleImpl extends CDOObjectImpl implements DescriptionStyle +{ + /** + * 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 = ""; //$NON-NLS-1$ + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DescriptionStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DESCRIPTION_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() + { + return (String)eDynamicGet(NotationPackage.DESCRIPTION_STYLE__DESCRIPTION, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) + { + eDynamicSet(NotationPackage.DESCRIPTION_STYLE__DESCRIPTION, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, newDescription); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + return getDescription(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + setDescription((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? getDescription() != null : !DESCRIPTION_EDEFAULT.equals(getDescription()); + } + return eDynamicIsSet(featureID); + } + +} // DescriptionStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramImpl.java new file mode 100644 index 0000000000..f06a6dfc4f --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramImpl.java @@ -0,0 +1,561 @@ +/****************************************************************************** + * Copyright (c) 2004, 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +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.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EContentsEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.MeasurementUnit; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Diagram</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramImpl#getMeasurementUnit <em>Measurement Unit</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramImpl#getPersistedEdges <em>Persisted Edges</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramImpl#getTransientEdges <em>Transient Edges</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class DiagramImpl extends ViewImpl implements Diagram +{ + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = ""; //$NON-NLS-1$ + + /** + * The default value of the '{@link #getMeasurementUnit() <em>Measurement Unit</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMeasurementUnit() + * @generated + * @ordered + */ + protected static final MeasurementUnit MEASUREMENT_UNIT_EDEFAULT = MeasurementUnit.HIMETRIC_LITERAL; + + private EContentsEList allEdges = null; + + protected static final EStructuralFeature[] edgesFeatures = new EStructuralFeature[] { NotationPackage.Literals.DIAGRAM__PERSISTED_EDGES, + NotationPackage.Literals.DIAGRAM__TRANSIENT_EDGES }; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected DiagramImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DIAGRAM; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getName() + { + return (String)eDynamicGet(NotationPackage.DIAGRAM__NAME - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__NAME, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) + { + eDynamicSet(NotationPackage.DIAGRAM__NAME - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__NAME, newName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MeasurementUnit getMeasurementUnit() + { + return (MeasurementUnit)eDynamicGet(NotationPackage.DIAGRAM__MEASUREMENT_UNIT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__MEASUREMENT_UNIT, + true, true); + } + + /** + * <!-- begin-user-doc --> Set the Measurement Unit for this Diagram, the + * Measurement unit can be set only once, the set method will not set the + * value if it was already set <!-- end-user-doc --> + * @generated NOT + */ + public void setMeasurementUnit(MeasurementUnit newMeasurementUnit) + { + if (!isSetMeasurementUnit()) + { + setMeasurementUnitGen(newMeasurementUnit); + } /* + * else { throw new UnsupportedOperationException(); } + */ + } + + /** + * <!-- begin-user-doc --> Set the Measurement Unit for this Diagram, the + * Measurement unit can be set only once, the set method will not set the + * value if it was already set <!-- end-user-doc --> + * @generated + */ + public void setMeasurementUnitGen(MeasurementUnit newMeasurementUnit) + { + eDynamicSet(NotationPackage.DIAGRAM__MEASUREMENT_UNIT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__MEASUREMENT_UNIT, newMeasurementUnit); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void unsetMeasurementUnit() + { + /* throw new UnsupportedOperationException(); */ + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isSetMeasurementUnit() + { + return eDynamicIsSet(NotationPackage.DIAGRAM__MEASUREMENT_UNIT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__MEASUREMENT_UNIT); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public EList getEdges() + { + if (allEdges == null) + { + allEdges = new EContentsEList(this, edgesFeatures); + } + return allEdges; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getPersistedEdges() + { + return (EList)eDynamicGet(NotationPackage.DIAGRAM__PERSISTED_EDGES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__PERSISTED_EDGES, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getTransientEdges() + { + return (EList)eDynamicGet(NotationPackage.DIAGRAM__TRANSIENT_EDGES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DIAGRAM__TRANSIENT_EDGES, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public Edge createEdge(EClass eClass) + { + Edge newEdge = (Edge)eClass.getEPackage().getEFactoryInstance().create(eClass); + getPersistedEdges().add(newEdge); + return newEdge; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.DIAGRAM__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__PERSISTED_CHILDREN: + return ((InternalEList)getPersistedChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__STYLES: + return ((InternalEList)getStyles()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__TRANSIENT_CHILDREN: + return ((InternalEList)getTransientChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__PERSISTED_EDGES: + return ((InternalEList)getPersistedEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM__TRANSIENT_EDGES: + return ((InternalEList)getTransientEdges()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DIAGRAM__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.DIAGRAM__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.DIAGRAM__TYPE: + return getType(); + case NotationPackage.DIAGRAM__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.DIAGRAM__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.DIAGRAM__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.DIAGRAM__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.DIAGRAM__STYLES: + return getStyles(); + case NotationPackage.DIAGRAM__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.DIAGRAM__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.DIAGRAM__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.DIAGRAM__NAME: + return getName(); + case NotationPackage.DIAGRAM__MEASUREMENT_UNIT: + return getMeasurementUnit(); + case NotationPackage.DIAGRAM__PERSISTED_EDGES: + return getPersistedEdges(); + case NotationPackage.DIAGRAM__TRANSIENT_EDGES: + return getTransientEdges(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DIAGRAM__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.DIAGRAM__TYPE: + setType((String)newValue); + return; + case NotationPackage.DIAGRAM__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.DIAGRAM__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.DIAGRAM__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__NAME: + setName((String)newValue); + return; + case NotationPackage.DIAGRAM__MEASUREMENT_UNIT: + setMeasurementUnit((MeasurementUnit)newValue); + return; + case NotationPackage.DIAGRAM__PERSISTED_EDGES: + getPersistedEdges().clear(); + getPersistedEdges().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM__TRANSIENT_EDGES: + getTransientEdges().clear(); + getTransientEdges().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DIAGRAM__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.DIAGRAM__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.DIAGRAM__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.DIAGRAM__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.DIAGRAM__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.DIAGRAM__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.DIAGRAM__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.DIAGRAM__STYLES: + getStyles().clear(); + return; + case NotationPackage.DIAGRAM__ELEMENT: + unsetElement(); + return; + case NotationPackage.DIAGRAM__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.DIAGRAM__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.DIAGRAM__MEASUREMENT_UNIT: + unsetMeasurementUnit(); + return; + case NotationPackage.DIAGRAM__PERSISTED_EDGES: + getPersistedEdges().clear(); + return; + case NotationPackage.DIAGRAM__TRANSIENT_EDGES: + getTransientEdges().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DIAGRAM__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.DIAGRAM__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.DIAGRAM__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.DIAGRAM__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.DIAGRAM__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.DIAGRAM__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.DIAGRAM__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.DIAGRAM__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.DIAGRAM__ELEMENT: + return isSetElement(); + case NotationPackage.DIAGRAM__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.DIAGRAM__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.DIAGRAM__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.DIAGRAM__MEASUREMENT_UNIT: + return isSetMeasurementUnit(); + case NotationPackage.DIAGRAM__PERSISTED_EDGES: + return !getPersistedEdges().isEmpty(); + case NotationPackage.DIAGRAM__TRANSIENT_EDGES: + return !getTransientEdges().isEmpty(); + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void insertEdge(Edge edge) + { + persistEdges(); + getPersistedEdges().add(edge); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void insertEdgeAt(Edge edge, int index) + { + persistEdges(); + if (getPersistedEdges().size() >= index) + { + getPersistedEdges().add(index, edge); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void insertEdge(Edge edge, boolean persisted) + { + List edges = null; + if (persisted) + { + edges = getPersistedEdges(); + } + else + { + edges = getTransientEdges(); + } + edges.add(edge); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void persistEdges() + { + if (eIsSet(NotationPackage.DIAGRAM__TRANSIENT_EDGES)) + { + List edges = new ArrayList(getTransientEdges()); + getPersistedEdges().addAll(edges); + for (Iterator iterator = edges.iterator(); iterator.hasNext();) + { + Edge edge = (Edge)iterator.next(); + View sourceView = edge.getSource(); + View targetView = edge.getTarget(); + if (sourceView != null) + { + persistCompleteHierarchy(sourceView); + } + if (targetView != null) + { + persistCompleteHierarchy(targetView); + } + } + } + } + + /** + * Persist the view passed in and all its parent views if they are + * transient. + * + * @param view + * the view to persist + */ + private void persistCompleteHierarchy(View view) + { + view.persist(); + EObject container = view.eContainer(); + while (container instanceof View) + { + // if already persisted, quit + EStructuralFeature sFeature = container.eContainingFeature(); + if (sFeature != null && !sFeature.isTransient()) + { + break; + } + + ((View)container).persist(); + container = container.eContainer(); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void removeEdge(Edge edge) + { + if (edge.eContainer() == this) + { + EStructuralFeature eContainingFeature = edge.eContainingFeature(); + if (eContainingFeature == NotationPackage.Literals.DIAGRAM__TRANSIENT_EDGES) + { + getTransientEdges().remove(edge); + } + else if (eContainingFeature == NotationPackage.Literals.DIAGRAM__PERSISTED_EDGES) + { + getPersistedEdges().remove(edge); + } + } + } + +} // DiagramImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramLinkStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramLinkStyleImpl.java new file mode 100644 index 0000000000..e53d555d17 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramLinkStyleImpl.java @@ -0,0 +1,168 @@ +/****************************************************************************** + * Copyright (c) 2007, 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.DiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Diagram Link Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramLinkStyleImpl#getDiagramLink <em>Diagram Link</em>}</li> + * </ul> + * + * @generated + */ +public class DiagramLinkStyleImpl extends CDOObjectImpl implements DiagramLinkStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DiagramLinkStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DIAGRAM_LINK_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Diagram getDiagramLink() + { + return (Diagram)eDynamicGet(NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK, NotationPackage.Literals.DIAGRAM_LINK_STYLE__DIAGRAM_LINK, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Diagram basicGetDiagramLink() + { + return (Diagram)eDynamicGet(NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK, NotationPackage.Literals.DIAGRAM_LINK_STYLE__DIAGRAM_LINK, false, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDiagramLink(Diagram newDiagramLink) + { + eDynamicSet(NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK, NotationPackage.Literals.DIAGRAM_LINK_STYLE__DIAGRAM_LINK, newDiagramLink); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + if (resolve) + { + return getDiagramLink(); + } + return basicGetDiagramLink(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + setDiagramLink((Diagram)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + setDiagramLink((Diagram)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + return basicGetDiagramLink() != null; + } + return eDynamicIsSet(featureID); + } + +} // DiagramLinkStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramStyleImpl.java new file mode 100644 index 0000000000..f5b076366b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DiagramStyleImpl.java @@ -0,0 +1,331 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +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.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.DiagramStyle; +import org.eclipse.gmf.runtime.notation.GuideStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Diagram Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramStyleImpl#getHorizontalGuides <em>Horizontal Guides</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramStyleImpl#getVerticalGuides <em>Vertical Guides</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DiagramStyleImpl#getDescription <em>Description</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class DiagramStyleImpl extends PageStyleImpl implements DiagramStyle +{ + + /** + * 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 = ""; //$NON-NLS-1$ + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DiagramStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DIAGRAM_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getHorizontalGuides() + { + return (EList)eDynamicGet(NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES, NotationPackage.Literals.GUIDE_STYLE__HORIZONTAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getVerticalGuides() + { + return (EList)eDynamicGet(NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES, NotationPackage.Literals.GUIDE_STYLE__VERTICAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() + { + return (String)eDynamicGet(NotationPackage.DIAGRAM_STYLE__DESCRIPTION, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) + { + eDynamicSet(NotationPackage.DIAGRAM_STYLE__DESCRIPTION, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, newDescription); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: + return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); + case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: + return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_STYLE__PAGE_X: + return new Integer(getPageX()); + case NotationPackage.DIAGRAM_STYLE__PAGE_Y: + return new Integer(getPageY()); + case NotationPackage.DIAGRAM_STYLE__PAGE_WIDTH: + return new Integer(getPageWidth()); + case NotationPackage.DIAGRAM_STYLE__PAGE_HEIGHT: + return new Integer(getPageHeight()); + case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: + return getHorizontalGuides(); + case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: + return getVerticalGuides(); + case NotationPackage.DIAGRAM_STYLE__DESCRIPTION: + return getDescription(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_STYLE__PAGE_X: + setPageX(((Integer)newValue).intValue()); + return; + case NotationPackage.DIAGRAM_STYLE__PAGE_Y: + setPageY(((Integer)newValue).intValue()); + return; + case NotationPackage.DIAGRAM_STYLE__PAGE_WIDTH: + setPageWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.DIAGRAM_STYLE__PAGE_HEIGHT: + setPageHeight(((Integer)newValue).intValue()); + return; + case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + getHorizontalGuides().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: + getVerticalGuides().clear(); + getVerticalGuides().addAll((Collection)newValue); + return; + case NotationPackage.DIAGRAM_STYLE__DESCRIPTION: + setDescription((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_STYLE__PAGE_X: + setPageX(PAGE_X_EDEFAULT); + return; + case NotationPackage.DIAGRAM_STYLE__PAGE_Y: + setPageY(PAGE_Y_EDEFAULT); + return; + case NotationPackage.DIAGRAM_STYLE__PAGE_WIDTH: + setPageWidth(PAGE_WIDTH_EDEFAULT); + return; + case NotationPackage.DIAGRAM_STYLE__PAGE_HEIGHT: + setPageHeight(PAGE_HEIGHT_EDEFAULT); + return; + case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + return; + case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: + getVerticalGuides().clear(); + return; + case NotationPackage.DIAGRAM_STYLE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DIAGRAM_STYLE__PAGE_X: + return getPageX() != PAGE_X_EDEFAULT; + case NotationPackage.DIAGRAM_STYLE__PAGE_Y: + return getPageY() != PAGE_Y_EDEFAULT; + case NotationPackage.DIAGRAM_STYLE__PAGE_WIDTH: + return getPageWidth() != PAGE_WIDTH_EDEFAULT; + case NotationPackage.DIAGRAM_STYLE__PAGE_HEIGHT: + return getPageHeight() != PAGE_HEIGHT_EDEFAULT; + case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: + return !getHorizontalGuides().isEmpty(); + case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: + return !getVerticalGuides().isEmpty(); + case NotationPackage.DIAGRAM_STYLE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? getDescription() != null : !DESCRIPTION_EDEFAULT.equals(getDescription()); + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == GuideStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: + return NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES; + case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: + return NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES; + default: + return -1; + } + } + if (baseClass == DescriptionStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.DIAGRAM_STYLE__DESCRIPTION: + return NotationPackage.DESCRIPTION_STYLE__DESCRIPTION; + 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 == GuideStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES; + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES; + default: + return -1; + } + } + if (baseClass == DescriptionStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + return NotationPackage.DIAGRAM_STYLE__DESCRIPTION; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // DiagramStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DoubleListValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DoubleListValueStyleImpl.java new file mode 100644 index 0000000000..ba819d7732 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DoubleListValueStyleImpl.java @@ -0,0 +1,145 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.DoubleListValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Double List Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DoubleListValueStyleImpl#getDoubleListValue <em>Double List Value</em>}</li> + * </ul> + * + * @generated + */ +public class DoubleListValueStyleImpl extends NamedStyleImpl implements DoubleListValueStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DoubleListValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DOUBLE_LIST_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getDoubleListValue() + { + return (EList)eDynamicGet(NotationPackage.DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE, NotationPackage.Literals.DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE: + return getDoubleListValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE: + getDoubleListValue().clear(); + getDoubleListValue().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE: + getDoubleListValue().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE: + return !getDoubleListValue().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // DoubleListValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DoubleValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DoubleValueStyleImpl.java new file mode 100644 index 0000000000..258565372d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DoubleValueStyleImpl.java @@ -0,0 +1,161 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.DoubleValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Double Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DoubleValueStyleImpl#getDoubleValue <em>Double Value</em>}</li> + * </ul> + * + * @generated + */ +public class DoubleValueStyleImpl extends NamedStyleImpl implements DoubleValueStyle +{ + /** + * The default value of the '{@link #getDoubleValue() <em>Double Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDoubleValue() + * @generated + * @ordered + */ + protected static final double DOUBLE_VALUE_EDEFAULT = 0.0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DoubleValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DOUBLE_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public double getDoubleValue() + { + return ((Double)eDynamicGet(NotationPackage.DOUBLE_VALUE_STYLE__DOUBLE_VALUE, NotationPackage.Literals.DOUBLE_VALUE_STYLE__DOUBLE_VALUE, true, true)) + .doubleValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDoubleValue(double newDoubleValue) + { + eDynamicSet(NotationPackage.DOUBLE_VALUE_STYLE__DOUBLE_VALUE, NotationPackage.Literals.DOUBLE_VALUE_STYLE__DOUBLE_VALUE, new Double(newDoubleValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DOUBLE_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.DOUBLE_VALUE_STYLE__DOUBLE_VALUE: + return new Double(getDoubleValue()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DOUBLE_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.DOUBLE_VALUE_STYLE__DOUBLE_VALUE: + setDoubleValue(((Double)newValue).doubleValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DOUBLE_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.DOUBLE_VALUE_STYLE__DOUBLE_VALUE: + setDoubleValue(DOUBLE_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DOUBLE_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.DOUBLE_VALUE_STYLE__DOUBLE_VALUE: + return getDoubleValue() != DOUBLE_VALUE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // DoubleValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DrawerStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DrawerStyleImpl.java new file mode 100644 index 0000000000..58d34a73ff --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/DrawerStyleImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.DrawerStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Drawer Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.DrawerStyleImpl#isCollapsed <em>Collapsed</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class DrawerStyleImpl extends CDOObjectImpl implements DrawerStyle +{ + /** + * The default value of the '{@link #isCollapsed() <em>Collapsed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isCollapsed() + * @generated + * @ordered + */ + protected static final boolean COLLAPSED_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DrawerStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.DRAWER_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isCollapsed() + { + return ((Boolean)eDynamicGet(NotationPackage.DRAWER_STYLE__COLLAPSED, NotationPackage.Literals.DRAWER_STYLE__COLLAPSED, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCollapsed(boolean newCollapsed) + { + eDynamicSet(NotationPackage.DRAWER_STYLE__COLLAPSED, NotationPackage.Literals.DRAWER_STYLE__COLLAPSED, new Boolean(newCollapsed)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.DRAWER_STYLE__COLLAPSED: + return isCollapsed() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.DRAWER_STYLE__COLLAPSED: + setCollapsed(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.DRAWER_STYLE__COLLAPSED: + setCollapsed(COLLAPSED_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.DRAWER_STYLE__COLLAPSED: + return isCollapsed() != COLLAPSED_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // DrawerStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EObjectListValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EObjectListValueStyleImpl.java new file mode 100644 index 0000000000..defea78edb --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EObjectListValueStyleImpl.java @@ -0,0 +1,145 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.EObjectListValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>EObject List Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EObjectListValueStyleImpl#getEObjectListValue <em>EObject List Value</em>}</li> + * </ul> + * + * @generated + */ +public class EObjectListValueStyleImpl extends NamedStyleImpl implements EObjectListValueStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EObjectListValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getEObjectListValue() + { + return (EList)eDynamicGet(NotationPackage.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE, + NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE: + return getEObjectListValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE: + getEObjectListValue().clear(); + getEObjectListValue().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE: + getEObjectListValue().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE: + return !getEObjectListValue().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // EObjectListValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EObjectValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EObjectValueStyleImpl.java new file mode 100644 index 0000000000..e573ed39b4 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EObjectValueStyleImpl.java @@ -0,0 +1,165 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.EObjectValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>EObject Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EObjectValueStyleImpl#getEObjectValue <em>EObject Value</em>}</li> + * </ul> + * + * @generated + */ +public class EObjectValueStyleImpl extends NamedStyleImpl implements EObjectValueStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EObjectValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.EOBJECT_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject getEObjectValue() + { + return (EObject)eDynamicGet(NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE, NotationPackage.Literals.EOBJECT_VALUE_STYLE__EOBJECT_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObject basicGetEObjectValue() + { + return (EObject)eDynamicGet(NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE, NotationPackage.Literals.EOBJECT_VALUE_STYLE__EOBJECT_VALUE, false, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setEObjectValue(EObject newEObjectValue) + { + eDynamicSet(NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE, NotationPackage.Literals.EOBJECT_VALUE_STYLE__EOBJECT_VALUE, newEObjectValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.EOBJECT_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE: + if (resolve) + { + return getEObjectValue(); + } + return basicGetEObjectValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.EOBJECT_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE: + setEObjectValue((EObject)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.EOBJECT_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE: + setEObjectValue((EObject)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.EOBJECT_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.EOBJECT_VALUE_STYLE__EOBJECT_VALUE: + return basicGetEObjectValue() != null; + } + return eDynamicIsSet(featureID); + } + +} // EObjectValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EdgeImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EdgeImpl.java new file mode 100644 index 0000000000..f2552a57e3 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/EdgeImpl.java @@ -0,0 +1,598 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.Anchor; +import org.eclipse.gmf.runtime.notation.Bendpoints; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Edge</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EdgeImpl#getSource <em>Source</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EdgeImpl#getTarget <em>Target</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EdgeImpl#getBendpoints <em>Bendpoints</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EdgeImpl#getSourceAnchor <em>Source Anchor</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.EdgeImpl#getTargetAnchor <em>Target Anchor</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class EdgeImpl extends ViewImpl implements Edge +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EdgeImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.EDGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public View getSource() + { + return (View)eDynamicGet(NotationPackage.EDGE__SOURCE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__SOURCE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public NotificationChain basicSetSource(View newSource, NotificationChain msgs) + { + if (eContainingFeature() == NotationPackage.eINSTANCE.getDiagram_PersistedEdges()) + { + if (newSource != null && newSource.eContainingFeature() == NotationPackage.eINSTANCE.getView_TransientChildren()) + { + EObject container = newSource.eContainer(); + if (container != null && container instanceof View) + { + View parent = (View)container; + parent.persistChildren(); + } + } + } + return basicSetSourceGen(newSource, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetSourceGen(View newSource, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newSource, NotationPackage.EDGE__SOURCE, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSource(View newSource) + { + eDynamicSet(NotationPackage.EDGE__SOURCE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__SOURCE, newSource); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public View getTarget() + { + return (View)eDynamicGet(NotationPackage.EDGE__TARGET - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__TARGET, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public NotificationChain basicSetTarget(View newTarget, NotificationChain msgs) + { + if (eContainingFeature() == NotationPackage.eINSTANCE.getDiagram_PersistedEdges()) + { + if (newTarget != null && newTarget.eContainingFeature() == NotationPackage.eINSTANCE.getView_TransientChildren()) + { + EObject container = newTarget.eContainer(); + if (container != null && container instanceof View) + { + View parent = (View)container; + parent.persistChildren(); + } + } + } + return basicSetTargetGen(newTarget, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetTargetGen(View newTarget, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newTarget, NotationPackage.EDGE__TARGET, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTarget(View newTarget) + { + eDynamicSet(NotationPackage.EDGE__TARGET - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__TARGET, newTarget); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Bendpoints getBendpoints() + { + return (Bendpoints)eDynamicGet(NotationPackage.EDGE__BENDPOINTS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__BENDPOINTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetBendpoints(Bendpoints newBendpoints, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newBendpoints, NotationPackage.EDGE__BENDPOINTS, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBendpoints(Bendpoints newBendpoints) + { + eDynamicSet(NotationPackage.EDGE__BENDPOINTS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__BENDPOINTS, newBendpoints); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Anchor getSourceAnchor() + { + return (Anchor)eDynamicGet(NotationPackage.EDGE__SOURCE_ANCHOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__SOURCE_ANCHOR, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetSourceAnchor(Anchor newSourceAnchor, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newSourceAnchor, NotationPackage.EDGE__SOURCE_ANCHOR, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSourceAnchor(Anchor newSourceAnchor) + { + eDynamicSet(NotationPackage.EDGE__SOURCE_ANCHOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__SOURCE_ANCHOR, newSourceAnchor); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Anchor getTargetAnchor() + { + return (Anchor)eDynamicGet(NotationPackage.EDGE__TARGET_ANCHOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__TARGET_ANCHOR, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetTargetAnchor(Anchor newTargetAnchor, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newTargetAnchor, NotationPackage.EDGE__TARGET_ANCHOR, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTargetAnchor(Anchor newTargetAnchor) + { + eDynamicSet(NotationPackage.EDGE__TARGET_ANCHOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.EDGE__TARGET_ANCHOR, newTargetAnchor); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Bendpoints createBendpoints(EClass eClass) + { + Bendpoints newBendpoints = (Bendpoints)eClass.getEPackage().getEFactoryInstance().create(eClass); + setBendpoints(newBendpoints); + return newBendpoints; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + */ + public Anchor createSourceAnchor(EClass eClass) + { + Anchor newAnchor = (Anchor)eClass.getEPackage().getEFactoryInstance().create(eClass); + setSourceAnchor(newAnchor); + return newAnchor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + */ + public Anchor createTargetAnchor(EClass eClass) + { + Anchor newAnchor = (Anchor)eClass.getEPackage().getEFactoryInstance().create(eClass); + setTargetAnchor(newAnchor); + return newAnchor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.EDGE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); + case NotationPackage.EDGE__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicAdd(otherEnd, msgs); + case NotationPackage.EDGE__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicAdd(otherEnd, msgs); + case NotationPackage.EDGE__SOURCE: + View source = getSource(); + if (source != null) + { + msgs = ((InternalEObject)source).eInverseRemove(this, NotationPackage.VIEW__SOURCE_EDGES, View.class, msgs); + } + return basicSetSource((View)otherEnd, msgs); + case NotationPackage.EDGE__TARGET: + View target = getTarget(); + if (target != null) + { + msgs = ((InternalEObject)target).eInverseRemove(this, NotationPackage.VIEW__TARGET_EDGES, View.class, msgs); + } + return basicSetTarget((View)otherEnd, msgs); + } + return eDynamicInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.EDGE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.EDGE__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.EDGE__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.EDGE__PERSISTED_CHILDREN: + return ((InternalEList)getPersistedChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.EDGE__STYLES: + return ((InternalEList)getStyles()).basicRemove(otherEnd, msgs); + case NotationPackage.EDGE__TRANSIENT_CHILDREN: + return ((InternalEList)getTransientChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.EDGE__SOURCE: + return basicSetSource(null, msgs); + case NotationPackage.EDGE__TARGET: + return basicSetTarget(null, msgs); + case NotationPackage.EDGE__BENDPOINTS: + return basicSetBendpoints(null, msgs); + case NotationPackage.EDGE__SOURCE_ANCHOR: + return basicSetSourceAnchor(null, msgs); + case NotationPackage.EDGE__TARGET_ANCHOR: + return basicSetTargetAnchor(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.EDGE__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.EDGE__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.EDGE__TYPE: + return getType(); + case NotationPackage.EDGE__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.EDGE__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.EDGE__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.EDGE__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.EDGE__STYLES: + return getStyles(); + case NotationPackage.EDGE__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.EDGE__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.EDGE__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.EDGE__SOURCE: + return getSource(); + case NotationPackage.EDGE__TARGET: + return getTarget(); + case NotationPackage.EDGE__BENDPOINTS: + return getBendpoints(); + case NotationPackage.EDGE__SOURCE_ANCHOR: + return getSourceAnchor(); + case NotationPackage.EDGE__TARGET_ANCHOR: + return getTargetAnchor(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.EDGE__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.EDGE__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.EDGE__TYPE: + setType((String)newValue); + return; + case NotationPackage.EDGE__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.EDGE__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.EDGE__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.EDGE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.EDGE__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.EDGE__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.EDGE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.EDGE__SOURCE: + setSource((View)newValue); + return; + case NotationPackage.EDGE__TARGET: + setTarget((View)newValue); + return; + case NotationPackage.EDGE__BENDPOINTS: + setBendpoints((Bendpoints)newValue); + return; + case NotationPackage.EDGE__SOURCE_ANCHOR: + setSourceAnchor((Anchor)newValue); + return; + case NotationPackage.EDGE__TARGET_ANCHOR: + setTargetAnchor((Anchor)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.EDGE__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.EDGE__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.EDGE__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.EDGE__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.EDGE__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.EDGE__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.EDGE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.EDGE__STYLES: + getStyles().clear(); + return; + case NotationPackage.EDGE__ELEMENT: + unsetElement(); + return; + case NotationPackage.EDGE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.EDGE__SOURCE: + setSource((View)null); + return; + case NotationPackage.EDGE__TARGET: + setTarget((View)null); + return; + case NotationPackage.EDGE__BENDPOINTS: + setBendpoints((Bendpoints)null); + return; + case NotationPackage.EDGE__SOURCE_ANCHOR: + setSourceAnchor((Anchor)null); + return; + case NotationPackage.EDGE__TARGET_ANCHOR: + setTargetAnchor((Anchor)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.EDGE__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.EDGE__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.EDGE__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.EDGE__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.EDGE__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.EDGE__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.EDGE__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.EDGE__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.EDGE__ELEMENT: + return isSetElement(); + case NotationPackage.EDGE__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.EDGE__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.EDGE__SOURCE: + return getSource() != null; + case NotationPackage.EDGE__TARGET: + return getTarget() != null; + case NotationPackage.EDGE__BENDPOINTS: + return getBendpoints() != null; + case NotationPackage.EDGE__SOURCE_ANCHOR: + return getSourceAnchor() != null; + case NotationPackage.EDGE__TARGET_ANCHOR: + return getTargetAnchor() != null; + } + return eDynamicIsSet(featureID); + } + +} // EdgeImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FillStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FillStyleImpl.java new file mode 100644 index 0000000000..42095698af --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FillStyleImpl.java @@ -0,0 +1,250 @@ +/****************************************************************************** + * Copyright (c) 2004, 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.FillStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Fill Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FillStyleImpl#getFillColor <em>Fill Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FillStyleImpl#getTransparency <em>Transparency</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FillStyleImpl#getGradient <em>Gradient</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class FillStyleImpl extends CDOObjectImpl implements FillStyle +{ + /** + * The default value of the '{@link #getFillColor() <em>Fill Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFillColor() + * @generated + * @ordered + */ + protected static final int FILL_COLOR_EDEFAULT = 16777215; + + /** + * The default value of the '{@link #getTransparency() <em>Transparency</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTransparency() + * @generated + * @ordered + */ + protected static final int TRANSPARENCY_EDEFAULT = -1; + + /** + * The default value of the '{@link #getGradient() <em>Gradient</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGradient() + * @generated + * @ordered + */ + protected static final GradientData GRADIENT_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FillStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.FILL_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFillColor() + { + return ((Integer)eDynamicGet(NotationPackage.FILL_STYLE__FILL_COLOR, NotationPackage.Literals.FILL_STYLE__FILL_COLOR, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFillColor(int newFillColor) + { + eDynamicSet(NotationPackage.FILL_STYLE__FILL_COLOR, NotationPackage.Literals.FILL_STYLE__FILL_COLOR, new Integer(newFillColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getTransparency() + { + return ((Integer)eDynamicGet(NotationPackage.FILL_STYLE__TRANSPARENCY, NotationPackage.Literals.FILL_STYLE__TRANSPARENCY, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTransparency(int newTransparency) + { + eDynamicSet(NotationPackage.FILL_STYLE__TRANSPARENCY, NotationPackage.Literals.FILL_STYLE__TRANSPARENCY, new Integer(newTransparency)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GradientData getGradient() + { + return (GradientData)eDynamicGet(NotationPackage.FILL_STYLE__GRADIENT, NotationPackage.Literals.FILL_STYLE__GRADIENT, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setGradient(GradientData newGradient) + { + eDynamicSet(NotationPackage.FILL_STYLE__GRADIENT, NotationPackage.Literals.FILL_STYLE__GRADIENT, newGradient); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.FILL_STYLE__FILL_COLOR: + return new Integer(getFillColor()); + case NotationPackage.FILL_STYLE__TRANSPARENCY: + return new Integer(getTransparency()); + case NotationPackage.FILL_STYLE__GRADIENT: + return getGradient(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.FILL_STYLE__FILL_COLOR: + setFillColor(((Integer)newValue).intValue()); + return; + case NotationPackage.FILL_STYLE__TRANSPARENCY: + setTransparency(((Integer)newValue).intValue()); + return; + case NotationPackage.FILL_STYLE__GRADIENT: + setGradient((GradientData)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.FILL_STYLE__FILL_COLOR: + setFillColor(FILL_COLOR_EDEFAULT); + return; + case NotationPackage.FILL_STYLE__TRANSPARENCY: + setTransparency(TRANSPARENCY_EDEFAULT); + return; + case NotationPackage.FILL_STYLE__GRADIENT: + setGradient(GRADIENT_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.FILL_STYLE__FILL_COLOR: + return getFillColor() != FILL_COLOR_EDEFAULT; + case NotationPackage.FILL_STYLE__TRANSPARENCY: + return getTransparency() != TRANSPARENCY_EDEFAULT; + case NotationPackage.FILL_STYLE__GRADIENT: + return GRADIENT_EDEFAULT == null ? getGradient() != null : !GRADIENT_EDEFAULT.equals(getGradient()); + } + return eDynamicIsSet(featureID); + } + +} // FillStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FilteringStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FilteringStyleImpl.java new file mode 100644 index 0000000000..4251790dde --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FilteringStyleImpl.java @@ -0,0 +1,280 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.Filtering; +import org.eclipse.gmf.runtime.notation.FilteringStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Filtering Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FilteringStyleImpl#getFiltering <em>Filtering</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FilteringStyleImpl#getFilteringKeys <em>Filtering Keys</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FilteringStyleImpl#getFilteredObjects <em>Filtered Objects</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class FilteringStyleImpl extends CDOObjectImpl implements FilteringStyle +{ + /** + * The default value of the '{@link #getFiltering() <em>Filtering</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFiltering() + * @generated + * @ordered + */ + protected static final Filtering FILTERING_EDEFAULT = Filtering.NONE_LITERAL; + + /** + * The default value of the '{@link #getFilteringKeys() <em>Filtering Keys</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilteringKeys() + * @generated NOT + * @ordered + */ + protected static final List FILTERING_KEYS_EDEFAULT = Collections.EMPTY_LIST; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FilteringStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.FILTERING_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Filtering getFiltering() + { + return (Filtering)eDynamicGet(NotationPackage.FILTERING_STYLE__FILTERING, NotationPackage.Literals.FILTERING_STYLE__FILTERING, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFiltering(Filtering newFiltering) + { + eDynamicSet(NotationPackage.FILTERING_STYLE__FILTERING, NotationPackage.Literals.FILTERING_STYLE__FILTERING, newFiltering); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public List getFilteringKeys() + { + return Collections.unmodifiableList(getFilteringKeysGen()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getFilteringKeysGen() + { + return (List)eDynamicGet(NotationPackage.FILTERING_STYLE__FILTERING_KEYS, NotationPackage.Literals.FILTERING_STYLE__FILTERING_KEYS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setFilteringKeys(List newFilteringKeys) + { + if (newFilteringKeys == null) + { + throw new NullPointerException("the 'newFilteringKeys' parameter is null"); //$NON-NLS-1$ + } + + if (newFilteringKeys.isEmpty()) + { + setFilteringKeysGen(FILTERING_KEYS_EDEFAULT); + } + else + { + List tempList = new ArrayList(newFilteringKeys.size()); + for (Iterator i = newFilteringKeys.iterator(); i.hasNext();) + { + Object key = i.next(); + if (!(key instanceof String)) + { + throw new IllegalArgumentException("One or more objects in the list is not of type java.lang.String"); //$NON-NLS-1$ + } + tempList.add(key); + } + setFilteringKeysGen(tempList); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFilteringKeysGen(List newFilteringKeys) + { + eDynamicSet(NotationPackage.FILTERING_STYLE__FILTERING_KEYS, NotationPackage.Literals.FILTERING_STYLE__FILTERING_KEYS, newFilteringKeys); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getFilteredObjects() + { + return (EList)eDynamicGet(NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS, NotationPackage.Literals.FILTERING_STYLE__FILTERED_OBJECTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.FILTERING_STYLE__FILTERING: + return getFiltering(); + case NotationPackage.FILTERING_STYLE__FILTERING_KEYS: + return getFilteringKeys(); + case NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS: + return getFilteredObjects(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.FILTERING_STYLE__FILTERING: + setFiltering((Filtering)newValue); + return; + case NotationPackage.FILTERING_STYLE__FILTERING_KEYS: + setFilteringKeys((List)newValue); + return; + case NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS: + getFilteredObjects().clear(); + getFilteredObjects().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.FILTERING_STYLE__FILTERING: + setFiltering(FILTERING_EDEFAULT); + return; + case NotationPackage.FILTERING_STYLE__FILTERING_KEYS: + setFilteringKeys(FILTERING_KEYS_EDEFAULT); + return; + case NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS: + getFilteredObjects().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.FILTERING_STYLE__FILTERING: + return getFiltering() != FILTERING_EDEFAULT; + case NotationPackage.FILTERING_STYLE__FILTERING_KEYS: + return FILTERING_KEYS_EDEFAULT == null ? getFilteringKeys() != null : !FILTERING_KEYS_EDEFAULT.equals(getFilteringKeys()); + case NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS: + return !getFilteredObjects().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // FilteringStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FontStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FontStyleImpl.java new file mode 100644 index 0000000000..ece0264d91 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/FontStyleImpl.java @@ -0,0 +1,423 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Font Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#getFontColor <em>Font Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#getFontName <em>Font Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#getFontHeight <em>Font Height</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#isBold <em>Bold</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#isItalic <em>Italic</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#isUnderline <em>Underline</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl#isStrikeThrough <em>Strike Through</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class FontStyleImpl extends CDOObjectImpl implements FontStyle +{ + /** + * The default value of the '{@link #getFontColor() <em>Font Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFontColor() + * @generated + * @ordered + */ + protected static final int FONT_COLOR_EDEFAULT = 0; + + /** + * The default value of the '{@link #getFontName() <em>Font Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFontName() + * @generated + * @ordered + */ + protected static final String FONT_NAME_EDEFAULT = "Tahoma"; //$NON-NLS-1$ + + /** + * The default value of the '{@link #getFontHeight() <em>Font Height</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFontHeight() + * @generated + * @ordered + */ + protected static final int FONT_HEIGHT_EDEFAULT = 9; + + /** + * The default value of the '{@link #isBold() <em>Bold</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isBold() + * @generated + * @ordered + */ + protected static final boolean BOLD_EDEFAULT = false; + + /** + * The default value of the '{@link #isItalic() <em>Italic</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isItalic() + * @generated + * @ordered + */ + protected static final boolean ITALIC_EDEFAULT = false; + + /** + * The default value of the '{@link #isUnderline() <em>Underline</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isUnderline() + * @generated + * @ordered + */ + protected static final boolean UNDERLINE_EDEFAULT = false; + + /** + * The default value of the '{@link #isStrikeThrough() <em>Strike Through</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isStrikeThrough() + * @generated + * @ordered + */ + protected static final boolean STRIKE_THROUGH_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FontStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.FONT_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFontName() + { + return (String)eDynamicGet(NotationPackage.FONT_STYLE__FONT_NAME, NotationPackage.Literals.FONT_STYLE__FONT_NAME, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setFontName(String newFontName) + { + setFontNameGen(newFontName == null ? null : newFontName.intern()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFontNameGen(String newFontName) + { + eDynamicSet(NotationPackage.FONT_STYLE__FONT_NAME, NotationPackage.Literals.FONT_STYLE__FONT_NAME, newFontName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFontHeight() + { + return ((Integer)eDynamicGet(NotationPackage.FONT_STYLE__FONT_HEIGHT, NotationPackage.Literals.FONT_STYLE__FONT_HEIGHT, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFontHeight(int newFontHeight) + { + eDynamicSet(NotationPackage.FONT_STYLE__FONT_HEIGHT, NotationPackage.Literals.FONT_STYLE__FONT_HEIGHT, new Integer(newFontHeight)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isBold() + { + return ((Boolean)eDynamicGet(NotationPackage.FONT_STYLE__BOLD, NotationPackage.Literals.FONT_STYLE__BOLD, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBold(boolean newBold) + { + eDynamicSet(NotationPackage.FONT_STYLE__BOLD, NotationPackage.Literals.FONT_STYLE__BOLD, new Boolean(newBold)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isItalic() + { + return ((Boolean)eDynamicGet(NotationPackage.FONT_STYLE__ITALIC, NotationPackage.Literals.FONT_STYLE__ITALIC, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setItalic(boolean newItalic) + { + eDynamicSet(NotationPackage.FONT_STYLE__ITALIC, NotationPackage.Literals.FONT_STYLE__ITALIC, new Boolean(newItalic)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isUnderline() + { + return ((Boolean)eDynamicGet(NotationPackage.FONT_STYLE__UNDERLINE, NotationPackage.Literals.FONT_STYLE__UNDERLINE, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUnderline(boolean newUnderline) + { + eDynamicSet(NotationPackage.FONT_STYLE__UNDERLINE, NotationPackage.Literals.FONT_STYLE__UNDERLINE, new Boolean(newUnderline)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isStrikeThrough() + { + return ((Boolean)eDynamicGet(NotationPackage.FONT_STYLE__STRIKE_THROUGH, NotationPackage.Literals.FONT_STYLE__STRIKE_THROUGH, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setStrikeThrough(boolean newStrikeThrough) + { + eDynamicSet(NotationPackage.FONT_STYLE__STRIKE_THROUGH, NotationPackage.Literals.FONT_STYLE__STRIKE_THROUGH, new Boolean(newStrikeThrough)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.FONT_STYLE__FONT_COLOR: + return new Integer(getFontColor()); + case NotationPackage.FONT_STYLE__FONT_NAME: + return getFontName(); + case NotationPackage.FONT_STYLE__FONT_HEIGHT: + return new Integer(getFontHeight()); + case NotationPackage.FONT_STYLE__BOLD: + return isBold() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.FONT_STYLE__ITALIC: + return isItalic() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.FONT_STYLE__UNDERLINE: + return isUnderline() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.FONT_STYLE__STRIKE_THROUGH: + return isStrikeThrough() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.FONT_STYLE__FONT_COLOR: + setFontColor(((Integer)newValue).intValue()); + return; + case NotationPackage.FONT_STYLE__FONT_NAME: + setFontName((String)newValue); + return; + case NotationPackage.FONT_STYLE__FONT_HEIGHT: + setFontHeight(((Integer)newValue).intValue()); + return; + case NotationPackage.FONT_STYLE__BOLD: + setBold(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.FONT_STYLE__ITALIC: + setItalic(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.FONT_STYLE__UNDERLINE: + setUnderline(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.FONT_STYLE__STRIKE_THROUGH: + setStrikeThrough(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.FONT_STYLE__FONT_COLOR: + setFontColor(FONT_COLOR_EDEFAULT); + return; + case NotationPackage.FONT_STYLE__FONT_NAME: + setFontName(FONT_NAME_EDEFAULT); + return; + case NotationPackage.FONT_STYLE__FONT_HEIGHT: + setFontHeight(FONT_HEIGHT_EDEFAULT); + return; + case NotationPackage.FONT_STYLE__BOLD: + setBold(BOLD_EDEFAULT); + return; + case NotationPackage.FONT_STYLE__ITALIC: + setItalic(ITALIC_EDEFAULT); + return; + case NotationPackage.FONT_STYLE__UNDERLINE: + setUnderline(UNDERLINE_EDEFAULT); + return; + case NotationPackage.FONT_STYLE__STRIKE_THROUGH: + setStrikeThrough(STRIKE_THROUGH_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.FONT_STYLE__FONT_COLOR: + return getFontColor() != FONT_COLOR_EDEFAULT; + case NotationPackage.FONT_STYLE__FONT_NAME: + return FONT_NAME_EDEFAULT == null ? getFontName() != null : !FONT_NAME_EDEFAULT.equals(getFontName()); + case NotationPackage.FONT_STYLE__FONT_HEIGHT: + return getFontHeight() != FONT_HEIGHT_EDEFAULT; + case NotationPackage.FONT_STYLE__BOLD: + return isBold() != BOLD_EDEFAULT; + case NotationPackage.FONT_STYLE__ITALIC: + return isItalic() != ITALIC_EDEFAULT; + case NotationPackage.FONT_STYLE__UNDERLINE: + return isUnderline() != UNDERLINE_EDEFAULT; + case NotationPackage.FONT_STYLE__STRIKE_THROUGH: + return isStrikeThrough() != STRIKE_THROUGH_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFontColor() + { + return ((Integer)eDynamicGet(NotationPackage.FONT_STYLE__FONT_COLOR, NotationPackage.Literals.FONT_STYLE__FONT_COLOR, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFontColor(int newFontColor) + { + eDynamicSet(NotationPackage.FONT_STYLE__FONT_COLOR, NotationPackage.Literals.FONT_STYLE__FONT_COLOR, new Integer(newFontColor)); + } + +} // FontStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideImpl.java new file mode 100644 index 0000000000..11e96bfb9c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideImpl.java @@ -0,0 +1,216 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.Guide; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Guide</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.GuideImpl#getPosition <em>Position</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.GuideImpl#getNodeMap <em>Node Map</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class GuideImpl extends CDOObjectImpl implements Guide +{ + /** + * The default value of the '{@link #getPosition() <em>Position</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPosition() + * @generated + * @ordered + */ + protected static final int POSITION_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected GuideImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.GUIDE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPosition() + { + return ((Integer)eDynamicGet(NotationPackage.GUIDE__POSITION, NotationPackage.Literals.GUIDE__POSITION, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPosition(int newPosition) + { + eDynamicSet(NotationPackage.GUIDE__POSITION, NotationPackage.Literals.GUIDE__POSITION, new Integer(newPosition)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EMap getNodeMap() + { + return (EMap)eDynamicGet(NotationPackage.GUIDE__NODE_MAP, NotationPackage.Literals.GUIDE__NODE_MAP, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.GUIDE__NODE_MAP: + return ((InternalEList)getNodeMap()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.GUIDE__POSITION: + return new Integer(getPosition()); + case NotationPackage.GUIDE__NODE_MAP: + if (coreType) + { + return getNodeMap(); + } + else + { + return getNodeMap().map(); + } + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.GUIDE__POSITION: + setPosition(((Integer)newValue).intValue()); + return; + case NotationPackage.GUIDE__NODE_MAP: + ((EStructuralFeature.Setting)getNodeMap()).set(newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.GUIDE__POSITION: + setPosition(POSITION_EDEFAULT); + return; + case NotationPackage.GUIDE__NODE_MAP: + getNodeMap().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.GUIDE__POSITION: + return getPosition() != POSITION_EDEFAULT; + case NotationPackage.GUIDE__NODE_MAP: + return !getNodeMap().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // GuideImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java new file mode 100644 index 0000000000..f69757e014 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java @@ -0,0 +1,194 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +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.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.GuideStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Guide Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.GuideStyleImpl#getHorizontalGuides <em>Horizontal Guides</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.GuideStyleImpl#getVerticalGuides <em>Vertical Guides</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class GuideStyleImpl extends CDOObjectImpl implements GuideStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected GuideStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.GUIDE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getHorizontalGuides() + { + return (EList)eDynamicGet(NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES, NotationPackage.Literals.GUIDE_STYLE__HORIZONTAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getVerticalGuides() + { + return (EList)eDynamicGet(NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES, NotationPackage.Literals.GUIDE_STYLE__VERTICAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return getHorizontalGuides(); + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return getVerticalGuides(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + getHorizontalGuides().addAll((Collection)newValue); + return; + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + getVerticalGuides().clear(); + getVerticalGuides().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + return; + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + getVerticalGuides().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return !getHorizontalGuides().isEmpty(); + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return !getVerticalGuides().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // GuideStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/HintedDiagramLinkStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/HintedDiagramLinkStyleImpl.java new file mode 100644 index 0000000000..6418104c47 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/HintedDiagramLinkStyleImpl.java @@ -0,0 +1,165 @@ +/****************************************************************************** + * Copyright (c) 2007, 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Hinted Diagram Link Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.HintedDiagramLinkStyleImpl#getHint <em>Hint</em>}</li> + * </ul> + * + * @generated + */ +public class HintedDiagramLinkStyleImpl extends DiagramLinkStyleImpl implements HintedDiagramLinkStyle +{ + /** + * The default value of the '{@link #getHint() <em>Hint</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getHint() + * @generated + * @ordered + */ + protected static final String HINT_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected HintedDiagramLinkStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.HINTED_DIAGRAM_LINK_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getHint() + { + return (String)eDynamicGet(NotationPackage.HINTED_DIAGRAM_LINK_STYLE__HINT, NotationPackage.Literals.HINTED_DIAGRAM_LINK_STYLE__HINT, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setHint(String newHint) + { + eDynamicSet(NotationPackage.HINTED_DIAGRAM_LINK_STYLE__HINT, NotationPackage.Literals.HINTED_DIAGRAM_LINK_STYLE__HINT, newHint); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + if (resolve) + { + return getDiagramLink(); + } + return basicGetDiagramLink(); + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__HINT: + return getHint(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + setDiagramLink((Diagram)newValue); + return; + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__HINT: + setHint((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + setDiagramLink((Diagram)null); + return; + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__HINT: + setHint(HINT_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__DIAGRAM_LINK: + return basicGetDiagramLink() != null; + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE__HINT: + return HINT_EDEFAULT == null ? getHint() != null : !HINT_EDEFAULT.equals(getHint()); + } + return eDynamicIsSet(featureID); + } + +} // HintedDiagramLinkStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IdentityAnchorImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IdentityAnchorImpl.java new file mode 100644 index 0000000000..c52b6a59ac --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IdentityAnchorImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.IdentityAnchor; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Identity Anchor</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.IdentityAnchorImpl#getId <em>Id</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class IdentityAnchorImpl extends CDOObjectImpl implements IdentityAnchor +{ + /** + * 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 = "anchor"; //$NON-NLS-1$ + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IdentityAnchorImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.IDENTITY_ANCHOR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() + { + return (String)eDynamicGet(NotationPackage.IDENTITY_ANCHOR__ID, NotationPackage.Literals.IDENTITY_ANCHOR__ID, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) + { + eDynamicSet(NotationPackage.IDENTITY_ANCHOR__ID, NotationPackage.Literals.IDENTITY_ANCHOR__ID, newId); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.IDENTITY_ANCHOR__ID: + return getId(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.IDENTITY_ANCHOR__ID: + setId((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.IDENTITY_ANCHOR__ID: + setId(ID_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.IDENTITY_ANCHOR__ID: + return ID_EDEFAULT == null ? getId() != null : !ID_EDEFAULT.equals(getId()); + } + return eDynamicIsSet(featureID); + } + +} // IdentityAnchorImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageBufferStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageBufferStyleImpl.java new file mode 100644 index 0000000000..2e47fcc046 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageBufferStyleImpl.java @@ -0,0 +1,207 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.gmf.runtime.notation.Bounds; +import org.eclipse.gmf.runtime.notation.Image; +import org.eclipse.gmf.runtime.notation.ImageBufferStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Image Buffer Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ImageBufferStyleImpl#getImageBuffer <em>Image Buffer</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class ImageBufferStyleImpl extends ImageStyleImpl implements ImageBufferStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ImageBufferStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.IMAGE_BUFFER_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Image getImageBuffer() + { + return (Image)eDynamicGet(NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER, NotationPackage.Literals.IMAGE_BUFFER_STYLE__IMAGE_BUFFER, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetImageBuffer(Image newImageBuffer, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newImageBuffer, NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setImageBuffer(Image newImageBuffer) + { + eDynamicSet(NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER, NotationPackage.Literals.IMAGE_BUFFER_STYLE__IMAGE_BUFFER, newImageBuffer); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.IMAGE_BUFFER_STYLE__CROP_BOUND: + return basicSetCropBound(null, msgs); + case NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER: + return basicSetImageBuffer(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.IMAGE_BUFFER_STYLE__ANTI_ALIAS: + return getAntiAlias(); + case NotationPackage.IMAGE_BUFFER_STYLE__MAINTAIN_ASPECT_RATIO: + return getMaintainAspectRatio(); + case NotationPackage.IMAGE_BUFFER_STYLE__CROP_BOUND: + return getCropBound(); + case NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER: + return getImageBuffer(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.IMAGE_BUFFER_STYLE__ANTI_ALIAS: + setAntiAlias((Boolean)newValue); + return; + case NotationPackage.IMAGE_BUFFER_STYLE__MAINTAIN_ASPECT_RATIO: + setMaintainAspectRatio((Boolean)newValue); + return; + case NotationPackage.IMAGE_BUFFER_STYLE__CROP_BOUND: + setCropBound((Bounds)newValue); + return; + case NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER: + setImageBuffer((Image)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.IMAGE_BUFFER_STYLE__ANTI_ALIAS: + setAntiAlias(ANTI_ALIAS_EDEFAULT); + return; + case NotationPackage.IMAGE_BUFFER_STYLE__MAINTAIN_ASPECT_RATIO: + setMaintainAspectRatio(MAINTAIN_ASPECT_RATIO_EDEFAULT); + return; + case NotationPackage.IMAGE_BUFFER_STYLE__CROP_BOUND: + setCropBound((Bounds)null); + return; + case NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER: + setImageBuffer((Image)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.IMAGE_BUFFER_STYLE__ANTI_ALIAS: + return ANTI_ALIAS_EDEFAULT == null ? getAntiAlias() != null : !ANTI_ALIAS_EDEFAULT.equals(getAntiAlias()); + case NotationPackage.IMAGE_BUFFER_STYLE__MAINTAIN_ASPECT_RATIO: + return MAINTAIN_ASPECT_RATIO_EDEFAULT == null ? getMaintainAspectRatio() != null : !MAINTAIN_ASPECT_RATIO_EDEFAULT.equals(getMaintainAspectRatio()); + case NotationPackage.IMAGE_BUFFER_STYLE__CROP_BOUND: + return getCropBound() != null; + case NotationPackage.IMAGE_BUFFER_STYLE__IMAGE_BUFFER: + return getImageBuffer() != null; + } + return eDynamicIsSet(featureID); + } + +} // ImageBufferStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageImpl.java new file mode 100644 index 0000000000..d2e27c558d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.Image; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Image</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ImageImpl#getData <em>Data</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class ImageImpl extends CDOObjectImpl implements Image +{ + /** + * The default value of the '{@link #getData() <em>Data</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getData() + * @generated + * @ordered + */ + protected static final byte[] DATA_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ImageImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.IMAGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public byte[] getData() + { + return (byte[])eDynamicGet(NotationPackage.IMAGE__DATA, NotationPackage.Literals.IMAGE__DATA, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setData(byte[] newData) + { + eDynamicSet(NotationPackage.IMAGE__DATA, NotationPackage.Literals.IMAGE__DATA, newData); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.IMAGE__DATA: + return getData(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.IMAGE__DATA: + setData((byte[])newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.IMAGE__DATA: + setData(DATA_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.IMAGE__DATA: + return DATA_EDEFAULT == null ? getData() != null : !DATA_EDEFAULT.equals(getData()); + } + return eDynamicIsSet(featureID); + } + +} // ImageImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageStyleImpl.java new file mode 100644 index 0000000000..60f531b017 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ImageStyleImpl.java @@ -0,0 +1,269 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.gmf.runtime.notation.Bounds; +import org.eclipse.gmf.runtime.notation.ImageStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Image Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ImageStyleImpl#getAntiAlias <em>Anti Alias</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ImageStyleImpl#getMaintainAspectRatio <em>Maintain Aspect Ratio</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ImageStyleImpl#getCropBound <em>Crop Bound</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class ImageStyleImpl extends CDOObjectImpl implements ImageStyle +{ + /** + * The default value of the '{@link #getAntiAlias() <em>Anti Alias</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAntiAlias() + * @generated + * @ordered + */ + protected static final Boolean ANTI_ALIAS_EDEFAULT = Boolean.TRUE; + + /** + * The default value of the '{@link #getMaintainAspectRatio() <em>Maintain Aspect Ratio</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMaintainAspectRatio() + * @generated + * @ordered + */ + protected static final Boolean MAINTAIN_ASPECT_RATIO_EDEFAULT = Boolean.TRUE; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ImageStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.IMAGE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Boolean getAntiAlias() + { + return (Boolean)eDynamicGet(NotationPackage.IMAGE_STYLE__ANTI_ALIAS, NotationPackage.Literals.IMAGE_STYLE__ANTI_ALIAS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAntiAlias(Boolean newAntiAlias) + { + eDynamicSet(NotationPackage.IMAGE_STYLE__ANTI_ALIAS, NotationPackage.Literals.IMAGE_STYLE__ANTI_ALIAS, newAntiAlias); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Boolean getMaintainAspectRatio() + { + return (Boolean)eDynamicGet(NotationPackage.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO, NotationPackage.Literals.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setMaintainAspectRatio(Boolean newMaintainAspectRatio) + { + eDynamicSet(NotationPackage.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO, NotationPackage.Literals.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO, newMaintainAspectRatio); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Bounds getCropBound() + { + return (Bounds)eDynamicGet(NotationPackage.IMAGE_STYLE__CROP_BOUND, NotationPackage.Literals.IMAGE_STYLE__CROP_BOUND, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCropBound(Bounds newCropBound, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newCropBound, NotationPackage.IMAGE_STYLE__CROP_BOUND, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCropBound(Bounds newCropBound) + { + eDynamicSet(NotationPackage.IMAGE_STYLE__CROP_BOUND, NotationPackage.Literals.IMAGE_STYLE__CROP_BOUND, newCropBound); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.IMAGE_STYLE__CROP_BOUND: + return basicSetCropBound(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.IMAGE_STYLE__ANTI_ALIAS: + return getAntiAlias(); + case NotationPackage.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO: + return getMaintainAspectRatio(); + case NotationPackage.IMAGE_STYLE__CROP_BOUND: + return getCropBound(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.IMAGE_STYLE__ANTI_ALIAS: + setAntiAlias((Boolean)newValue); + return; + case NotationPackage.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO: + setMaintainAspectRatio((Boolean)newValue); + return; + case NotationPackage.IMAGE_STYLE__CROP_BOUND: + setCropBound((Bounds)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.IMAGE_STYLE__ANTI_ALIAS: + setAntiAlias(ANTI_ALIAS_EDEFAULT); + return; + case NotationPackage.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO: + setMaintainAspectRatio(MAINTAIN_ASPECT_RATIO_EDEFAULT); + return; + case NotationPackage.IMAGE_STYLE__CROP_BOUND: + setCropBound((Bounds)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.IMAGE_STYLE__ANTI_ALIAS: + return ANTI_ALIAS_EDEFAULT == null ? getAntiAlias() != null : !ANTI_ALIAS_EDEFAULT.equals(getAntiAlias()); + case NotationPackage.IMAGE_STYLE__MAINTAIN_ASPECT_RATIO: + return MAINTAIN_ASPECT_RATIO_EDEFAULT == null ? getMaintainAspectRatio() != null : !MAINTAIN_ASPECT_RATIO_EDEFAULT.equals(getMaintainAspectRatio()); + case NotationPackage.IMAGE_STYLE__CROP_BOUND: + return getCropBound() != null; + } + return eDynamicIsSet(featureID); + } + +} // ImageStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntListValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntListValueStyleImpl.java new file mode 100644 index 0000000000..d7bef1867e --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntListValueStyleImpl.java @@ -0,0 +1,144 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.IntListValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Int List Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.IntListValueStyleImpl#getIntListValue <em>Int List Value</em>}</li> + * </ul> + * + * @generated + */ +public class IntListValueStyleImpl extends NamedStyleImpl implements IntListValueStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IntListValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.INT_LIST_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getIntListValue() + { + return (EList)eDynamicGet(NotationPackage.INT_LIST_VALUE_STYLE__INT_LIST_VALUE, NotationPackage.Literals.INT_LIST_VALUE_STYLE__INT_LIST_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.INT_LIST_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.INT_LIST_VALUE_STYLE__INT_LIST_VALUE: + return getIntListValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.INT_LIST_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.INT_LIST_VALUE_STYLE__INT_LIST_VALUE: + getIntListValue().clear(); + getIntListValue().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.INT_LIST_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.INT_LIST_VALUE_STYLE__INT_LIST_VALUE: + getIntListValue().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.INT_LIST_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.INT_LIST_VALUE_STYLE__INT_LIST_VALUE: + return !getIntListValue().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // IntListValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java new file mode 100644 index 0000000000..52a535f828 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java @@ -0,0 +1,160 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.IntValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Int Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.IntValueStyleImpl#getIntValue <em>Int Value</em>}</li> + * </ul> + * + * @generated + */ +public class IntValueStyleImpl extends NamedStyleImpl implements IntValueStyle +{ + /** + * The default value of the '{@link #getIntValue() <em>Int Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIntValue() + * @generated + * @ordered + */ + protected static final int INT_VALUE_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IntValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.INT_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIntValue() + { + return ((Integer)eDynamicGet(NotationPackage.INT_VALUE_STYLE__INT_VALUE, NotationPackage.Literals.INT_VALUE_STYLE__INT_VALUE, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIntValue(int newIntValue) + { + eDynamicSet(NotationPackage.INT_VALUE_STYLE__INT_VALUE, NotationPackage.Literals.INT_VALUE_STYLE__INT_VALUE, new Integer(newIntValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + return new Integer(getIntValue()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + setIntValue(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + setIntValue(INT_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + return getIntValue() != INT_VALUE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // IntValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LineStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LineStyleImpl.java new file mode 100644 index 0000000000..bfed4405aa --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LineStyleImpl.java @@ -0,0 +1,208 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Line Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.LineStyleImpl#getLineColor <em>Line Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.LineStyleImpl#getLineWidth <em>Line Width</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class LineStyleImpl extends CDOObjectImpl implements LineStyle +{ + /** + * The default value of the '{@link #getLineColor() <em>Line Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineColor() + * @generated + * @ordered + */ + protected static final int LINE_COLOR_EDEFAULT = 11579568; + + /** + * The default value of the '{@link #getLineWidth() <em>Line Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineWidth() + * @generated + * @ordered + */ + protected static final int LINE_WIDTH_EDEFAULT = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LineStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.LINE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineColor() + { + return ((Integer)eDynamicGet(NotationPackage.LINE_STYLE__LINE_COLOR, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineColor(int newLineColor) + { + eDynamicSet(NotationPackage.LINE_STYLE__LINE_COLOR, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, new Integer(newLineColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineWidth() + { + return ((Integer)eDynamicGet(NotationPackage.LINE_STYLE__LINE_WIDTH, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineWidth(int newLineWidth) + { + eDynamicSet(NotationPackage.LINE_STYLE__LINE_WIDTH, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, new Integer(newLineWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + return new Integer(getLineColor()); + case NotationPackage.LINE_STYLE__LINE_WIDTH: + return new Integer(getLineWidth()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + setLineColor(((Integer)newValue).intValue()); + return; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + setLineWidth(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + setLineColor(LINE_COLOR_EDEFAULT); + return; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + setLineWidth(LINE_WIDTH_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + return getLineColor() != LINE_COLOR_EDEFAULT; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + return getLineWidth() != LINE_WIDTH_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // LineStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LineTypeStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LineTypeStyleImpl.java new file mode 100644 index 0000000000..46faaab569 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LineTypeStyleImpl.java @@ -0,0 +1,164 @@ +/****************************************************************************** + * Copyright (c) 2008, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.LineType; +import org.eclipse.gmf.runtime.notation.LineTypeStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Line Type Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.LineTypeStyleImpl#getLineType <em>Line Type</em>}</li> + * </ul> + * + * @generated + */ +public class LineTypeStyleImpl extends CDOObjectImpl implements LineTypeStyle +{ + /** + * The default value of the '{@link #getLineType() <em>Line Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineType() + * @generated + * @ordered + */ + protected static final LineType LINE_TYPE_EDEFAULT = LineType.SOLID_LITERAL; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LineTypeStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.LINE_TYPE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LineType getLineType() + { + return (LineType)eDynamicGet(NotationPackage.LINE_TYPE_STYLE__LINE_TYPE, NotationPackage.Literals.LINE_TYPE_STYLE__LINE_TYPE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineType(LineType newLineType) + { + eDynamicSet(NotationPackage.LINE_TYPE_STYLE__LINE_TYPE, NotationPackage.Literals.LINE_TYPE_STYLE__LINE_TYPE, newLineType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.LINE_TYPE_STYLE__LINE_TYPE: + return getLineType(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.LINE_TYPE_STYLE__LINE_TYPE: + setLineType((LineType)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.LINE_TYPE_STYLE__LINE_TYPE: + setLineType(LINE_TYPE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.LINE_TYPE_STYLE__LINE_TYPE: + return getLineType() != LINE_TYPE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // LineTypeStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ListCompartmentImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ListCompartmentImpl.java new file mode 100644 index 0000000000..029b76e145 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ListCompartmentImpl.java @@ -0,0 +1,669 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.Filtering; +import org.eclipse.gmf.runtime.notation.FilteringStyle; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.ListCompartment; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Sorting; +import org.eclipse.gmf.runtime.notation.SortingStyle; +import org.eclipse.gmf.runtime.notation.TitleStyle; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>List Compartment</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#getSorting <em>Sorting</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#getSortingKeys <em>Sorting Keys</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#getSortedObjects <em>Sorted Objects</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#getFiltering <em>Filtering</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#getFilteringKeys <em>Filtering Keys</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#getFilteredObjects <em>Filtered Objects</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl#isShowTitle <em>Show Title</em>}</li> + * </ul> + * + * @generated + */ +public class ListCompartmentImpl extends BasicCompartmentImpl implements ListCompartment +{ + /** + * The default value of the '{@link #getSorting() <em>Sorting</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSorting() + * @generated + * @ordered + */ + protected static final Sorting SORTING_EDEFAULT = Sorting.NONE_LITERAL; + + /** + * The default value of the '{@link #getSortingKeys() <em>Sorting Keys</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSortingKeys() + * @generated NOT + * @ordered + */ + protected static final Map SORTING_KEYS_EDEFAULT = Collections.EMPTY_MAP; + + /** + * The default value of the '{@link #getFiltering() <em>Filtering</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFiltering() + * @generated + * @ordered + */ + protected static final Filtering FILTERING_EDEFAULT = Filtering.NONE_LITERAL; + + /** + * The default value of the '{@link #getFilteringKeys() <em>Filtering Keys</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilteringKeys() + * @generated NOT + * @ordered + */ + protected static final List FILTERING_KEYS_EDEFAULT = Collections.EMPTY_LIST; + + /** + * The default value of the '{@link #isShowTitle() <em>Show Title</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isShowTitle() + * @generated + * @ordered + */ + protected static final boolean SHOW_TITLE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ListCompartmentImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.LIST_COMPARTMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Sorting getSorting() + { + return (Sorting)eDynamicGet(NotationPackage.LIST_COMPARTMENT__SORTING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSorting(Sorting newSorting) + { + eDynamicSet(NotationPackage.LIST_COMPARTMENT__SORTING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING, newSorting); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Map getSortingKeys() + { + return (Map)eDynamicGet(NotationPackage.LIST_COMPARTMENT__SORTING_KEYS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING_KEYS, true, + true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSortingKeys(Map newSortingKeys) + { + eDynamicSet(NotationPackage.LIST_COMPARTMENT__SORTING_KEYS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING_KEYS, newSortingKeys); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getSortedObjects() + { + return (EList)eDynamicGet(NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTED_OBJECTS, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Filtering getFiltering() + { + return (Filtering)eDynamicGet(NotationPackage.LIST_COMPARTMENT__FILTERING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILTERING_STYLE__FILTERING, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFiltering(Filtering newFiltering) + { + eDynamicSet(NotationPackage.LIST_COMPARTMENT__FILTERING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILTERING_STYLE__FILTERING, newFiltering); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getFilteringKeys() + { + return (List)eDynamicGet(NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILTERING_STYLE__FILTERING_KEYS, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFilteringKeys(List newFilteringKeys) + { + eDynamicSet(NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILTERING_STYLE__FILTERING_KEYS, + newFilteringKeys); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getFilteredObjects() + { + return (EList)eDynamicGet(NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.FILTERING_STYLE__FILTERED_OBJECTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isShowTitle() + { + return ((Boolean)eDynamicGet(NotationPackage.LIST_COMPARTMENT__SHOW_TITLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, true, + true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setShowTitle(boolean newShowTitle) + { + eDynamicSet(NotationPackage.LIST_COMPARTMENT__SHOW_TITLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, + new Boolean(newShowTitle)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.LIST_COMPARTMENT__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.LIST_COMPARTMENT__TYPE: + return getType(); + case NotationPackage.LIST_COMPARTMENT__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.LIST_COMPARTMENT__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.LIST_COMPARTMENT__STYLES: + return getStyles(); + case NotationPackage.LIST_COMPARTMENT__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.LIST_COMPARTMENT__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + case NotationPackage.LIST_COMPARTMENT__COLLAPSED: + return isCollapsed() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.LIST_COMPARTMENT__SORTING: + return getSorting(); + case NotationPackage.LIST_COMPARTMENT__SORTING_KEYS: + return getSortingKeys(); + case NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS: + return getSortedObjects(); + case NotationPackage.LIST_COMPARTMENT__FILTERING: + return getFiltering(); + case NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS: + return getFilteringKeys(); + case NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS: + return getFilteredObjects(); + case NotationPackage.LIST_COMPARTMENT__SHOW_TITLE: + return isShowTitle() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + return; + default: + eSetGen(featureID, newValue); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSetGen(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.LIST_COMPARTMENT__TYPE: + setType((String)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__COLLAPSED: + setCollapsed(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.LIST_COMPARTMENT__SORTING: + setSorting((Sorting)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__SORTING_KEYS: + setSortingKeys((Map)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS: + getSortedObjects().clear(); + getSortedObjects().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__FILTERING: + setFiltering((Filtering)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS: + setFilteringKeys((List)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS: + getFilteredObjects().clear(); + getFilteredObjects().addAll((Collection)newValue); + return; + case NotationPackage.LIST_COMPARTMENT__SHOW_TITLE: + setShowTitle(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + return; + default: + eUnsetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnsetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__STYLES: + getStyles().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__ELEMENT: + unsetElement(); + return; + case NotationPackage.LIST_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + case NotationPackage.LIST_COMPARTMENT__COLLAPSED: + setCollapsed(COLLAPSED_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__SORTING: + setSorting(SORTING_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__SORTING_KEYS: + setSortingKeys(SORTING_KEYS_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS: + getSortedObjects().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__FILTERING: + setFiltering(FILTERING_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS: + setFilteringKeys(FILTERING_KEYS_EDEFAULT); + return; + case NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS: + getFilteredObjects().clear(); + return; + case NotationPackage.LIST_COMPARTMENT__SHOW_TITLE: + setShowTitle(SHOW_TITLE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + return false; + default: + return eIsSetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.LIST_COMPARTMENT__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.LIST_COMPARTMENT__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.LIST_COMPARTMENT__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.LIST_COMPARTMENT__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__ELEMENT: + return isSetElement(); + case NotationPackage.LIST_COMPARTMENT__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + case NotationPackage.LIST_COMPARTMENT__COLLAPSED: + return isCollapsed() != COLLAPSED_EDEFAULT; + case NotationPackage.LIST_COMPARTMENT__SORTING: + return getSorting() != SORTING_EDEFAULT; + case NotationPackage.LIST_COMPARTMENT__SORTING_KEYS: + return SORTING_KEYS_EDEFAULT == null ? getSortingKeys() != null : !SORTING_KEYS_EDEFAULT.equals(getSortingKeys()); + case NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS: + return !getSortedObjects().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__FILTERING: + return getFiltering() != FILTERING_EDEFAULT; + case NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS: + return FILTERING_KEYS_EDEFAULT == null ? getFilteringKeys() != null : !FILTERING_KEYS_EDEFAULT.equals(getFilteringKeys()); + case NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS: + return !getFilteredObjects().isEmpty(); + case NotationPackage.LIST_COMPARTMENT__SHOW_TITLE: + return isShowTitle() != SHOW_TITLE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == SortingStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.LIST_COMPARTMENT__SORTING: + return NotationPackage.SORTING_STYLE__SORTING; + case NotationPackage.LIST_COMPARTMENT__SORTING_KEYS: + return NotationPackage.SORTING_STYLE__SORTING_KEYS; + case NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS: + return NotationPackage.SORTING_STYLE__SORTED_OBJECTS; + default: + return -1; + } + } + if (baseClass == FilteringStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.LIST_COMPARTMENT__FILTERING: + return NotationPackage.FILTERING_STYLE__FILTERING; + case NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS: + return NotationPackage.FILTERING_STYLE__FILTERING_KEYS; + case NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS: + return NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS; + default: + return -1; + } + } + if (baseClass == TitleStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.LIST_COMPARTMENT__SHOW_TITLE: + return NotationPackage.TITLE_STYLE__SHOW_TITLE; + 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 == SortingStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.SORTING_STYLE__SORTING: + return NotationPackage.LIST_COMPARTMENT__SORTING; + case NotationPackage.SORTING_STYLE__SORTING_KEYS: + return NotationPackage.LIST_COMPARTMENT__SORTING_KEYS; + case NotationPackage.SORTING_STYLE__SORTED_OBJECTS: + return NotationPackage.LIST_COMPARTMENT__SORTED_OBJECTS; + default: + return -1; + } + } + if (baseClass == FilteringStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.FILTERING_STYLE__FILTERING: + return NotationPackage.LIST_COMPARTMENT__FILTERING; + case NotationPackage.FILTERING_STYLE__FILTERING_KEYS: + return NotationPackage.LIST_COMPARTMENT__FILTERING_KEYS; + case NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS: + return NotationPackage.LIST_COMPARTMENT__FILTERED_OBJECTS; + default: + return -1; + } + } + if (baseClass == TitleStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + return NotationPackage.LIST_COMPARTMENT__SHOW_TITLE; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // ListCompartmentImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ListValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ListValueStyleImpl.java new file mode 100644 index 0000000000..a36e7cc867 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ListValueStyleImpl.java @@ -0,0 +1,225 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.util.DelegatingEcoreEList; + +import org.eclipse.gmf.runtime.notation.ListValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; +import java.util.List; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>List Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ListValueStyleImpl#getRawValuesList <em>Raw Values List</em>}</li> + * </ul> + * + * @generated + */ +public class ListValueStyleImpl extends DataTypeStyleImpl implements ListValueStyle +{ + private EList rawValuesList; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ListValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.LIST_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public EList getRawValuesList() + { + if (rawValuesList instanceof DelegatingEcoreEList) + { + return rawValuesList; + } + final EList delegate = getRawValuesListGen(); + rawValuesList = new DelegatingEcoreEList(this) + { + private static final long serialVersionUID = -7769354624338385073L; + + /** + * Overridden as per JavaDoc of {@link DelegatingEcoreEList}. + */ + @Override + public int getFeatureID() + { + return NotationPackage.LIST_VALUE_STYLE__RAW_VALUES_LIST; + } + + @Override + protected boolean isNotificationRequired() + { + // Never notify. The delegate list does so already. + return false; + } + + @Override + protected List delegateList() + { + return delegate; + } + + @Override + protected Object validate(int index, Object object) + { + Object validated = super.validate(index, object); + if (validated != null && !isInstance(validated)) + { + throw new ArrayStoreException(); + } + try + { + getObjectFromString((String)validated); + } + catch (Exception e) + { + throw new IllegalArgumentException("Value <" + validated//$NON-NLS-1$ + + "> cannot be associated with Data type <"//$NON-NLS-1$ + + getInstanceType().toString() + ">: " + e.getMessage());//$NON-NLS-1$ + } + return validated; + } + }; + return rawValuesList; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getRawValuesListGen() + { + return (EList)eDynamicGet(NotationPackage.LIST_VALUE_STYLE__RAW_VALUES_LIST, NotationPackage.Literals.LIST_VALUE_STYLE__RAW_VALUES_LIST, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.LIST_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.LIST_VALUE_STYLE__INSTANCE_TYPE: + if (resolve) + { + return getInstanceType(); + } + return basicGetInstanceType(); + case NotationPackage.LIST_VALUE_STYLE__RAW_VALUES_LIST: + return getRawValuesList(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.LIST_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.LIST_VALUE_STYLE__INSTANCE_TYPE: + setInstanceType((EDataType)newValue); + return; + case NotationPackage.LIST_VALUE_STYLE__RAW_VALUES_LIST: + getRawValuesList().clear(); + getRawValuesList().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.LIST_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.LIST_VALUE_STYLE__INSTANCE_TYPE: + setInstanceType((EDataType)null); + return; + case NotationPackage.LIST_VALUE_STYLE__RAW_VALUES_LIST: + getRawValuesList().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.LIST_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.LIST_VALUE_STYLE__INSTANCE_TYPE: + return basicGetInstanceType() != null; + case NotationPackage.LIST_VALUE_STYLE__RAW_VALUES_LIST: + return !getRawValuesList().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // ListValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LocationImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LocationImpl.java new file mode 100644 index 0000000000..d6c60820de --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/LocationImpl.java @@ -0,0 +1,208 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Location</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.LocationImpl#getX <em>X</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.LocationImpl#getY <em>Y</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class LocationImpl extends CDOObjectImpl implements Location +{ + /** + * The default value of the '{@link #getX() <em>X</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getX() + * @generated + * @ordered + */ + protected static final int X_EDEFAULT = 0; + + /** + * The default value of the '{@link #getY() <em>Y</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getY() + * @generated + * @ordered + */ + protected static final int Y_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LocationImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.LOCATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getX() + { + return ((Integer)eDynamicGet(NotationPackage.LOCATION__X, NotationPackage.Literals.LOCATION__X, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setX(int newX) + { + eDynamicSet(NotationPackage.LOCATION__X, NotationPackage.Literals.LOCATION__X, new Integer(newX)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getY() + { + return ((Integer)eDynamicGet(NotationPackage.LOCATION__Y, NotationPackage.Literals.LOCATION__Y, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setY(int newY) + { + eDynamicSet(NotationPackage.LOCATION__Y, NotationPackage.Literals.LOCATION__Y, new Integer(newY)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.LOCATION__X: + return new Integer(getX()); + case NotationPackage.LOCATION__Y: + return new Integer(getY()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.LOCATION__X: + setX(((Integer)newValue).intValue()); + return; + case NotationPackage.LOCATION__Y: + setY(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.LOCATION__X: + setX(X_EDEFAULT); + return; + case NotationPackage.LOCATION__Y: + setY(Y_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.LOCATION__X: + return getX() != X_EDEFAULT; + case NotationPackage.LOCATION__Y: + return getY() != Y_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // LocationImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/MultiDiagramLinkStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/MultiDiagramLinkStyleImpl.java new file mode 100644 index 0000000000..cbed39de8d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/MultiDiagramLinkStyleImpl.java @@ -0,0 +1,148 @@ +/****************************************************************************** + * Copyright (c) 2007, 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.MultiDiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Multi Diagram Link Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.MultiDiagramLinkStyleImpl#getDiagramLinks <em>Diagram Links</em>}</li> + * </ul> + * + * @generated + */ +public class MultiDiagramLinkStyleImpl extends CDOObjectImpl implements MultiDiagramLinkStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MultiDiagramLinkStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.MULTI_DIAGRAM_LINK_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getDiagramLinks() + { + return (EList)eDynamicGet(NotationPackage.MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS, NotationPackage.Literals.MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS, true, + true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS: + return getDiagramLinks(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS: + getDiagramLinks().clear(); + getDiagramLinks().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS: + getDiagramLinks().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS: + return !getDiagramLinks().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // MultiDiagramLinkStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NamedStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NamedStyleImpl.java new file mode 100644 index 0000000000..7b34b71af3 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NamedStyleImpl.java @@ -0,0 +1,163 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NamedStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Named Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.NamedStyleImpl#getName <em>Name</em>}</li> + * </ul> + * + * @generated + */ +public class NamedStyleImpl extends CDOObjectImpl implements NamedStyle +{ + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected NamedStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.NAMED_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() + { + return (String)eDynamicGet(NotationPackage.NAMED_STYLE__NAME, NotationPackage.Literals.NAMED_STYLE__NAME, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) + { + eDynamicSet(NotationPackage.NAMED_STYLE__NAME, NotationPackage.Literals.NAMED_STYLE__NAME, newName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.NAMED_STYLE__NAME: + return getName(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.NAMED_STYLE__NAME: + setName((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.NAMED_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.NAMED_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + } + return eDynamicIsSet(featureID); + } + +} // NamedStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NodeEntryImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NodeEntryImpl.java new file mode 100644 index 0000000000..ac4b0d426d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NodeEntryImpl.java @@ -0,0 +1,301 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.BasicEMap; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.Alignment; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Node Entry</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.NodeEntryImpl#getTypedValue <em>Value</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.NodeEntryImpl#getTypedKey <em>Key</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class NodeEntryImpl extends CDOObjectImpl implements BasicEMap.Entry +{ + /** + * The default value of the '{@link #getTypedValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTypedValue() + * @generated + * @ordered + */ + protected static final Alignment VALUE_EDEFAULT = Alignment.CENTER_LITERAL; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected NodeEntryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.NODE_ENTRY; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Alignment getTypedValue() + { + return (Alignment)eDynamicGet(NotationPackage.NODE_ENTRY__VALUE, NotationPackage.Literals.NODE_ENTRY__VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTypedValue(Alignment newValue) + { + eDynamicSet(NotationPackage.NODE_ENTRY__VALUE, NotationPackage.Literals.NODE_ENTRY__VALUE, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Node getTypedKey() + { + return (Node)eDynamicGet(NotationPackage.NODE_ENTRY__KEY, NotationPackage.Literals.NODE_ENTRY__KEY, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Node basicGetTypedKey() + { + return (Node)eDynamicGet(NotationPackage.NODE_ENTRY__KEY, NotationPackage.Literals.NODE_ENTRY__KEY, false, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTypedKey(Node newKey) + { + eDynamicSet(NotationPackage.NODE_ENTRY__KEY, NotationPackage.Literals.NODE_ENTRY__KEY, newKey); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.NODE_ENTRY__VALUE: + return getTypedValue(); + case NotationPackage.NODE_ENTRY__KEY: + if (resolve) + { + return getTypedKey(); + } + return basicGetTypedKey(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.NODE_ENTRY__VALUE: + setTypedValue((Alignment)newValue); + return; + case NotationPackage.NODE_ENTRY__KEY: + setTypedKey((Node)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.NODE_ENTRY__VALUE: + setTypedValue(VALUE_EDEFAULT); + return; + case NotationPackage.NODE_ENTRY__KEY: + setTypedKey((Node)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.NODE_ENTRY__VALUE: + return getTypedValue() != VALUE_EDEFAULT; + case NotationPackage.NODE_ENTRY__KEY: + return basicGetTypedKey() != null; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected int hash = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getHash() + { + if (hash == -1) + { + Object theKey = getKey(); + hash = theKey == null ? 0 : theKey.hashCode(); + } + return hash; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setHash(int hash) + { + this.hash = hash; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getKey() + { + return getTypedKey(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setKey(Object key) + { + setTypedKey((Node)key); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getValue() + { + return getTypedValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object setValue(Object value) + { + Object oldValue = getValue(); + setTypedValue((Alignment)value); + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EMap getEMap() + { + EObject container = eContainer(); + return container == null ? null : (EMap)container.eGet(eContainmentFeature()); + } + +} // NodeEntryImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NodeImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NodeImpl.java new file mode 100644 index 0000000000..4eaf74438b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NodeImpl.java @@ -0,0 +1,320 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Node</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.NodeImpl#getLayoutConstraint <em>Layout Constraint</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class NodeImpl extends ViewImpl implements Node +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected NodeImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.NODE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LayoutConstraint getLayoutConstraint() + { + return (LayoutConstraint)eDynamicGet(NotationPackage.NODE__LAYOUT_CONSTRAINT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.NODE__LAYOUT_CONSTRAINT, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetLayoutConstraint(LayoutConstraint newLayoutConstraint, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newLayoutConstraint, NotationPackage.NODE__LAYOUT_CONSTRAINT, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLayoutConstraint(LayoutConstraint newLayoutConstraint) + { + eDynamicSet(NotationPackage.NODE__LAYOUT_CONSTRAINT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.NODE__LAYOUT_CONSTRAINT, newLayoutConstraint); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + */ + public LayoutConstraint createLayoutConstraint(EClass eClass) + { + LayoutConstraint newLayoutConstraint = (LayoutConstraint)eClass.getEPackage().getEFactoryInstance().create(eClass); + setLayoutConstraint(newLayoutConstraint); + return newLayoutConstraint; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.NODE__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.NODE__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.NODE__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.NODE__PERSISTED_CHILDREN: + return ((InternalEList)getPersistedChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.NODE__STYLES: + return ((InternalEList)getStyles()).basicRemove(otherEnd, msgs); + case NotationPackage.NODE__TRANSIENT_CHILDREN: + return ((InternalEList)getTransientChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.NODE__LAYOUT_CONSTRAINT: + return basicSetLayoutConstraint(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.NODE__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.NODE__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.NODE__TYPE: + return getType(); + case NotationPackage.NODE__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.NODE__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.NODE__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.NODE__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.NODE__STYLES: + return getStyles(); + case NotationPackage.NODE__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.NODE__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.NODE__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.NODE__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.NODE__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.NODE__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.NODE__TYPE: + setType((String)newValue); + return; + case NotationPackage.NODE__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.NODE__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.NODE__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.NODE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.NODE__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.NODE__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.NODE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.NODE__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.NODE__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.NODE__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.NODE__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.NODE__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.NODE__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.NODE__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.NODE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.NODE__STYLES: + getStyles().clear(); + return; + case NotationPackage.NODE__ELEMENT: + unsetElement(); + return; + case NotationPackage.NODE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.NODE__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.NODE__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.NODE__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.NODE__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.NODE__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.NODE__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.NODE__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.NODE__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.NODE__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.NODE__ELEMENT: + return isSetElement(); + case NotationPackage.NODE__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.NODE__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.NODE__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + } + return eDynamicIsSet(featureID); + } + +} // NodeImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationEObjectImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationEObjectImpl.java new file mode 100644 index 0000000000..86a83d1460 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationEObjectImpl.java @@ -0,0 +1,87 @@ +/** + * <copyright> + * + * Copyright (c) 2006 IBM Corporation and others. + * 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: + * IBM - Initial API and implementation + * + * </copyright> + * + * $Id: NotationEObjectImpl.java,v 1.3 2010/03/06 00:04:14 aboyko Exp $ + */ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EContentsEList; +import org.eclipse.emf.ecore.util.ECrossReferenceEList; + +/** + * An implementation of the model object '<em><b>EObject</b></em>'. + * This implementation flattens the fields for storing + * the {@link #eProxyURI}, the {@link #eContents}, and the {@link #eCrossReferences}, + * which in {@link EObjectImpl} are stored in the properties holder. + * This reduces the likelihood of needing to allocate a properties holder and speeds up the access to these fields. + * @deprecated use {@link org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container} + */ +@Deprecated +public class NotationEObjectImpl extends EObjectImpl +{ + protected URI eProxyURI; + + /** + * Creates an EObject that is faster and more space efficient. + */ + protected NotationEObjectImpl() + { + super(); + } + + @Override + protected EPropertiesHolder eProperties() + { + if (eProperties == null) + { + eProperties = new EPropertiesHolderBaseImpl() + { + }; + } + return eProperties; + } + + @Override + public boolean eIsProxy() + { + return eProxyURI != null; + } + + @Override + public URI eProxyURI() + { + return eProxyURI; + } + + @Override + public void eSetProxyURI(URI uri) + { + eProxyURI = uri; + } + + @Override + public EList eContents() + { + return EContentsEList.createEContentsEList(this); + } + + @Override + public EList eCrossReferences() + { + return ECrossReferenceEList.createECrossReferenceEList(this); + } +} diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationFactoryImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationFactoryImpl.java new file mode 100644 index 0000000000..ddbcad9b82 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationFactoryImpl.java @@ -0,0 +1,1630 @@ +/****************************************************************************** + * Copyright (c) 2004, 2010 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.gmf.runtime.notation.Alignment; +import org.eclipse.gmf.runtime.notation.ArrowStyle; +import org.eclipse.gmf.runtime.notation.ArrowType; +import org.eclipse.gmf.runtime.notation.BasicCompartment; +import org.eclipse.gmf.runtime.notation.BasicDecorationNode; +import org.eclipse.gmf.runtime.notation.BasicSemanticCompartment; +import org.eclipse.gmf.runtime.notation.BooleanListValueStyle; +import org.eclipse.gmf.runtime.notation.BooleanValueStyle; +import org.eclipse.gmf.runtime.notation.Bounds; +import org.eclipse.gmf.runtime.notation.ByteArrayValueStyle; +import org.eclipse.gmf.runtime.notation.CanonicalStyle; +import org.eclipse.gmf.runtime.notation.Compartment; +import org.eclipse.gmf.runtime.notation.Connector; +import org.eclipse.gmf.runtime.notation.ConnectorStyle; +import org.eclipse.gmf.runtime.notation.DataTypeStyle; +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.DiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.DiagramStyle; +import org.eclipse.gmf.runtime.notation.DoubleListValueStyle; +import org.eclipse.gmf.runtime.notation.DoubleValueStyle; +import org.eclipse.gmf.runtime.notation.DrawerStyle; +import org.eclipse.gmf.runtime.notation.EObjectListValueStyle; +import org.eclipse.gmf.runtime.notation.EObjectValueStyle; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.FillStyle; +import org.eclipse.gmf.runtime.notation.Filtering; +import org.eclipse.gmf.runtime.notation.FilteringStyle; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.GradientStyle; +import org.eclipse.gmf.runtime.notation.Guide; +import org.eclipse.gmf.runtime.notation.GuideStyle; +import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.IdentityAnchor; +import org.eclipse.gmf.runtime.notation.Image; +import org.eclipse.gmf.runtime.notation.ImageBufferStyle; +import org.eclipse.gmf.runtime.notation.ImageStyle; +import org.eclipse.gmf.runtime.notation.IntListValueStyle; +import org.eclipse.gmf.runtime.notation.IntValueStyle; +import org.eclipse.gmf.runtime.notation.JumpLinkStatus; +import org.eclipse.gmf.runtime.notation.JumpLinkType; +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.LineType; +import org.eclipse.gmf.runtime.notation.LineTypeStyle; +import org.eclipse.gmf.runtime.notation.ListCompartment; +import org.eclipse.gmf.runtime.notation.ListValueStyle; +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.MeasurementUnit; +import org.eclipse.gmf.runtime.notation.MultiDiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.NamedStyle; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PageStyle; +import org.eclipse.gmf.runtime.notation.PropertiesSetStyle; +import org.eclipse.gmf.runtime.notation.PropertyValue; +import org.eclipse.gmf.runtime.notation.Ratio; +import org.eclipse.gmf.runtime.notation.RelativeBendpoints; +import org.eclipse.gmf.runtime.notation.RoundedCornersStyle; +import org.eclipse.gmf.runtime.notation.Routing; +import org.eclipse.gmf.runtime.notation.RoutingStyle; +import org.eclipse.gmf.runtime.notation.SemanticListCompartment; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.ShapeStyle; +import org.eclipse.gmf.runtime.notation.SingleValueStyle; +import org.eclipse.gmf.runtime.notation.Size; +import org.eclipse.gmf.runtime.notation.Smoothness; +import org.eclipse.gmf.runtime.notation.Sorting; +import org.eclipse.gmf.runtime.notation.SortingDirection; +import org.eclipse.gmf.runtime.notation.SortingStyle; +import org.eclipse.gmf.runtime.notation.StandardDiagram; +import org.eclipse.gmf.runtime.notation.StringListValueStyle; +import org.eclipse.gmf.runtime.notation.StringValueStyle; +import org.eclipse.gmf.runtime.notation.TextAlignment; +import org.eclipse.gmf.runtime.notation.TextStyle; +import org.eclipse.gmf.runtime.notation.TitleStyle; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; +import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class NotationFactoryImpl extends EFactoryImpl implements NotationFactory +{ + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static NotationFactory init() + { + try + { + NotationFactory theNotationFactory = (NotationFactory)EPackage.Registry.INSTANCE.getEFactory(NotationPackage.eNS_URI); + if (theNotationFactory != null) + { + return theNotationFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new NotationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotationFactoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case NotationPackage.EDGE: + return createEdge(); + case NotationPackage.NODE: + return createNode(); + case NotationPackage.FILL_STYLE: + return createFillStyle(); + case NotationPackage.LINE_STYLE: + return createLineStyle(); + case NotationPackage.FONT_STYLE: + return createFontStyle(); + case NotationPackage.TITLE_STYLE: + return createTitleStyle(); + case NotationPackage.SORTING_STYLE: + return createSortingStyle(); + case NotationPackage.DESCRIPTION_STYLE: + return createDescriptionStyle(); + case NotationPackage.SIZE: + return createSize(); + case NotationPackage.LOCATION: + return createLocation(); + case NotationPackage.BOUNDS: + return createBounds(); + case NotationPackage.RATIO: + return createRatio(); + case NotationPackage.IDENTITY_ANCHOR: + return createIdentityAnchor(); + case NotationPackage.ROUTING_STYLE: + return createRoutingStyle(); + case NotationPackage.RELATIVE_BENDPOINTS: + return createRelativeBendpoints(); + case NotationPackage.DIAGRAM: + return createDiagram(); + case NotationPackage.IMAGE: + return createImage(); + case NotationPackage.CANONICAL_STYLE: + return createCanonicalStyle(); + case NotationPackage.SHAPE_STYLE: + return createShapeStyle(); + case NotationPackage.CONNECTOR_STYLE: + return createConnectorStyle(); + case NotationPackage.PAGE_STYLE: + return createPageStyle(); + case NotationPackage.DRAWER_STYLE: + return createDrawerStyle(); + case NotationPackage.GUIDE_STYLE: + return createGuideStyle(); + case NotationPackage.GUIDE: + return createGuide(); + case NotationPackage.NODE_ENTRY: + return (EObject)createNodeEntry(); + case NotationPackage.FILTERING_STYLE: + return createFilteringStyle(); + case NotationPackage.DIAGRAM_STYLE: + return createDiagramStyle(); + case NotationPackage.IMAGE_STYLE: + return createImageStyle(); + case NotationPackage.IMAGE_BUFFER_STYLE: + return createImageBufferStyle(); + case NotationPackage.PROPERTIES_SET_STYLE: + return createPropertiesSetStyle(); + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY: + return (EObject)createStringToPropertyValueMapEntry(); + case NotationPackage.PROPERTY_VALUE: + return createPropertyValue(); + case NotationPackage.SINGLE_VALUE_STYLE: + return createSingleValueStyle(); + case NotationPackage.LIST_VALUE_STYLE: + return createListValueStyle(); + case NotationPackage.NAMED_STYLE: + return createNamedStyle(); + case NotationPackage.DATA_TYPE_STYLE: + return createDataTypeStyle(); + case NotationPackage.INT_VALUE_STYLE: + return createIntValueStyle(); + case NotationPackage.INT_LIST_VALUE_STYLE: + return createIntListValueStyle(); + case NotationPackage.BOOLEAN_VALUE_STYLE: + return createBooleanValueStyle(); + case NotationPackage.DOUBLE_VALUE_STYLE: + return createDoubleValueStyle(); + case NotationPackage.DOUBLE_LIST_VALUE_STYLE: + return createDoubleListValueStyle(); + case NotationPackage.STRING_VALUE_STYLE: + return createStringValueStyle(); + case NotationPackage.STRING_LIST_VALUE_STYLE: + return createStringListValueStyle(); + case NotationPackage.EOBJECT_VALUE_STYLE: + return createEObjectValueStyle(); + case NotationPackage.EOBJECT_LIST_VALUE_STYLE: + return createEObjectListValueStyle(); + case NotationPackage.BYTE_ARRAY_VALUE_STYLE: + return createByteArrayValueStyle(); + case NotationPackage.BOOLEAN_LIST_VALUE_STYLE: + return createBooleanListValueStyle(); + case NotationPackage.HINTED_DIAGRAM_LINK_STYLE: + return createHintedDiagramLinkStyle(); + case NotationPackage.DIAGRAM_LINK_STYLE: + return createDiagramLinkStyle(); + case NotationPackage.MULTI_DIAGRAM_LINK_STYLE: + return createMultiDiagramLinkStyle(); + case NotationPackage.TEXT_STYLE: + return createTextStyle(); + case NotationPackage.LINE_TYPE_STYLE: + return createLineTypeStyle(); + case NotationPackage.ARROW_STYLE: + return createArrowStyle(); + case NotationPackage.SHAPE: + return createShape(); + case NotationPackage.COMPARTMENT: + return createCompartment(); + case NotationPackage.LIST_COMPARTMENT: + return createListCompartment(); + case NotationPackage.CONNECTOR: + return createConnector(); + case NotationPackage.STANDARD_DIAGRAM: + return createStandardDiagram(); + case NotationPackage.DECORATION_NODE: + return createDecorationNode(); + case NotationPackage.BASIC_DECORATION_NODE: + return createBasicDecorationNode(); + case NotationPackage.BASIC_COMPARTMENT: + return createBasicCompartment(); + case NotationPackage.BASIC_SEMANTIC_COMPARTMENT: + return createBasicSemanticCompartment(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT: + return createSemanticListCompartment(); + case NotationPackage.ROUNDED_CORNERS_STYLE: + return createRoundedCornersStyle(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case NotationPackage.SORTING: + return createSortingFromString(eDataType, initialValue); + case NotationPackage.FILTERING: + return createFilteringFromString(eDataType, initialValue); + case NotationPackage.ROUTING: + return createRoutingFromString(eDataType, initialValue); + case NotationPackage.SMOOTHNESS: + return createSmoothnessFromString(eDataType, initialValue); + case NotationPackage.JUMP_LINK_STATUS: + return createJumpLinkStatusFromString(eDataType, initialValue); + case NotationPackage.JUMP_LINK_TYPE: + return createJumpLinkTypeFromString(eDataType, initialValue); + case NotationPackage.ALIGNMENT: + return createAlignmentFromString(eDataType, initialValue); + case NotationPackage.SORTING_DIRECTION: + return createSortingDirectionFromString(eDataType, initialValue); + case NotationPackage.MEASUREMENT_UNIT: + return createMeasurementUnitFromString(eDataType, initialValue); + case NotationPackage.TEXT_ALIGNMENT: + return createTextAlignmentFromString(eDataType, initialValue); + case NotationPackage.LINE_TYPE: + return createLineTypeFromString(eDataType, initialValue); + case NotationPackage.ARROW_TYPE: + return createArrowTypeFromString(eDataType, initialValue); + case NotationPackage.GRADIENT_STYLE: + return createGradientStyleFromString(eDataType, initialValue); + case NotationPackage.RELATIVE_BENDPOINT_LIST: + return createRelativeBendpointListFromString(eDataType, initialValue); + case NotationPackage.FILTER_KEY_LIST: + return createFilterKeyListFromString(eDataType, initialValue); + case NotationPackage.SORT_KEY_MAP: + return createSortKeyMapFromString(eDataType, initialValue); + case NotationPackage.GRADIENT_DATA: + return createGradientDataFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case NotationPackage.SORTING: + return convertSortingToString(eDataType, instanceValue); + case NotationPackage.FILTERING: + return convertFilteringToString(eDataType, instanceValue); + case NotationPackage.ROUTING: + return convertRoutingToString(eDataType, instanceValue); + case NotationPackage.SMOOTHNESS: + return convertSmoothnessToString(eDataType, instanceValue); + case NotationPackage.JUMP_LINK_STATUS: + return convertJumpLinkStatusToString(eDataType, instanceValue); + case NotationPackage.JUMP_LINK_TYPE: + return convertJumpLinkTypeToString(eDataType, instanceValue); + case NotationPackage.ALIGNMENT: + return convertAlignmentToString(eDataType, instanceValue); + case NotationPackage.SORTING_DIRECTION: + return convertSortingDirectionToString(eDataType, instanceValue); + case NotationPackage.MEASUREMENT_UNIT: + return convertMeasurementUnitToString(eDataType, instanceValue); + case NotationPackage.TEXT_ALIGNMENT: + return convertTextAlignmentToString(eDataType, instanceValue); + case NotationPackage.LINE_TYPE: + return convertLineTypeToString(eDataType, instanceValue); + case NotationPackage.ARROW_TYPE: + return convertArrowTypeToString(eDataType, instanceValue); + case NotationPackage.GRADIENT_STYLE: + return convertGradientStyleToString(eDataType, instanceValue); + case NotationPackage.RELATIVE_BENDPOINT_LIST: + return convertRelativeBendpointListToString(eDataType, instanceValue); + case NotationPackage.FILTER_KEY_LIST: + return convertFilterKeyListToString(eDataType, instanceValue); + case NotationPackage.SORT_KEY_MAP: + return convertSortKeyMapToString(eDataType, instanceValue); + case NotationPackage.GRADIENT_DATA: + return convertGradientDataToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Edge createEdge() + { + EdgeImpl edge = new EdgeImpl(); + return edge; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Node createNode() + { + NodeImpl node = new NodeImpl(); + return node; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FillStyle createFillStyle() + { + FillStyleImpl fillStyle = new FillStyleImpl(); + return fillStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LineStyle createLineStyle() + { + LineStyleImpl lineStyle = new LineStyleImpl(); + return lineStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FontStyle createFontStyle() + { + FontStyleImpl fontStyle = new FontStyleImpl(); + return fontStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TitleStyle createTitleStyle() + { + TitleStyleImpl titleStyle = new TitleStyleImpl(); + return titleStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SortingStyle createSortingStyle() + { + SortingStyleImpl sortingStyle = new SortingStyleImpl(); + return sortingStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DescriptionStyle createDescriptionStyle() + { + DescriptionStyleImpl descriptionStyle = new DescriptionStyleImpl(); + return descriptionStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Size createSize() + { + SizeImpl size = new SizeImpl(); + return size; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Location createLocation() + { + LocationImpl location = new LocationImpl(); + return location; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Bounds createBounds() + { + BoundsImpl bounds = new BoundsImpl(); + return bounds; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Ratio createRatio() + { + RatioImpl ratio = new RatioImpl(); + return ratio; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IdentityAnchor createIdentityAnchor() + { + IdentityAnchorImpl identityAnchor = new IdentityAnchorImpl(); + return identityAnchor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RoutingStyle createRoutingStyle() + { + RoutingStyleImpl routingStyle = new RoutingStyleImpl(); + return routingStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RelativeBendpoints createRelativeBendpoints() + { + RelativeBendpointsImpl relativeBendpoints = new RelativeBendpointsImpl(); + return relativeBendpoints; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CanonicalStyle createCanonicalStyle() + { + CanonicalStyleImpl canonicalStyle = new CanonicalStyleImpl(); + return canonicalStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ShapeStyle createShapeStyle() + { + ShapeStyleImpl shapeStyle = new ShapeStyleImpl(); + return shapeStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ConnectorStyle createConnectorStyle() + { + ConnectorStyleImpl connectorStyle = new ConnectorStyleImpl(); + return connectorStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Diagram createDiagram() + { + DiagramImpl diagram = new DiagramImpl(); + return diagram; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Image createImage() + { + ImageImpl image = new ImageImpl(); + return image; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public PageStyle createPageStyle() + { + PageStyleImpl pageStyle = new PageStyleImpl(); + return pageStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DrawerStyle createDrawerStyle() + { + DrawerStyleImpl drawerStyle = new DrawerStyleImpl(); + return drawerStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GuideStyle createGuideStyle() + { + GuideStyleImpl guideStyle = new GuideStyleImpl(); + return guideStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Guide createGuide() + { + GuideImpl guide = new GuideImpl(); + return guide; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Map.Entry createNodeEntry() + { + NodeEntryImpl nodeEntry = new NodeEntryImpl(); + return nodeEntry; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FilteringStyle createFilteringStyle() + { + FilteringStyleImpl filteringStyle = new FilteringStyleImpl(); + return filteringStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DiagramStyle createDiagramStyle() + { + DiagramStyleImpl diagramStyle = new DiagramStyleImpl(); + return diagramStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ImageStyle createImageStyle() + { + ImageStyleImpl imageStyle = new ImageStyleImpl(); + return imageStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ImageBufferStyle createImageBufferStyle() + { + ImageBufferStyleImpl imageBufferStyle = new ImageBufferStyleImpl(); + return imageBufferStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public PropertiesSetStyle createPropertiesSetStyle() + { + PropertiesSetStyleImpl propertiesSetStyle = new PropertiesSetStyleImpl(); + return propertiesSetStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Map.Entry createStringToPropertyValueMapEntry() + { + StringToPropertyValueMapEntryImpl stringToPropertyValueMapEntry = new StringToPropertyValueMapEntryImpl(); + return stringToPropertyValueMapEntry; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public PropertyValue createPropertyValue() + { + PropertyValueImpl propertyValue = new PropertyValueImpl(); + return propertyValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SingleValueStyle createSingleValueStyle() + { + SingleValueStyleImpl singleValueStyle = new SingleValueStyleImpl(); + return singleValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ListValueStyle createListValueStyle() + { + ListValueStyleImpl listValueStyle = new ListValueStyleImpl(); + return listValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NamedStyle createNamedStyle() + { + NamedStyleImpl namedStyle = new NamedStyleImpl(); + return namedStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DataTypeStyle createDataTypeStyle() + { + DataTypeStyleImpl dataTypeStyle = new DataTypeStyleImpl(); + return dataTypeStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IntValueStyle createIntValueStyle() + { + IntValueStyleImpl intValueStyle = new IntValueStyleImpl(); + return intValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IntListValueStyle createIntListValueStyle() + { + IntListValueStyleImpl intListValueStyle = new IntListValueStyleImpl(); + return intListValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BooleanValueStyle createBooleanValueStyle() + { + BooleanValueStyleImpl booleanValueStyle = new BooleanValueStyleImpl(); + return booleanValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DoubleValueStyle createDoubleValueStyle() + { + DoubleValueStyleImpl doubleValueStyle = new DoubleValueStyleImpl(); + return doubleValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DoubleListValueStyle createDoubleListValueStyle() + { + DoubleListValueStyleImpl doubleListValueStyle = new DoubleListValueStyleImpl(); + return doubleListValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StringValueStyle createStringValueStyle() + { + StringValueStyleImpl stringValueStyle = new StringValueStyleImpl(); + return stringValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StringListValueStyle createStringListValueStyle() + { + StringListValueStyleImpl stringListValueStyle = new StringListValueStyleImpl(); + return stringListValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObjectValueStyle createEObjectValueStyle() + { + EObjectValueStyleImpl eObjectValueStyle = new EObjectValueStyleImpl(); + return eObjectValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EObjectListValueStyle createEObjectListValueStyle() + { + EObjectListValueStyleImpl eObjectListValueStyle = new EObjectListValueStyleImpl(); + return eObjectListValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ByteArrayValueStyle createByteArrayValueStyle() + { + ByteArrayValueStyleImpl byteArrayValueStyle = new ByteArrayValueStyleImpl(); + return byteArrayValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BooleanListValueStyle createBooleanListValueStyle() + { + BooleanListValueStyleImpl booleanListValueStyle = new BooleanListValueStyleImpl(); + return booleanListValueStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public HintedDiagramLinkStyle createHintedDiagramLinkStyle() + { + HintedDiagramLinkStyleImpl hintedDiagramLinkStyle = new HintedDiagramLinkStyleImpl(); + return hintedDiagramLinkStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DiagramLinkStyle createDiagramLinkStyle() + { + DiagramLinkStyleImpl diagramLinkStyle = new DiagramLinkStyleImpl(); + return diagramLinkStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MultiDiagramLinkStyle createMultiDiagramLinkStyle() + { + MultiDiagramLinkStyleImpl multiDiagramLinkStyle = new MultiDiagramLinkStyleImpl(); + return multiDiagramLinkStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TextStyle createTextStyle() + { + TextStyleImpl textStyle = new TextStyleImpl(); + return textStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LineTypeStyle createLineTypeStyle() + { + LineTypeStyleImpl lineTypeStyle = new LineTypeStyleImpl(); + return lineTypeStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ArrowStyle createArrowStyle() + { + ArrowStyleImpl arrowStyle = new ArrowStyleImpl(); + return arrowStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Shape createShape() + { + ShapeImpl shape = new ShapeImpl(); + return shape; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Compartment createCompartment() + { + CompartmentImpl compartment = new CompartmentImpl(); + return compartment; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ListCompartment createListCompartment() + { + ListCompartmentImpl listCompartment = new ListCompartmentImpl(); + return listCompartment; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Connector createConnector() + { + ConnectorImpl connector = new ConnectorImpl(); + return connector; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StandardDiagram createStandardDiagram() + { + StandardDiagramImpl standardDiagram = new StandardDiagramImpl(); + return standardDiagram; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DecorationNode createDecorationNode() + { + DecorationNodeImpl decorationNode = new DecorationNodeImpl(); + return decorationNode; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicDecorationNode createBasicDecorationNode() + { + BasicDecorationNodeImpl basicDecorationNode = new BasicDecorationNodeImpl(); + return basicDecorationNode; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicCompartment createBasicCompartment() + { + BasicCompartmentImpl basicCompartment = new BasicCompartmentImpl(); + return basicCompartment; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicSemanticCompartment createBasicSemanticCompartment() + { + BasicSemanticCompartmentImpl basicSemanticCompartment = new BasicSemanticCompartmentImpl(); + return basicSemanticCompartment; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SemanticListCompartment createSemanticListCompartment() + { + SemanticListCompartmentImpl semanticListCompartment = new SemanticListCompartmentImpl(); + return semanticListCompartment; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RoundedCornersStyle createRoundedCornersStyle() + { + RoundedCornersStyleImpl roundedCornersStyle = new RoundedCornersStyleImpl(); + return roundedCornersStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Sorting createSortingFromString(EDataType eDataType, String initialValue) + { + Sorting result = Sorting.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertSortingToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Filtering createFilteringFromString(EDataType eDataType, String initialValue) + { + Filtering result = Filtering.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertFilteringToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Routing createRoutingFromString(EDataType eDataType, String initialValue) + { + Routing result = Routing.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertRoutingToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Smoothness createSmoothnessFromString(EDataType eDataType, String initialValue) + { + Smoothness result = Smoothness.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertSmoothnessToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JumpLinkStatus createJumpLinkStatusFromString(EDataType eDataType, String initialValue) + { + JumpLinkStatus result = JumpLinkStatus.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertJumpLinkStatusToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JumpLinkType createJumpLinkTypeFromString(EDataType eDataType, String initialValue) + { + JumpLinkType result = JumpLinkType.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertJumpLinkTypeToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Alignment createAlignmentFromString(EDataType eDataType, String initialValue) + { + Alignment result = Alignment.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertAlignmentToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SortingDirection createSortingDirectionFromString(EDataType eDataType, String initialValue) + { + SortingDirection result = SortingDirection.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertSortingDirectionToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MeasurementUnit createMeasurementUnitFromString(EDataType eDataType, String initialValue) + { + MeasurementUnit result = MeasurementUnit.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertMeasurementUnitToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TextAlignment createTextAlignmentFromString(EDataType eDataType, String initialValue) + { + TextAlignment result = TextAlignment.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertTextAlignmentToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LineType createLineTypeFromString(EDataType eDataType, String initialValue) + { + LineType result = LineType.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertLineTypeToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ArrowType createArrowTypeFromString(EDataType eDataType, String initialValue) + { + ArrowType result = ArrowType.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertArrowTypeToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GradientStyle createGradientStyleFromString(EDataType eDataType, String initialValue) + { + GradientStyle result = GradientStyle.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + return result; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertGradientStyleToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public List createRelativeBendpointListFromString(EDataType eDataType, String initialValue) + { + StringTokenizer st = new StringTokenizer(initialValue, "$"); //$NON-NLS-1$ + List newList = new ArrayList(st.countTokens()); + while (st.hasMoreTokens()) + { + newList.add(new RelativeBendpoint(st.nextToken().trim())); + } + return newList; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertRelativeBendpointListToString(EDataType eDataType, Object instanceValue) + { + StringBuffer sb = new StringBuffer(); + for (Iterator i = ((List)instanceValue).iterator(); i.hasNext();) + { + RelativeBendpoint point = (RelativeBendpoint)i.next(); + if (sb.length() != 0) + { + sb.append('$'); + } + sb.append(point.convertToString()); + } + return sb.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public List createFilterKeyListFromString(EDataType eDataType, String initialValue) + { + StringTokenizer st = new StringTokenizer(initialValue, ","); //$NON-NLS-1$ + List newList = new ArrayList(st.countTokens()); + while (st.hasMoreTokens()) + { + newList.add(st.nextToken().trim()); + } + return newList; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertFilterKeyListToString(EDataType eDataType, Object instanceValue) + { + StringBuffer sb = new StringBuffer(); + for (Iterator i = ((List)instanceValue).iterator(); i.hasNext();) + { + String key = (String)i.next(); + if (sb.length() != 0) + { + sb.append(','); + } + sb.append(key); + } + return sb.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Map createSortKeyMapFromString(EDataType eDataType, String initialValue) + { + StringTokenizer st = new StringTokenizer(initialValue, ","); //$NON-NLS-1$ + Map newMap = new LinkedHashMap(st.countTokens()); + String s; + int i; + while (st.hasMoreTokens()) + { + s = st.nextToken().trim(); + i = s.indexOf(':'); + newMap.put(s.substring(0, i).trim(), SortingDirection.get(s.substring(i + 1).trim())); + } + return newMap; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertSortKeyMapToString(EDataType eDataType, Object instanceValue) + { + StringBuffer sb = new StringBuffer(); + Map keyMap = (Map)instanceValue; + for (Iterator i = keyMap.keySet().iterator(); i.hasNext();) + { + String key = (String)i.next(); + SortingDirection direction = (SortingDirection)keyMap.get(key); + if (sb.length() != 0) + { + sb.append(','); + } + sb.append(key + ":" + direction.getName()); //$NON-NLS-1$ + } + return sb.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public GradientData createGradientDataFromString(EDataType eDataType, String initialValue) + { + GradientData gradient = null; + if (initialValue != null && !initialValue.equals("")) //$NON-NLS-1$ + { + gradient = new GradientData(); + StringTokenizer st = new StringTokenizer(initialValue, ","); //$NON-NLS-1$ + String s; + if (st.hasMoreTokens()) + { + s = st.nextToken().trim(); + try + { + gradient.setGradientColor1(Integer.parseInt(s)); + } + catch (NumberFormatException e) + { + } + } + if (st.hasMoreTokens()) + { + s = st.nextToken().trim(); + try + { + gradient.setGradientColor2(Integer.parseInt(s)); + } + catch (NumberFormatException e) + { + } + } + if (st.hasMoreTokens()) + { + s = st.nextToken().trim(); + try + { + gradient.setGradientStyle(Integer.parseInt(s)); + } + catch (NumberFormatException e) + { + } + } + } + return gradient; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String convertGradientDataToString(EDataType eDataType, Object instanceValue) + { + GradientData gradient = (GradientData)instanceValue; + if (gradient == null) + { + return ""; //$NON-NLS-1$ + } + else + { + StringBuffer sb = new StringBuffer(); + sb.append(gradient.getGradientColor1()); + sb.append(", "); //$NON-NLS-1$ + sb.append(gradient.getGradientColor2()); + sb.append(", "); //$NON-NLS-1$ + sb.append(gradient.getGradientStyle()); + return sb.toString(); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotationPackage getNotationPackage() + { + return (NotationPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static NotationPackage getPackage() + { + return NotationPackage.eINSTANCE; + } + +} // NotationFactoryImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationPackageImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationPackageImpl.java new file mode 100644 index 0000000000..5a8cd2b82c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/NotationPackageImpl.java @@ -0,0 +1,3628 @@ +/****************************************************************************** + * Copyright (c) 2004, 2010 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.gmf.runtime.notation.Alignment; +import org.eclipse.gmf.runtime.notation.Anchor; +import org.eclipse.gmf.runtime.notation.ArrowStyle; +import org.eclipse.gmf.runtime.notation.ArrowType; +import org.eclipse.gmf.runtime.notation.BasicCompartment; +import org.eclipse.gmf.runtime.notation.BasicDecorationNode; +import org.eclipse.gmf.runtime.notation.BasicSemanticCompartment; +import org.eclipse.gmf.runtime.notation.Bendpoints; +import org.eclipse.gmf.runtime.notation.BooleanListValueStyle; +import org.eclipse.gmf.runtime.notation.BooleanValueStyle; +import org.eclipse.gmf.runtime.notation.Bounds; +import org.eclipse.gmf.runtime.notation.ByteArrayValueStyle; +import org.eclipse.gmf.runtime.notation.CanonicalStyle; +import org.eclipse.gmf.runtime.notation.Compartment; +import org.eclipse.gmf.runtime.notation.Connector; +import org.eclipse.gmf.runtime.notation.ConnectorStyle; +import org.eclipse.gmf.runtime.notation.DataTypeStyle; +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.DiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.DiagramStyle; +import org.eclipse.gmf.runtime.notation.DoubleListValueStyle; +import org.eclipse.gmf.runtime.notation.DoubleValueStyle; +import org.eclipse.gmf.runtime.notation.DrawerStyle; +import org.eclipse.gmf.runtime.notation.EObjectListValueStyle; +import org.eclipse.gmf.runtime.notation.EObjectValueStyle; +import org.eclipse.gmf.runtime.notation.Edge; +import org.eclipse.gmf.runtime.notation.FillStyle; +import org.eclipse.gmf.runtime.notation.Filtering; +import org.eclipse.gmf.runtime.notation.FilteringStyle; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.GradientStyle; +import org.eclipse.gmf.runtime.notation.Guide; +import org.eclipse.gmf.runtime.notation.GuideStyle; +import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.IdentityAnchor; +import org.eclipse.gmf.runtime.notation.Image; +import org.eclipse.gmf.runtime.notation.ImageBufferStyle; +import org.eclipse.gmf.runtime.notation.ImageStyle; +import org.eclipse.gmf.runtime.notation.IntListValueStyle; +import org.eclipse.gmf.runtime.notation.IntValueStyle; +import org.eclipse.gmf.runtime.notation.JumpLinkStatus; +import org.eclipse.gmf.runtime.notation.JumpLinkType; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.LineType; +import org.eclipse.gmf.runtime.notation.LineTypeStyle; +import org.eclipse.gmf.runtime.notation.ListCompartment; +import org.eclipse.gmf.runtime.notation.ListValueStyle; +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.MeasurementUnit; +import org.eclipse.gmf.runtime.notation.MultiDiagramLinkStyle; +import org.eclipse.gmf.runtime.notation.NamedStyle; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PageStyle; +import org.eclipse.gmf.runtime.notation.PropertiesSetStyle; +import org.eclipse.gmf.runtime.notation.PropertyValue; +import org.eclipse.gmf.runtime.notation.Ratio; +import org.eclipse.gmf.runtime.notation.RelativeBendpoints; +import org.eclipse.gmf.runtime.notation.RoundedCornersStyle; +import org.eclipse.gmf.runtime.notation.Routing; +import org.eclipse.gmf.runtime.notation.RoutingStyle; +import org.eclipse.gmf.runtime.notation.SemanticListCompartment; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.ShapeStyle; +import org.eclipse.gmf.runtime.notation.SingleValueStyle; +import org.eclipse.gmf.runtime.notation.Size; +import org.eclipse.gmf.runtime.notation.Smoothness; +import org.eclipse.gmf.runtime.notation.Sorting; +import org.eclipse.gmf.runtime.notation.SortingDirection; +import org.eclipse.gmf.runtime.notation.SortingStyle; +import org.eclipse.gmf.runtime.notation.StandardDiagram; +import org.eclipse.gmf.runtime.notation.StringListValueStyle; +import org.eclipse.gmf.runtime.notation.StringObjectConverter; +import org.eclipse.gmf.runtime.notation.StringValueStyle; +import org.eclipse.gmf.runtime.notation.Style; +import org.eclipse.gmf.runtime.notation.TextAlignment; +import org.eclipse.gmf.runtime.notation.TextStyle; +import org.eclipse.gmf.runtime.notation.TitleStyle; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; + +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class NotationPackageImpl extends EPackageImpl implements NotationPackage +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass edgeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass nodeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass styleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass fillStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass lineStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass fontStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass titleStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass sortingStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass descriptionStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass layoutConstraintEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass sizeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass locationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass boundsEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass ratioEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass anchorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass bendpointsEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass identityAnchorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass routingStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass viewEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass relativeBendpointsEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass diagramEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass imageEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass canonicalStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass shapeStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass connectorStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass pageStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass drawerStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass guideStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass guideEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass nodeEntryEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass filteringStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass diagramStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass imageStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass imageBufferStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass propertiesSetStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass stringToPropertyValueMapEntryEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass propertyValueEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass singleValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass listValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass namedStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass stringObjectConverterEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass dataTypeStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass intValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass intListValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass booleanValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass doubleValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass doubleListValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass stringValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass stringListValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass eObjectValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass eObjectListValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass byteArrayValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass booleanListValueStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass hintedDiagramLinkStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass diagramLinkStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass multiDiagramLinkStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass textStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass lineTypeStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass arrowStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass shapeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass compartmentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass listCompartmentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass connectorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass standardDiagramEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass decorationNodeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicDecorationNodeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicCompartmentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicSemanticCompartmentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass semanticListCompartmentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass roundedCornersStyleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum sortingEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum filteringEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum routingEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum smoothnessEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum jumpLinkStatusEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum jumpLinkTypeEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum alignmentEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum sortingDirectionEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum measurementUnitEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum textAlignmentEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum lineTypeEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum arrowTypeEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum gradientStyleEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType relativeBendpointListEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType filterKeyListEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType sortKeyMapEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType gradientDataEDataType = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.gmf.runtime.notation.NotationPackage#eNS_URI + * @see #init() + * @generated + */ + private NotationPackageImpl() + { + super(eNS_URI, NotationFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + * <p>Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + * <p>Invocation of this method will not affect any packages that have + * already been initialized. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static NotationPackage init() + { + if (isInited) + { + return (NotationPackage)EPackage.Registry.INSTANCE.getEPackage(NotationPackage.eNS_URI); + } + + // Obtain or create and register package + NotationPackageImpl theNotationPackage = (NotationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof NotationPackageImpl + ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) + : new NotationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theNotationPackage.createPackageContents(); + + // Initialize created meta-data + theNotationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theNotationPackage.freeze(); + + return theNotationPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getEdge() + { + return edgeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEdge_Source() + { + return (EReference)edgeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEdge_Target() + { + return (EReference)edgeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEdge_Bendpoints() + { + return (EReference)edgeEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEdge_SourceAnchor() + { + return (EReference)edgeEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEdge_TargetAnchor() + { + return (EReference)edgeEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getNode() + { + return nodeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getNode_LayoutConstraint() + { + return (EReference)nodeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStyle() + { + return styleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFillStyle() + { + return fillStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFillStyle_FillColor() + { + return (EAttribute)fillStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFillStyle_Transparency() + { + return (EAttribute)fillStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFillStyle_Gradient() + { + return (EAttribute)fillStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLineStyle() + { + return lineStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLineStyle_LineColor() + { + return (EAttribute)lineStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLineStyle_LineWidth() + { + return (EAttribute)lineStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFontStyle() + { + return fontStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_FontColor() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_FontName() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_FontHeight() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_Bold() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_Italic() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_Underline() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFontStyle_StrikeThrough() + { + return (EAttribute)fontStyleEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getTitleStyle() + { + return titleStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTitleStyle_ShowTitle() + { + return (EAttribute)titleStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSortingStyle() + { + return sortingStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSortingStyle_Sorting() + { + return (EAttribute)sortingStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSortingStyle_SortingKeys() + { + return (EAttribute)sortingStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getSortingStyle_SortedObjects() + { + return (EReference)sortingStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDescriptionStyle() + { + return descriptionStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDescriptionStyle_Description() + { + return (EAttribute)descriptionStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLayoutConstraint() + { + return layoutConstraintEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSize() + { + return sizeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSize_Width() + { + return (EAttribute)sizeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSize_Height() + { + return (EAttribute)sizeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLocation() + { + return locationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLocation_X() + { + return (EAttribute)locationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLocation_Y() + { + return (EAttribute)locationEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBounds() + { + return boundsEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRatio() + { + return ratioEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRatio_Value() + { + return (EAttribute)ratioEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAnchor() + { + return anchorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBendpoints() + { + return bendpointsEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIdentityAnchor() + { + return identityAnchorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getIdentityAnchor_Id() + { + return (EAttribute)identityAnchorEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRoutingStyle() + { + return routingStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_Routing() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_Smoothness() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_AvoidObstructions() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_ClosestDistance() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_JumpLinkStatus() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_JumpLinkType() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoutingStyle_JumpLinksReverse() + { + return (EAttribute)routingStyleEClass.getEStructuralFeatures().get(6); + } + + /** + * Left in for backwards compatibility + * @deprecated Use getRoundedCornersStyle_RoundedBendpointsRadius() + */ + @Deprecated + public EAttribute getRoutingStyle_RoundedBendpointsRadius() + { + return getRoundedCornersStyle_RoundedBendpointsRadius(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getView() + { + return viewEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getView_Visible() + { + return (EAttribute)viewEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getView_Type() + { + return (EAttribute)viewEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getView_Mutable() + { + return (EAttribute)viewEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_SourceEdges() + { + return (EReference)viewEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_TargetEdges() + { + return (EReference)viewEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_PersistedChildren() + { + return (EReference)viewEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_Styles() + { + return (EReference)viewEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_Element() + { + return (EReference)viewEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_Diagram() + { + return (EReference)viewEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getView_TransientChildren() + { + return (EReference)viewEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRelativeBendpoints() + { + return relativeBendpointsEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRelativeBendpoints_Points() + { + return (EAttribute)relativeBendpointsEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDiagram() + { + return diagramEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDiagram_Name() + { + return (EAttribute)diagramEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDiagram_MeasurementUnit() + { + return (EAttribute)diagramEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDiagram_PersistedEdges() + { + return (EReference)diagramEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDiagram_TransientEdges() + { + return (EReference)diagramEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getImage() + { + return imageEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getImage_Data() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCanonicalStyle() + { + return canonicalStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCanonicalStyle_Canonical() + { + return (EAttribute)canonicalStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getShapeStyle() + { + return shapeStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getConnectorStyle() + { + return connectorStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPageStyle() + { + return pageStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPageStyle_PageX() + { + return (EAttribute)pageStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPageStyle_PageY() + { + return (EAttribute)pageStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPageStyle_PageWidth() + { + return (EAttribute)pageStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPageStyle_PageHeight() + { + return (EAttribute)pageStyleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDrawerStyle() + { + return drawerStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDrawerStyle_Collapsed() + { + return (EAttribute)drawerStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getGuideStyle() + { + return guideStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getGuideStyle_HorizontalGuides() + { + return (EReference)guideStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getGuideStyle_VerticalGuides() + { + return (EReference)guideStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getGuide() + { + return guideEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getGuide_Position() + { + return (EAttribute)guideEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getGuide_NodeMap() + { + return (EReference)guideEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getNodeEntry() + { + return nodeEntryEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getNodeEntry_Value() + { + return (EAttribute)nodeEntryEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getNodeEntry_Key() + { + return (EReference)nodeEntryEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFilteringStyle() + { + return filteringStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFilteringStyle_Filtering() + { + return (EAttribute)filteringStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFilteringStyle_FilteringKeys() + { + return (EAttribute)filteringStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFilteringStyle_FilteredObjects() + { + return (EReference)filteringStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDiagramStyle() + { + return diagramStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getImageStyle() + { + return imageStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getImageStyle_AntiAlias() + { + return (EAttribute)imageStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getImageStyle_MaintainAspectRatio() + { + return (EAttribute)imageStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getImageStyle_CropBound() + { + return (EReference)imageStyleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getImageBufferStyle() + { + return imageBufferStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getImageBufferStyle_ImageBuffer() + { + return (EReference)imageBufferStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPropertiesSetStyle() + { + return propertiesSetStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPropertiesSetStyle_PropertiesMap() + { + return (EReference)propertiesSetStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStringToPropertyValueMapEntry() + { + return stringToPropertyValueMapEntryEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getStringToPropertyValueMapEntry_Key() + { + return (EAttribute)stringToPropertyValueMapEntryEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getStringToPropertyValueMapEntry_Value() + { + return (EReference)stringToPropertyValueMapEntryEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPropertyValue() + { + return propertyValueEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPropertyValue_RawValue() + { + return (EAttribute)propertyValueEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPropertyValue_InstanceType() + { + return (EReference)propertyValueEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSingleValueStyle() + { + return singleValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getSingleValueStyle_RawValue() + { + return (EAttribute)singleValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getListValueStyle() + { + return listValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getListValueStyle_RawValuesList() + { + return (EAttribute)listValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getNamedStyle() + { + return namedStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getNamedStyle_Name() + { + return (EAttribute)namedStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStringObjectConverter() + { + return stringObjectConverterEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDataTypeStyle() + { + return dataTypeStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDataTypeStyle_InstanceType() + { + return (EReference)dataTypeStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIntValueStyle() + { + return intValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getIntValueStyle_IntValue() + { + return (EAttribute)intValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIntListValueStyle() + { + return intListValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getIntListValueStyle_IntListValue() + { + return (EAttribute)intListValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBooleanValueStyle() + { + return booleanValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getBooleanValueStyle_BooleanValue() + { + return (EAttribute)booleanValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDoubleValueStyle() + { + return doubleValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDoubleValueStyle_DoubleValue() + { + return (EAttribute)doubleValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDoubleListValueStyle() + { + return doubleListValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDoubleListValueStyle_DoubleListValue() + { + return (EAttribute)doubleListValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStringValueStyle() + { + return stringValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getStringValueStyle_StringValue() + { + return (EAttribute)stringValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStringListValueStyle() + { + return stringListValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getStringListValueStyle_StringListValue() + { + return (EAttribute)stringListValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getEObjectValueStyle() + { + return eObjectValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEObjectValueStyle_EObjectValue() + { + return (EReference)eObjectValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getEObjectListValueStyle() + { + return eObjectListValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getEObjectListValueStyle_EObjectListValue() + { + return (EReference)eObjectListValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getByteArrayValueStyle() + { + return byteArrayValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getByteArrayValueStyle_ByteArrayValue() + { + return (EAttribute)byteArrayValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBooleanListValueStyle() + { + return booleanListValueStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getBooleanListValueStyle_BooleanListValue() + { + return (EAttribute)booleanListValueStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getHintedDiagramLinkStyle() + { + return hintedDiagramLinkStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHintedDiagramLinkStyle_Hint() + { + return (EAttribute)hintedDiagramLinkStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDiagramLinkStyle() + { + return diagramLinkStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDiagramLinkStyle_DiagramLink() + { + return (EReference)diagramLinkStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMultiDiagramLinkStyle() + { + return multiDiagramLinkStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getMultiDiagramLinkStyle_DiagramLinks() + { + return (EReference)multiDiagramLinkStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getTextStyle() + { + return textStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTextStyle_TextAlignment() + { + return (EAttribute)textStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLineTypeStyle() + { + return lineTypeStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLineTypeStyle_LineType() + { + return (EAttribute)lineTypeStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getArrowStyle() + { + return arrowStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getArrowStyle_ArrowSource() + { + return (EAttribute)arrowStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getArrowStyle_ArrowTarget() + { + return (EAttribute)arrowStyleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getShape() + { + return shapeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCompartment() + { + return compartmentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getListCompartment() + { + return listCompartmentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getConnector() + { + return connectorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStandardDiagram() + { + return standardDiagramEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDecorationNode() + { + return decorationNodeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicDecorationNode() + { + return basicDecorationNodeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicCompartment() + { + return basicCompartmentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicSemanticCompartment() + { + return basicSemanticCompartmentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSemanticListCompartment() + { + return semanticListCompartmentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRoundedCornersStyle() + { + return roundedCornersStyleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRoundedCornersStyle_RoundedBendpointsRadius() + { + return (EAttribute)roundedCornersStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getSorting() + { + return sortingEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getFiltering() + { + return filteringEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getRouting() + { + return routingEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getSmoothness() + { + return smoothnessEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getJumpLinkStatus() + { + return jumpLinkStatusEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getJumpLinkType() + { + return jumpLinkTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getAlignment() + { + return alignmentEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getSortingDirection() + { + return sortingDirectionEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getMeasurementUnit() + { + return measurementUnitEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getTextAlignment() + { + return textAlignmentEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getLineType() + { + return lineTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getArrowType() + { + return arrowTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getGradientStyle() + { + return gradientStyleEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getRelativeBendpointList() + { + return relativeBendpointListEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getFilterKeyList() + { + return filterKeyListEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getSortKeyMap() + { + return sortKeyMapEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getGradientData() + { + return gradientDataEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotationFactory getNotationFactory() + { + return (NotationFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() + { + if (isCreated) + { + return; + } + isCreated = true; + + // Create classes and their features + edgeEClass = createEClass(EDGE); + createEReference(edgeEClass, EDGE__SOURCE); + createEReference(edgeEClass, EDGE__TARGET); + createEReference(edgeEClass, EDGE__BENDPOINTS); + createEReference(edgeEClass, EDGE__SOURCE_ANCHOR); + createEReference(edgeEClass, EDGE__TARGET_ANCHOR); + + nodeEClass = createEClass(NODE); + createEReference(nodeEClass, NODE__LAYOUT_CONSTRAINT); + + styleEClass = createEClass(STYLE); + + fillStyleEClass = createEClass(FILL_STYLE); + createEAttribute(fillStyleEClass, FILL_STYLE__FILL_COLOR); + createEAttribute(fillStyleEClass, FILL_STYLE__TRANSPARENCY); + createEAttribute(fillStyleEClass, FILL_STYLE__GRADIENT); + + lineStyleEClass = createEClass(LINE_STYLE); + createEAttribute(lineStyleEClass, LINE_STYLE__LINE_COLOR); + createEAttribute(lineStyleEClass, LINE_STYLE__LINE_WIDTH); + + fontStyleEClass = createEClass(FONT_STYLE); + createEAttribute(fontStyleEClass, FONT_STYLE__FONT_COLOR); + createEAttribute(fontStyleEClass, FONT_STYLE__FONT_NAME); + createEAttribute(fontStyleEClass, FONT_STYLE__FONT_HEIGHT); + createEAttribute(fontStyleEClass, FONT_STYLE__BOLD); + createEAttribute(fontStyleEClass, FONT_STYLE__ITALIC); + createEAttribute(fontStyleEClass, FONT_STYLE__UNDERLINE); + createEAttribute(fontStyleEClass, FONT_STYLE__STRIKE_THROUGH); + + titleStyleEClass = createEClass(TITLE_STYLE); + createEAttribute(titleStyleEClass, TITLE_STYLE__SHOW_TITLE); + + sortingStyleEClass = createEClass(SORTING_STYLE); + createEAttribute(sortingStyleEClass, SORTING_STYLE__SORTING); + createEAttribute(sortingStyleEClass, SORTING_STYLE__SORTING_KEYS); + createEReference(sortingStyleEClass, SORTING_STYLE__SORTED_OBJECTS); + + descriptionStyleEClass = createEClass(DESCRIPTION_STYLE); + createEAttribute(descriptionStyleEClass, DESCRIPTION_STYLE__DESCRIPTION); + + layoutConstraintEClass = createEClass(LAYOUT_CONSTRAINT); + + sizeEClass = createEClass(SIZE); + createEAttribute(sizeEClass, SIZE__WIDTH); + createEAttribute(sizeEClass, SIZE__HEIGHT); + + locationEClass = createEClass(LOCATION); + createEAttribute(locationEClass, LOCATION__X); + createEAttribute(locationEClass, LOCATION__Y); + + boundsEClass = createEClass(BOUNDS); + + ratioEClass = createEClass(RATIO); + createEAttribute(ratioEClass, RATIO__VALUE); + + anchorEClass = createEClass(ANCHOR); + + bendpointsEClass = createEClass(BENDPOINTS); + + identityAnchorEClass = createEClass(IDENTITY_ANCHOR); + createEAttribute(identityAnchorEClass, IDENTITY_ANCHOR__ID); + + routingStyleEClass = createEClass(ROUTING_STYLE); + createEAttribute(routingStyleEClass, ROUTING_STYLE__ROUTING); + createEAttribute(routingStyleEClass, ROUTING_STYLE__SMOOTHNESS); + createEAttribute(routingStyleEClass, ROUTING_STYLE__AVOID_OBSTRUCTIONS); + createEAttribute(routingStyleEClass, ROUTING_STYLE__CLOSEST_DISTANCE); + createEAttribute(routingStyleEClass, ROUTING_STYLE__JUMP_LINK_STATUS); + createEAttribute(routingStyleEClass, ROUTING_STYLE__JUMP_LINK_TYPE); + createEAttribute(routingStyleEClass, ROUTING_STYLE__JUMP_LINKS_REVERSE); + + viewEClass = createEClass(VIEW); + createEAttribute(viewEClass, VIEW__VISIBLE); + createEAttribute(viewEClass, VIEW__TYPE); + createEAttribute(viewEClass, VIEW__MUTABLE); + createEReference(viewEClass, VIEW__SOURCE_EDGES); + createEReference(viewEClass, VIEW__TARGET_EDGES); + createEReference(viewEClass, VIEW__PERSISTED_CHILDREN); + createEReference(viewEClass, VIEW__STYLES); + createEReference(viewEClass, VIEW__ELEMENT); + createEReference(viewEClass, VIEW__DIAGRAM); + createEReference(viewEClass, VIEW__TRANSIENT_CHILDREN); + + relativeBendpointsEClass = createEClass(RELATIVE_BENDPOINTS); + createEAttribute(relativeBendpointsEClass, RELATIVE_BENDPOINTS__POINTS); + + diagramEClass = createEClass(DIAGRAM); + createEAttribute(diagramEClass, DIAGRAM__NAME); + createEAttribute(diagramEClass, DIAGRAM__MEASUREMENT_UNIT); + createEReference(diagramEClass, DIAGRAM__PERSISTED_EDGES); + createEReference(diagramEClass, DIAGRAM__TRANSIENT_EDGES); + + imageEClass = createEClass(IMAGE); + createEAttribute(imageEClass, IMAGE__DATA); + + canonicalStyleEClass = createEClass(CANONICAL_STYLE); + createEAttribute(canonicalStyleEClass, CANONICAL_STYLE__CANONICAL); + + shapeStyleEClass = createEClass(SHAPE_STYLE); + + connectorStyleEClass = createEClass(CONNECTOR_STYLE); + + pageStyleEClass = createEClass(PAGE_STYLE); + createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_X); + createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_Y); + createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_WIDTH); + createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_HEIGHT); + + drawerStyleEClass = createEClass(DRAWER_STYLE); + createEAttribute(drawerStyleEClass, DRAWER_STYLE__COLLAPSED); + + guideStyleEClass = createEClass(GUIDE_STYLE); + createEReference(guideStyleEClass, GUIDE_STYLE__HORIZONTAL_GUIDES); + createEReference(guideStyleEClass, GUIDE_STYLE__VERTICAL_GUIDES); + + guideEClass = createEClass(GUIDE); + createEAttribute(guideEClass, GUIDE__POSITION); + createEReference(guideEClass, GUIDE__NODE_MAP); + + nodeEntryEClass = createEClass(NODE_ENTRY); + createEAttribute(nodeEntryEClass, NODE_ENTRY__VALUE); + createEReference(nodeEntryEClass, NODE_ENTRY__KEY); + + filteringStyleEClass = createEClass(FILTERING_STYLE); + createEAttribute(filteringStyleEClass, FILTERING_STYLE__FILTERING); + createEAttribute(filteringStyleEClass, FILTERING_STYLE__FILTERING_KEYS); + createEReference(filteringStyleEClass, FILTERING_STYLE__FILTERED_OBJECTS); + + diagramStyleEClass = createEClass(DIAGRAM_STYLE); + + imageStyleEClass = createEClass(IMAGE_STYLE); + createEAttribute(imageStyleEClass, IMAGE_STYLE__ANTI_ALIAS); + createEAttribute(imageStyleEClass, IMAGE_STYLE__MAINTAIN_ASPECT_RATIO); + createEReference(imageStyleEClass, IMAGE_STYLE__CROP_BOUND); + + imageBufferStyleEClass = createEClass(IMAGE_BUFFER_STYLE); + createEReference(imageBufferStyleEClass, IMAGE_BUFFER_STYLE__IMAGE_BUFFER); + + propertiesSetStyleEClass = createEClass(PROPERTIES_SET_STYLE); + createEReference(propertiesSetStyleEClass, PROPERTIES_SET_STYLE__PROPERTIES_MAP); + + stringToPropertyValueMapEntryEClass = createEClass(STRING_TO_PROPERTY_VALUE_MAP_ENTRY); + createEAttribute(stringToPropertyValueMapEntryEClass, STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY); + createEReference(stringToPropertyValueMapEntryEClass, STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE); + + propertyValueEClass = createEClass(PROPERTY_VALUE); + createEAttribute(propertyValueEClass, PROPERTY_VALUE__RAW_VALUE); + createEReference(propertyValueEClass, PROPERTY_VALUE__INSTANCE_TYPE); + + singleValueStyleEClass = createEClass(SINGLE_VALUE_STYLE); + createEAttribute(singleValueStyleEClass, SINGLE_VALUE_STYLE__RAW_VALUE); + + listValueStyleEClass = createEClass(LIST_VALUE_STYLE); + createEAttribute(listValueStyleEClass, LIST_VALUE_STYLE__RAW_VALUES_LIST); + + namedStyleEClass = createEClass(NAMED_STYLE); + createEAttribute(namedStyleEClass, NAMED_STYLE__NAME); + + stringObjectConverterEClass = createEClass(STRING_OBJECT_CONVERTER); + + dataTypeStyleEClass = createEClass(DATA_TYPE_STYLE); + createEReference(dataTypeStyleEClass, DATA_TYPE_STYLE__INSTANCE_TYPE); + + intValueStyleEClass = createEClass(INT_VALUE_STYLE); + createEAttribute(intValueStyleEClass, INT_VALUE_STYLE__INT_VALUE); + + intListValueStyleEClass = createEClass(INT_LIST_VALUE_STYLE); + createEAttribute(intListValueStyleEClass, INT_LIST_VALUE_STYLE__INT_LIST_VALUE); + + booleanValueStyleEClass = createEClass(BOOLEAN_VALUE_STYLE); + createEAttribute(booleanValueStyleEClass, BOOLEAN_VALUE_STYLE__BOOLEAN_VALUE); + + doubleValueStyleEClass = createEClass(DOUBLE_VALUE_STYLE); + createEAttribute(doubleValueStyleEClass, DOUBLE_VALUE_STYLE__DOUBLE_VALUE); + + doubleListValueStyleEClass = createEClass(DOUBLE_LIST_VALUE_STYLE); + createEAttribute(doubleListValueStyleEClass, DOUBLE_LIST_VALUE_STYLE__DOUBLE_LIST_VALUE); + + stringValueStyleEClass = createEClass(STRING_VALUE_STYLE); + createEAttribute(stringValueStyleEClass, STRING_VALUE_STYLE__STRING_VALUE); + + stringListValueStyleEClass = createEClass(STRING_LIST_VALUE_STYLE); + createEAttribute(stringListValueStyleEClass, STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE); + + eObjectValueStyleEClass = createEClass(EOBJECT_VALUE_STYLE); + createEReference(eObjectValueStyleEClass, EOBJECT_VALUE_STYLE__EOBJECT_VALUE); + + eObjectListValueStyleEClass = createEClass(EOBJECT_LIST_VALUE_STYLE); + createEReference(eObjectListValueStyleEClass, EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE); + + byteArrayValueStyleEClass = createEClass(BYTE_ARRAY_VALUE_STYLE); + createEAttribute(byteArrayValueStyleEClass, BYTE_ARRAY_VALUE_STYLE__BYTE_ARRAY_VALUE); + + booleanListValueStyleEClass = createEClass(BOOLEAN_LIST_VALUE_STYLE); + createEAttribute(booleanListValueStyleEClass, BOOLEAN_LIST_VALUE_STYLE__BOOLEAN_LIST_VALUE); + + hintedDiagramLinkStyleEClass = createEClass(HINTED_DIAGRAM_LINK_STYLE); + createEAttribute(hintedDiagramLinkStyleEClass, HINTED_DIAGRAM_LINK_STYLE__HINT); + + diagramLinkStyleEClass = createEClass(DIAGRAM_LINK_STYLE); + createEReference(diagramLinkStyleEClass, DIAGRAM_LINK_STYLE__DIAGRAM_LINK); + + multiDiagramLinkStyleEClass = createEClass(MULTI_DIAGRAM_LINK_STYLE); + createEReference(multiDiagramLinkStyleEClass, MULTI_DIAGRAM_LINK_STYLE__DIAGRAM_LINKS); + + textStyleEClass = createEClass(TEXT_STYLE); + createEAttribute(textStyleEClass, TEXT_STYLE__TEXT_ALIGNMENT); + + lineTypeStyleEClass = createEClass(LINE_TYPE_STYLE); + createEAttribute(lineTypeStyleEClass, LINE_TYPE_STYLE__LINE_TYPE); + + arrowStyleEClass = createEClass(ARROW_STYLE); + createEAttribute(arrowStyleEClass, ARROW_STYLE__ARROW_SOURCE); + createEAttribute(arrowStyleEClass, ARROW_STYLE__ARROW_TARGET); + + shapeEClass = createEClass(SHAPE); + + compartmentEClass = createEClass(COMPARTMENT); + + listCompartmentEClass = createEClass(LIST_COMPARTMENT); + + connectorEClass = createEClass(CONNECTOR); + + standardDiagramEClass = createEClass(STANDARD_DIAGRAM); + + decorationNodeEClass = createEClass(DECORATION_NODE); + + basicDecorationNodeEClass = createEClass(BASIC_DECORATION_NODE); + + basicCompartmentEClass = createEClass(BASIC_COMPARTMENT); + + basicSemanticCompartmentEClass = createEClass(BASIC_SEMANTIC_COMPARTMENT); + + semanticListCompartmentEClass = createEClass(SEMANTIC_LIST_COMPARTMENT); + + roundedCornersStyleEClass = createEClass(ROUNDED_CORNERS_STYLE); + createEAttribute(roundedCornersStyleEClass, ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS); + + // Create enums + sortingEEnum = createEEnum(SORTING); + filteringEEnum = createEEnum(FILTERING); + routingEEnum = createEEnum(ROUTING); + smoothnessEEnum = createEEnum(SMOOTHNESS); + jumpLinkStatusEEnum = createEEnum(JUMP_LINK_STATUS); + jumpLinkTypeEEnum = createEEnum(JUMP_LINK_TYPE); + alignmentEEnum = createEEnum(ALIGNMENT); + sortingDirectionEEnum = createEEnum(SORTING_DIRECTION); + measurementUnitEEnum = createEEnum(MEASUREMENT_UNIT); + textAlignmentEEnum = createEEnum(TEXT_ALIGNMENT); + lineTypeEEnum = createEEnum(LINE_TYPE); + arrowTypeEEnum = createEEnum(ARROW_TYPE); + gradientStyleEEnum = createEEnum(GRADIENT_STYLE); + + // Create data types + relativeBendpointListEDataType = createEDataType(RELATIVE_BENDPOINT_LIST); + filterKeyListEDataType = createEDataType(FILTER_KEY_LIST); + sortKeyMapEDataType = createEDataType(SORT_KEY_MAP); + gradientDataEDataType = createEDataType(GRADIENT_DATA); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) + { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Add supertypes to classes + edgeEClass.getESuperTypes().add(getView()); + nodeEClass.getESuperTypes().add(getView()); + fillStyleEClass.getESuperTypes().add(getStyle()); + lineStyleEClass.getESuperTypes().add(getStyle()); + fontStyleEClass.getESuperTypes().add(getStyle()); + titleStyleEClass.getESuperTypes().add(getStyle()); + sortingStyleEClass.getESuperTypes().add(getStyle()); + descriptionStyleEClass.getESuperTypes().add(getStyle()); + sizeEClass.getESuperTypes().add(getLayoutConstraint()); + locationEClass.getESuperTypes().add(getLayoutConstraint()); + boundsEClass.getESuperTypes().add(getLocation()); + boundsEClass.getESuperTypes().add(getSize()); + ratioEClass.getESuperTypes().add(getLayoutConstraint()); + identityAnchorEClass.getESuperTypes().add(getAnchor()); + routingStyleEClass.getESuperTypes().add(getRoundedCornersStyle()); + viewEClass.getESuperTypes().add(theEcorePackage.getEModelElement()); + relativeBendpointsEClass.getESuperTypes().add(getBendpoints()); + diagramEClass.getESuperTypes().add(getView()); + canonicalStyleEClass.getESuperTypes().add(getStyle()); + shapeStyleEClass.getESuperTypes().add(getFontStyle()); + shapeStyleEClass.getESuperTypes().add(getDescriptionStyle()); + shapeStyleEClass.getESuperTypes().add(getFillStyle()); + shapeStyleEClass.getESuperTypes().add(getLineStyle()); + shapeStyleEClass.getESuperTypes().add(getRoundedCornersStyle()); + connectorStyleEClass.getESuperTypes().add(getRoutingStyle()); + connectorStyleEClass.getESuperTypes().add(getLineStyle()); + pageStyleEClass.getESuperTypes().add(getStyle()); + drawerStyleEClass.getESuperTypes().add(getStyle()); + guideStyleEClass.getESuperTypes().add(getStyle()); + filteringStyleEClass.getESuperTypes().add(getStyle()); + diagramStyleEClass.getESuperTypes().add(getPageStyle()); + diagramStyleEClass.getESuperTypes().add(getGuideStyle()); + diagramStyleEClass.getESuperTypes().add(getDescriptionStyle()); + imageStyleEClass.getESuperTypes().add(getStyle()); + imageBufferStyleEClass.getESuperTypes().add(getImageStyle()); + propertiesSetStyleEClass.getESuperTypes().add(getNamedStyle()); + propertyValueEClass.getESuperTypes().add(getStringObjectConverter()); + singleValueStyleEClass.getESuperTypes().add(getDataTypeStyle()); + listValueStyleEClass.getESuperTypes().add(getDataTypeStyle()); + namedStyleEClass.getESuperTypes().add(getStyle()); + dataTypeStyleEClass.getESuperTypes().add(getNamedStyle()); + dataTypeStyleEClass.getESuperTypes().add(getStringObjectConverter()); + intValueStyleEClass.getESuperTypes().add(getNamedStyle()); + intListValueStyleEClass.getESuperTypes().add(getNamedStyle()); + booleanValueStyleEClass.getESuperTypes().add(getNamedStyle()); + doubleValueStyleEClass.getESuperTypes().add(getNamedStyle()); + doubleListValueStyleEClass.getESuperTypes().add(getNamedStyle()); + stringValueStyleEClass.getESuperTypes().add(getNamedStyle()); + stringListValueStyleEClass.getESuperTypes().add(getNamedStyle()); + eObjectValueStyleEClass.getESuperTypes().add(getNamedStyle()); + eObjectListValueStyleEClass.getESuperTypes().add(getNamedStyle()); + byteArrayValueStyleEClass.getESuperTypes().add(getNamedStyle()); + booleanListValueStyleEClass.getESuperTypes().add(getNamedStyle()); + hintedDiagramLinkStyleEClass.getESuperTypes().add(getDiagramLinkStyle()); + hintedDiagramLinkStyleEClass.getESuperTypes().add(getStyle()); + diagramLinkStyleEClass.getESuperTypes().add(getStyle()); + multiDiagramLinkStyleEClass.getESuperTypes().add(getStyle()); + textStyleEClass.getESuperTypes().add(getStyle()); + lineTypeStyleEClass.getESuperTypes().add(getStyle()); + arrowStyleEClass.getESuperTypes().add(getStyle()); + shapeEClass.getESuperTypes().add(getNode()); + shapeEClass.getESuperTypes().add(getShapeStyle()); + compartmentEClass.getESuperTypes().add(getBasicCompartment()); + compartmentEClass.getESuperTypes().add(getCanonicalStyle()); + compartmentEClass.getESuperTypes().add(getTitleStyle()); + listCompartmentEClass.getESuperTypes().add(getBasicCompartment()); + listCompartmentEClass.getESuperTypes().add(getSortingStyle()); + listCompartmentEClass.getESuperTypes().add(getFilteringStyle()); + listCompartmentEClass.getESuperTypes().add(getTitleStyle()); + connectorEClass.getESuperTypes().add(getEdge()); + connectorEClass.getESuperTypes().add(getConnectorStyle()); + standardDiagramEClass.getESuperTypes().add(getDiagram()); + standardDiagramEClass.getESuperTypes().add(getDiagramStyle()); + decorationNodeEClass.getESuperTypes().add(getBasicDecorationNode()); + basicDecorationNodeEClass.getESuperTypes().add(getNode()); + basicCompartmentEClass.getESuperTypes().add(getDecorationNode()); + basicCompartmentEClass.getESuperTypes().add(getDrawerStyle()); + basicSemanticCompartmentEClass.getESuperTypes().add(getBasicDecorationNode()); + basicSemanticCompartmentEClass.getESuperTypes().add(getDrawerStyle()); + semanticListCompartmentEClass.getESuperTypes().add(getBasicSemanticCompartment()); + semanticListCompartmentEClass.getESuperTypes().add(getSortingStyle()); + semanticListCompartmentEClass.getESuperTypes().add(getFilteringStyle()); + semanticListCompartmentEClass.getESuperTypes().add(getTitleStyle()); + roundedCornersStyleEClass.getESuperTypes().add(getStyle()); + + // Initialize classes and features; add operations and parameters + initEClass(edgeEClass, Edge.class, "Edge", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getEdge_Source(), getView(), getView_SourceEdges(), "source", null, 1, 1, Edge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getEdge_Target(), getView(), getView_TargetEdges(), "target", null, 1, 1, Edge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getEdge_Bendpoints(), getBendpoints(), null, "bendpoints", null, 0, 1, Edge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getEdge_SourceAnchor(), getAnchor(), null, "sourceAnchor", null, 0, 1, Edge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getEdge_TargetAnchor(), getAnchor(), null, "targetAnchor", null, 0, 1, Edge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + EOperation op = addEOperation(edgeEClass, getBendpoints(), "createBendpoints", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + op = addEOperation(edgeEClass, getAnchor(), "createSourceAnchor", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + op = addEOperation(edgeEClass, getAnchor(), "createTargetAnchor", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getNode_LayoutConstraint(), getLayoutConstraint(), null, "layoutConstraint", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + op = addEOperation(nodeEClass, getLayoutConstraint(), "createLayoutConstraint", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + initEClass(styleEClass, Style.class, "Style", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(fillStyleEClass, FillStyle.class, "FillStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getFillStyle_FillColor(), ecorePackage.getEInt(), "fillColor", "16777215", 0, 1, FillStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFillStyle_Transparency(), ecorePackage.getEInt(), "transparency", "-1", 0, 1, FillStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFillStyle_Gradient(), getGradientData(), "gradient", null, 0, 1, FillStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(lineStyleEClass, LineStyle.class, "LineStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getLineStyle_LineColor(), ecorePackage.getEInt(), "lineColor", "11579568", 0, 1, LineStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLineStyle_LineWidth(), theEcorePackage.getEInt(), "lineWidth", "-1", 0, 1, LineStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(fontStyleEClass, FontStyle.class, "FontStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getFontStyle_FontColor(), ecorePackage.getEInt(), "fontColor", "0", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFontStyle_FontName(), ecorePackage.getEString(), "fontName", "Tahoma", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFontStyle_FontHeight(), ecorePackage.getEInt(), "fontHeight", "9", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFontStyle_Bold(), ecorePackage.getEBoolean(), "bold", "false", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFontStyle_Italic(), ecorePackage.getEBoolean(), "italic", "false", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFontStyle_Underline(), ecorePackage.getEBoolean(), "underline", "false", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFontStyle_StrikeThrough(), ecorePackage.getEBoolean(), "strikeThrough", "false", 0, 1, FontStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(titleStyleEClass, TitleStyle.class, "TitleStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getTitleStyle_ShowTitle(), ecorePackage.getEBoolean(), "showTitle", "false", 0, 1, TitleStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(sortingStyleEClass, SortingStyle.class, "SortingStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getSortingStyle_Sorting(), getSorting(), "sorting", "None", 0, 1, SortingStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSortingStyle_SortingKeys(), getSortKeyMap(), "sortingKeys", null, 0, 1, SortingStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getSortingStyle_SortedObjects(), theEcorePackage.getEObject(), null, "sortedObjects", null, 0, -1, SortingStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(descriptionStyleEClass, DescriptionStyle.class, "DescriptionStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getDescriptionStyle_Description(), ecorePackage.getEString(), "description", "", 0, 1, DescriptionStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(layoutConstraintEClass, LayoutConstraint.class, "LayoutConstraint", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(sizeEClass, Size.class, "Size", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getSize_Width(), ecorePackage.getEInt(), "width", "-1", 0, 1, Size.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, //$NON-NLS-1$ //$NON-NLS-2$ + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSize_Height(), ecorePackage.getEInt(), "height", "-1", 0, 1, Size.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(locationEClass, Location.class, "Location", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getLocation_X(), ecorePackage.getEInt(), "x", "0", 0, 1, Location.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, //$NON-NLS-1$ //$NON-NLS-2$ + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLocation_Y(), ecorePackage.getEInt(), "y", "0", 0, 1, Location.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, //$NON-NLS-1$ //$NON-NLS-2$ + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(boundsEClass, Bounds.class, "Bounds", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(ratioEClass, Ratio.class, "Ratio", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getRatio_Value(), ecorePackage.getEDouble(), "value", "-1", 0, 1, Ratio.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(anchorEClass, Anchor.class, "Anchor", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(bendpointsEClass, Bendpoints.class, "Bendpoints", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(identityAnchorEClass, IdentityAnchor.class, "IdentityAnchor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIdentityAnchor_Id(), ecorePackage.getEString(), "id", "anchor", 0, 1, IdentityAnchor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(routingStyleEClass, RoutingStyle.class, "RoutingStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getRoutingStyle_Routing(), getRouting(), "routing", "Manual", 0, 1, RoutingStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRoutingStyle_Smoothness(), getSmoothness(), "smoothness", "None", 0, 1, RoutingStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRoutingStyle_AvoidObstructions(), ecorePackage.getEBoolean(), "avoidObstructions", "false", 0, 1, RoutingStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRoutingStyle_ClosestDistance(), ecorePackage.getEBoolean(), "closestDistance", "false", 0, 1, RoutingStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRoutingStyle_JumpLinkStatus(), getJumpLinkStatus(), "jumpLinkStatus", "None", 0, 1, RoutingStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRoutingStyle_JumpLinkType(), getJumpLinkType(), "jumpLinkType", "Semicircle", 0, 1, RoutingStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRoutingStyle_JumpLinksReverse(), ecorePackage.getEBoolean(), "jumpLinksReverse", "false", 0, 1, RoutingStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(viewEClass, View.class, "View", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getView_Visible(), ecorePackage.getEBoolean(), "visible", "true", 0, 1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getView_Type(), ecorePackage.getEString(), "type", "", 0, 1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, //$NON-NLS-1$ //$NON-NLS-2$ + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getView_Mutable(), ecorePackage.getEBoolean(), "mutable", "false", 0, 1, View.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_SourceEdges(), getEdge(), getEdge_Source(), "sourceEdges", null, 0, -1, View.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_TargetEdges(), getEdge(), getEdge_Target(), "targetEdges", null, 0, -1, View.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_PersistedChildren(), getNode(), null, "children", null, 0, -1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getView_PersistedChildren(), getNode(), null, "children", null, 0, -1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_Styles(), getStyle(), null, "styles", null, 0, -1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_Element(), theEcorePackage.getEObject(), null, "element", null, 0, 1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_Diagram(), getDiagram(), null, "diagram", null, 1, 1, View.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, //$NON-NLS-1$ + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getView_TransientChildren(), getNode(), null, "transientChildren", null, 0, -1, View.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + op = addEOperation(viewEClass, getStyle(), "getStyle", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + op = addEOperation(viewEClass, getNode(), "createChild", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + op = addEOperation(viewEClass, getStyle(), "createStyle", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + op = addEOperation(viewEClass, getNamedStyle(), "getNamedStyle", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1); //$NON-NLS-1$ + + initEClass(relativeBendpointsEClass, RelativeBendpoints.class, "RelativeBendpoints", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getRelativeBendpoints_Points(), getRelativeBendpointList(), "points", null, 0, 1, RelativeBendpoints.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(diagramEClass, Diagram.class, "Diagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getDiagram_Name(), ecorePackage.getEString(), "name", "", 0, 1, Diagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagram_MeasurementUnit(), getMeasurementUnit(), "measurementUnit", "Himetric", 0, 1, Diagram.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getDiagram_PersistedEdges(), getEdge(), null, "edges", null, 0, -1, Diagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getDiagram_TransientEdges(), getEdge(), null, "TransientEdges", null, 0, -1, Diagram.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + op = addEOperation(diagramEClass, getEdge(), "createEdge", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEClass(), "eClass", 0, 1); //$NON-NLS-1$ + + initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getImage_Data(), theEcorePackage.getEByteArray(), "data", null, 0, 1, Image.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(canonicalStyleEClass, CanonicalStyle.class, "CanonicalStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getCanonicalStyle_Canonical(), ecorePackage.getEBoolean(), "canonical", "true", 0, 1, CanonicalStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(shapeStyleEClass, ShapeStyle.class, "ShapeStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(connectorStyleEClass, ConnectorStyle.class, "ConnectorStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(pageStyleEClass, PageStyle.class, "PageStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getPageStyle_PageX(), ecorePackage.getEInt(), "pageX", "0", 0, 1, PageStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPageStyle_PageY(), ecorePackage.getEInt(), "pageY", "0", 0, 1, PageStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPageStyle_PageWidth(), ecorePackage.getEInt(), "pageWidth", "100", 0, 1, PageStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPageStyle_PageHeight(), ecorePackage.getEInt(), "pageHeight", "100", 0, 1, PageStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(drawerStyleEClass, DrawerStyle.class, "DrawerStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getDrawerStyle_Collapsed(), ecorePackage.getEBoolean(), "collapsed", "false", 0, 1, DrawerStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guideStyleEClass, GuideStyle.class, "GuideStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getGuideStyle_HorizontalGuides(), getGuide(), null, "horizontalGuides", null, 0, -1, GuideStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getGuideStyle_VerticalGuides(), getGuide(), null, "verticalGuides", null, 0, -1, GuideStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guideEClass, Guide.class, "Guide", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getGuide_Position(), ecorePackage.getEInt(), "position", "0", 0, 1, Guide.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getGuide_NodeMap(), getNodeEntry(), null, "nodeMap", null, 0, -1, Guide.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$ + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(nodeEntryEClass, Map.Entry.class, "NodeEntry", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getNodeEntry_Value(), getAlignment(), "value", "Center", 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getNodeEntry_Key(), getNode(), null, "key", null, 1, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, //$NON-NLS-1$ + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(filteringStyleEClass, FilteringStyle.class, "FilteringStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getFilteringStyle_Filtering(), getFiltering(), "filtering", "None", 0, 1, FilteringStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFilteringStyle_FilteringKeys(), getFilterKeyList(), "filteringKeys", null, 0, 1, FilteringStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getFilteringStyle_FilteredObjects(), theEcorePackage.getEObject(), null, "filteredObjects", null, 0, -1, FilteringStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(diagramStyleEClass, DiagramStyle.class, "DiagramStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(imageStyleEClass, ImageStyle.class, "ImageStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getImageStyle_AntiAlias(), ecorePackage.getEBooleanObject(), "antiAlias", "true", 0, 1, ImageStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ //$NON-NLS-2$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getImageStyle_MaintainAspectRatio(), ecorePackage.getEBooleanObject(), "maintainAspectRatio", "true", 0, 1, ImageStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getImageStyle_CropBound(), getBounds(), null, "cropBound", null, 1, 1, ImageStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(imageBufferStyleEClass, ImageBufferStyle.class, "ImageBufferStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getImageBufferStyle_ImageBuffer(), getImage(), null, "imageBuffer", null, 1, 1, ImageBufferStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(propertiesSetStyleEClass, PropertiesSetStyle.class, "PropertiesSetStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getPropertiesSetStyle_PropertiesMap(), getStringToPropertyValueMapEntry(), null, "propertiesMap", null, 0, -1, PropertiesSetStyle.class, //$NON-NLS-1$ + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + op = addEOperation(propertiesSetStyleEClass, theEcorePackage.getEJavaObject(), "getProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "propertyName", 0, 1); //$NON-NLS-1$ + + op = addEOperation(propertiesSetStyleEClass, theEcorePackage.getEBoolean(), "setProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "propertyName", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEJavaObject(), "newValue", 0, 1); //$NON-NLS-1$ + + op = addEOperation(propertiesSetStyleEClass, theEcorePackage.getEBoolean(), "createProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "propertyName", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEDataType(), "instanceType", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEJavaObject(), "initialValue", 0, 1); //$NON-NLS-1$ + + op = addEOperation(propertiesSetStyleEClass, theEcorePackage.getEBoolean(), "removeProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "propertyName", 0, 1); //$NON-NLS-1$ + + op = addEOperation(propertiesSetStyleEClass, theEcorePackage.getEBoolean(), "hasProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "propertyName", 0, 1); //$NON-NLS-1$ + + op = addEOperation(propertiesSetStyleEClass, theEcorePackage.getEBoolean(), "createProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "propertyName", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "initialValue", 0, 1); //$NON-NLS-1$ + + initEClass(stringToPropertyValueMapEntryEClass, Map.Entry.class, "StringToPropertyValueMapEntry", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ + !IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringToPropertyValueMapEntry_Key(), theEcorePackage.getEString(), "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getStringToPropertyValueMapEntry_Value(), getPropertyValue(), null, "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(propertyValueEClass, PropertyValue.class, "PropertyValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getPropertyValue_RawValue(), ecorePackage.getEString(), "rawValue", null, 0, 1, PropertyValue.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEReference(getPropertyValue_InstanceType(), theEcorePackage.getEDataType(), null, "instanceType", null, 0, 1, PropertyValue.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + addEOperation(propertyValueEClass, theEcorePackage.getEJavaObject(), "getValue", 0, 1); //$NON-NLS-1$ + + op = addEOperation(propertyValueEClass, null, "setValue"); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEJavaObject(), "newValue", 0, 1); //$NON-NLS-1$ + + initEClass(singleValueStyleEClass, SingleValueStyle.class, "SingleValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getSingleValueStyle_RawValue(), ecorePackage.getEString(), "rawValue", null, 0, 1, SingleValueStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + addEOperation(singleValueStyleEClass, theEcorePackage.getEJavaObject(), "getValue", 0, 1); //$NON-NLS-1$ + + op = addEOperation(singleValueStyleEClass, null, "setValue"); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEJavaObject(), "newValue", 0, 1); //$NON-NLS-1$ + + initEClass(listValueStyleEClass, ListValueStyle.class, "ListValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getListValueStyle_RawValuesList(), theEcorePackage.getEString(), "rawValuesList", null, 0, -1, ListValueStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(namedStyleEClass, NamedStyle.class, "NamedStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getNamedStyle_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringObjectConverterEClass, StringObjectConverter.class, "StringObjectConverter", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + op = addEOperation(stringObjectConverterEClass, theEcorePackage.getEString(), "getStringFromObject", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEJavaObject(), "objectValue", 0, 1); //$NON-NLS-1$ + + op = addEOperation(stringObjectConverterEClass, theEcorePackage.getEJavaObject(), "getObjectFromString", 0, 1); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "stringValue", 0, 1); //$NON-NLS-1$ + + initEClass(dataTypeStyleEClass, DataTypeStyle.class, "DataTypeStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getDataTypeStyle_InstanceType(), theEcorePackage.getEDataType(), null, "instanceType", null, 0, 1, DataTypeStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(intValueStyleEClass, IntValueStyle.class, "IntValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIntValueStyle_IntValue(), theEcorePackage.getEInt(), "intValue", null, 0, 1, IntValueStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(intListValueStyleEClass, IntListValueStyle.class, "IntListValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIntListValueStyle_IntListValue(), theEcorePackage.getEInt(), "intListValue", null, 0, -1, IntListValueStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(booleanValueStyleEClass, BooleanValueStyle.class, "BooleanValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getBooleanValueStyle_BooleanValue(), theEcorePackage.getEBoolean(), "booleanValue", null, 0, 1, BooleanValueStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(doubleValueStyleEClass, DoubleValueStyle.class, "DoubleValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getDoubleValueStyle_DoubleValue(), theEcorePackage.getEDouble(), "doubleValue", null, 0, 1, DoubleValueStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(doubleListValueStyleEClass, DoubleListValueStyle.class, "DoubleListValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getDoubleListValueStyle_DoubleListValue(), theEcorePackage.getEDoubleObject(), "doubleListValue", null, 0, -1, DoubleListValueStyle.class, //$NON-NLS-1$ + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringValueStyleEClass, StringValueStyle.class, "StringValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getStringValueStyle_StringValue(), theEcorePackage.getEString(), "stringValue", null, 0, 1, StringValueStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringListValueStyleEClass, StringListValueStyle.class, "StringListValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getStringListValueStyle_StringListValue(), theEcorePackage.getEString(), "stringListValue", null, 0, -1, StringListValueStyle.class, //$NON-NLS-1$ + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eObjectValueStyleEClass, EObjectValueStyle.class, "EObjectValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getEObjectValueStyle_EObjectValue(), theEcorePackage.getEObject(), null, "eObjectValue", null, 0, 1, EObjectValueStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eObjectListValueStyleEClass, EObjectListValueStyle.class, "EObjectListValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getEObjectListValueStyle_EObjectListValue(), theEcorePackage.getEObject(), null, "eObjectListValue", null, 0, -1, //$NON-NLS-1$ + EObjectListValueStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(byteArrayValueStyleEClass, ByteArrayValueStyle.class, "ByteArrayValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getByteArrayValueStyle_ByteArrayValue(), theEcorePackage.getEByteArray(), "byteArrayValue", null, 0, 1, ByteArrayValueStyle.class, //$NON-NLS-1$ + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(booleanListValueStyleEClass, BooleanListValueStyle.class, "BooleanListValueStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getBooleanListValueStyle_BooleanListValue(), theEcorePackage.getEBooleanObject(), "booleanListValue", null, 0, -1, //$NON-NLS-1$ + BooleanListValueStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(hintedDiagramLinkStyleEClass, HintedDiagramLinkStyle.class, "HintedDiagramLinkStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getHintedDiagramLinkStyle_Hint(), theEcorePackage.getEString(), "hint", null, 0, 1, HintedDiagramLinkStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(diagramLinkStyleEClass, DiagramLinkStyle.class, "DiagramLinkStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getDiagramLinkStyle_DiagramLink(), getDiagram(), null, "diagramLink", null, 0, 1, DiagramLinkStyle.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(multiDiagramLinkStyleEClass, MultiDiagramLinkStyle.class, "MultiDiagramLinkStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEReference(getMultiDiagramLinkStyle_DiagramLinks(), getDiagram(), null, "diagramLinks", null, 0, -1, MultiDiagramLinkStyle.class, !IS_TRANSIENT, //$NON-NLS-1$ + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(textStyleEClass, TextStyle.class, "TextStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getTextStyle_TextAlignment(), getTextAlignment(), "textAlignment", "Left", 0, 1, TextStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(lineTypeStyleEClass, LineTypeStyle.class, "LineTypeStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getLineTypeStyle_LineType(), getLineType(), "lineType", "Solid", 0, 1, LineTypeStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(arrowStyleEClass, ArrowStyle.class, "ArrowStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getArrowStyle_ArrowSource(), getArrowType(), "arrowSource", "None", 0, 1, ArrowStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getArrowStyle_ArrowTarget(), getArrowType(), "arrowTarget", "None", 0, 1, ArrowStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(shapeEClass, Shape.class, "Shape", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(compartmentEClass, Compartment.class, "Compartment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(listCompartmentEClass, ListCompartment.class, "ListCompartment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(connectorEClass, Connector.class, "Connector", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(standardDiagramEClass, StandardDiagram.class, "StandardDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(decorationNodeEClass, DecorationNode.class, "DecorationNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(basicDecorationNodeEClass, BasicDecorationNode.class, "BasicDecorationNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(basicCompartmentEClass, BasicCompartment.class, "BasicCompartment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(basicSemanticCompartmentEClass, BasicSemanticCompartment.class, "BasicSemanticCompartment", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ + IS_GENERATED_INSTANCE_CLASS); + + initEClass(semanticListCompartmentEClass, SemanticListCompartment.class, "SemanticListCompartment", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ + IS_GENERATED_INSTANCE_CLASS); + + initEClass(roundedCornersStyleEClass, RoundedCornersStyle.class, "RoundedCornersStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getRoundedCornersStyle_RoundedBendpointsRadius(), ecorePackage.getEInt(), "roundedBendpointsRadius", "0", 0, 1, RoundedCornersStyle.class, //$NON-NLS-1$ //$NON-NLS-2$ + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(sortingEEnum, Sorting.class, "Sorting"); //$NON-NLS-1$ + addEEnumLiteral(sortingEEnum, Sorting.NONE_LITERAL); + addEEnumLiteral(sortingEEnum, Sorting.MANUAL_LITERAL); + addEEnumLiteral(sortingEEnum, Sorting.AUTOMATIC_LITERAL); + + initEEnum(filteringEEnum, Filtering.class, "Filtering"); //$NON-NLS-1$ + addEEnumLiteral(filteringEEnum, Filtering.NONE_LITERAL); + addEEnumLiteral(filteringEEnum, Filtering.MANUAL_LITERAL); + addEEnumLiteral(filteringEEnum, Filtering.AUTOMATIC_LITERAL); + + initEEnum(routingEEnum, Routing.class, "Routing"); //$NON-NLS-1$ + addEEnumLiteral(routingEEnum, Routing.MANUAL_LITERAL); + addEEnumLiteral(routingEEnum, Routing.RECTILINEAR_LITERAL); + addEEnumLiteral(routingEEnum, Routing.TREE_LITERAL); + + initEEnum(smoothnessEEnum, Smoothness.class, "Smoothness"); //$NON-NLS-1$ + addEEnumLiteral(smoothnessEEnum, Smoothness.NONE_LITERAL); + addEEnumLiteral(smoothnessEEnum, Smoothness.NORMAL_LITERAL); + addEEnumLiteral(smoothnessEEnum, Smoothness.LESS_LITERAL); + addEEnumLiteral(smoothnessEEnum, Smoothness.MORE_LITERAL); + + initEEnum(jumpLinkStatusEEnum, JumpLinkStatus.class, "JumpLinkStatus"); //$NON-NLS-1$ + addEEnumLiteral(jumpLinkStatusEEnum, JumpLinkStatus.NONE_LITERAL); + addEEnumLiteral(jumpLinkStatusEEnum, JumpLinkStatus.ALL_LITERAL); + addEEnumLiteral(jumpLinkStatusEEnum, JumpLinkStatus.BELOW_LITERAL); + addEEnumLiteral(jumpLinkStatusEEnum, JumpLinkStatus.ABOVE_LITERAL); + + initEEnum(jumpLinkTypeEEnum, JumpLinkType.class, "JumpLinkType"); //$NON-NLS-1$ + addEEnumLiteral(jumpLinkTypeEEnum, JumpLinkType.SEMICIRCLE_LITERAL); + addEEnumLiteral(jumpLinkTypeEEnum, JumpLinkType.SQUARE_LITERAL); + addEEnumLiteral(jumpLinkTypeEEnum, JumpLinkType.CHAMFERED_LITERAL); + + initEEnum(alignmentEEnum, Alignment.class, "Alignment"); //$NON-NLS-1$ + addEEnumLiteral(alignmentEEnum, Alignment.LEFT_LITERAL); + addEEnumLiteral(alignmentEEnum, Alignment.RIGHT_LITERAL); + addEEnumLiteral(alignmentEEnum, Alignment.CENTER_LITERAL); + addEEnumLiteral(alignmentEEnum, Alignment.TOP_LITERAL); + addEEnumLiteral(alignmentEEnum, Alignment.BOTTOM_LITERAL); + + initEEnum(sortingDirectionEEnum, SortingDirection.class, "SortingDirection"); //$NON-NLS-1$ + addEEnumLiteral(sortingDirectionEEnum, SortingDirection.ASCENDING_LITERAL); + addEEnumLiteral(sortingDirectionEEnum, SortingDirection.DESCENDING_LITERAL); + + initEEnum(measurementUnitEEnum, MeasurementUnit.class, "MeasurementUnit"); //$NON-NLS-1$ + addEEnumLiteral(measurementUnitEEnum, MeasurementUnit.HIMETRIC_LITERAL); + addEEnumLiteral(measurementUnitEEnum, MeasurementUnit.PIXEL_LITERAL); + + initEEnum(textAlignmentEEnum, TextAlignment.class, "TextAlignment"); //$NON-NLS-1$ + addEEnumLiteral(textAlignmentEEnum, TextAlignment.LEFT_LITERAL); + addEEnumLiteral(textAlignmentEEnum, TextAlignment.RIGHT_LITERAL); + addEEnumLiteral(textAlignmentEEnum, TextAlignment.CENTER_LITERAL); + + initEEnum(lineTypeEEnum, LineType.class, "LineType"); //$NON-NLS-1$ + addEEnumLiteral(lineTypeEEnum, LineType.SOLID_LITERAL); + addEEnumLiteral(lineTypeEEnum, LineType.DASH_LITERAL); + addEEnumLiteral(lineTypeEEnum, LineType.DOT_LITERAL); + addEEnumLiteral(lineTypeEEnum, LineType.DASH_DOT_LITERAL); + addEEnumLiteral(lineTypeEEnum, LineType.DASH_DOT_DOT_LITERAL); + addEEnumLiteral(lineTypeEEnum, LineType.DOUBLE_LITERAL); + + initEEnum(arrowTypeEEnum, ArrowType.class, "ArrowType"); //$NON-NLS-1$ + addEEnumLiteral(arrowTypeEEnum, ArrowType.NONE_LITERAL); + addEEnumLiteral(arrowTypeEEnum, ArrowType.OPEN_ARROW_LITERAL); + addEEnumLiteral(arrowTypeEEnum, ArrowType.SOLID_ARROW_LITERAL); + + initEEnum(gradientStyleEEnum, GradientStyle.class, "GradientStyle"); //$NON-NLS-1$ + addEEnumLiteral(gradientStyleEEnum, GradientStyle.VERTICAL_LITERAL); + addEEnumLiteral(gradientStyleEEnum, GradientStyle.HORIZONTAL_LITERAL); + + // Initialize data types + initEDataType(relativeBendpointListEDataType, List.class, "RelativeBendpointList", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(filterKeyListEDataType, List.class, "FilterKeyList", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(sortKeyMapEDataType, Map.class, "SortKeyMap", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(gradientDataEDataType, GradientData.class, "GradientData", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } + + void createAnnotations() + { + for (Iterator it = getEClassifiers().iterator(); it.hasNext();) + { + EClassifier eClassifier = (EClassifier)it.next(); + String name = eClassifier.getName(); + if (name.equals("Node") || name.indexOf("Style") != -1 || name.equals("Location") || name.equals("Size") || //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + name.indexOf("Anchor") != -1 || name.indexOf("point") != -1 || name.equals("Bounds") || name.indexOf("Edge") != -1 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + || name.indexOf("Constraint") != -1) //$NON-NLS-1$ + { + String source = "foo"; //$NON-NLS-1$ + addAnnotation(eClassifier, source, new String[] { "uuid", "false" //$NON-NLS-1$ //$NON-NLS-2$ + }); + } + } + } + +} // NotationPackageImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PageStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PageStyleImpl.java new file mode 100644 index 0000000000..374a97b2f0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PageStyleImpl.java @@ -0,0 +1,290 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PageStyle; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Page Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PageStyleImpl#getPageX <em>Page X</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PageStyleImpl#getPageY <em>Page Y</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PageStyleImpl#getPageWidth <em>Page Width</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PageStyleImpl#getPageHeight <em>Page Height</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class PageStyleImpl extends CDOObjectImpl implements PageStyle +{ + /** + * The default value of the '{@link #getPageX() <em>Page X</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageX() + * @generated + * @ordered + */ + protected static final int PAGE_X_EDEFAULT = 0; + + /** + * The default value of the '{@link #getPageY() <em>Page Y</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageY() + * @generated + * @ordered + */ + protected static final int PAGE_Y_EDEFAULT = 0; + + /** + * The default value of the '{@link #getPageWidth() <em>Page Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageWidth() + * @generated + * @ordered + */ + protected static final int PAGE_WIDTH_EDEFAULT = 100; + + /** + * The default value of the '{@link #getPageHeight() <em>Page Height</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageHeight() + * @generated + * @ordered + */ + protected static final int PAGE_HEIGHT_EDEFAULT = 100; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PageStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.PAGE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageX() + { + return ((Integer)eDynamicGet(NotationPackage.PAGE_STYLE__PAGE_X, NotationPackage.Literals.PAGE_STYLE__PAGE_X, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageX(int newPageX) + { + eDynamicSet(NotationPackage.PAGE_STYLE__PAGE_X, NotationPackage.Literals.PAGE_STYLE__PAGE_X, new Integer(newPageX)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageY() + { + return ((Integer)eDynamicGet(NotationPackage.PAGE_STYLE__PAGE_Y, NotationPackage.Literals.PAGE_STYLE__PAGE_Y, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageY(int newPageY) + { + eDynamicSet(NotationPackage.PAGE_STYLE__PAGE_Y, NotationPackage.Literals.PAGE_STYLE__PAGE_Y, new Integer(newPageY)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageWidth() + { + return ((Integer)eDynamicGet(NotationPackage.PAGE_STYLE__PAGE_WIDTH, NotationPackage.Literals.PAGE_STYLE__PAGE_WIDTH, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageWidth(int newPageWidth) + { + eDynamicSet(NotationPackage.PAGE_STYLE__PAGE_WIDTH, NotationPackage.Literals.PAGE_STYLE__PAGE_WIDTH, new Integer(newPageWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageHeight() + { + return ((Integer)eDynamicGet(NotationPackage.PAGE_STYLE__PAGE_HEIGHT, NotationPackage.Literals.PAGE_STYLE__PAGE_HEIGHT, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageHeight(int newPageHeight) + { + eDynamicSet(NotationPackage.PAGE_STYLE__PAGE_HEIGHT, NotationPackage.Literals.PAGE_STYLE__PAGE_HEIGHT, new Integer(newPageHeight)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.PAGE_STYLE__PAGE_X: + return new Integer(getPageX()); + case NotationPackage.PAGE_STYLE__PAGE_Y: + return new Integer(getPageY()); + case NotationPackage.PAGE_STYLE__PAGE_WIDTH: + return new Integer(getPageWidth()); + case NotationPackage.PAGE_STYLE__PAGE_HEIGHT: + return new Integer(getPageHeight()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.PAGE_STYLE__PAGE_X: + setPageX(((Integer)newValue).intValue()); + return; + case NotationPackage.PAGE_STYLE__PAGE_Y: + setPageY(((Integer)newValue).intValue()); + return; + case NotationPackage.PAGE_STYLE__PAGE_WIDTH: + setPageWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.PAGE_STYLE__PAGE_HEIGHT: + setPageHeight(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.PAGE_STYLE__PAGE_X: + setPageX(PAGE_X_EDEFAULT); + return; + case NotationPackage.PAGE_STYLE__PAGE_Y: + setPageY(PAGE_Y_EDEFAULT); + return; + case NotationPackage.PAGE_STYLE__PAGE_WIDTH: + setPageWidth(PAGE_WIDTH_EDEFAULT); + return; + case NotationPackage.PAGE_STYLE__PAGE_HEIGHT: + setPageHeight(PAGE_HEIGHT_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.PAGE_STYLE__PAGE_X: + return getPageX() != PAGE_X_EDEFAULT; + case NotationPackage.PAGE_STYLE__PAGE_Y: + return getPageY() != PAGE_Y_EDEFAULT; + case NotationPackage.PAGE_STYLE__PAGE_WIDTH: + return getPageWidth() != PAGE_WIDTH_EDEFAULT; + case NotationPackage.PAGE_STYLE__PAGE_HEIGHT: + return getPageHeight() != PAGE_HEIGHT_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // PageStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PropertiesSetStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PropertiesSetStyleImpl.java new file mode 100644 index 0000000000..d5e2213868 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PropertiesSetStyleImpl.java @@ -0,0 +1,269 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PropertiesSetStyle; +import org.eclipse.gmf.runtime.notation.PropertyValue; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Properties Set Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PropertiesSetStyleImpl#getPropertiesMap <em>Properties Map</em>}</li> + * </ul> + * + * @generated + */ +public class PropertiesSetStyleImpl extends NamedStyleImpl implements PropertiesSetStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PropertiesSetStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.PROPERTIES_SET_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EMap getPropertiesMap() + { + return (EMap)eDynamicGet(NotationPackage.PROPERTIES_SET_STYLE__PROPERTIES_MAP, NotationPackage.Literals.PROPERTIES_SET_STYLE__PROPERTIES_MAP, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Object getProperty(String propertyName) + { + PropertyValue propertyValue = (PropertyValue)getPropertiesMap().get(propertyName); + if (propertyValue != null) + { + return propertyValue.getValue(); + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public boolean setProperty(String propertyName, Object newValue) + { + PropertyValue propertyValue = (PropertyValue)getPropertiesMap().get(propertyName); + if (propertyValue != null) + { + propertyValue.setValue(newValue); + return true; + } + return false; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public boolean createProperty(String propertyName, EDataType instanceType, Object initialValue) + { + if (propertyName != null && !hasProperty(propertyName)) + { + PropertyValue value = NotationFactory.eINSTANCE.createPropertyValue(); + if (instanceType == null) + { + if (initialValue instanceof String) + { + value.setRawValue((String)initialValue); + } + else + { + return false; + } + } + else + { + value.setInstanceType(instanceType); + value.setValue(initialValue); + } + return getPropertiesMap().put(propertyName, value) == null; + } + return false; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public boolean removeProperty(String propertyName) + { + return getPropertiesMap().removeKey(propertyName) != null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public boolean hasProperty(String propertyName) + { + return getPropertiesMap().containsKey(propertyName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public boolean createProperty(String propertyName, String initialValue) + { + if (!hasProperty(propertyName)) + { + PropertyValue value = NotationFactory.eINSTANCE.createPropertyValue(); + value.setRawValue(initialValue); + return getPropertiesMap().put(propertyName, value) == null; + } + return false; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.PROPERTIES_SET_STYLE__PROPERTIES_MAP: + return ((InternalEList)getPropertiesMap()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.PROPERTIES_SET_STYLE__NAME: + return getName(); + case NotationPackage.PROPERTIES_SET_STYLE__PROPERTIES_MAP: + if (coreType) + { + return getPropertiesMap(); + } + else + { + return getPropertiesMap().map(); + } + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.PROPERTIES_SET_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.PROPERTIES_SET_STYLE__PROPERTIES_MAP: + ((EStructuralFeature.Setting)getPropertiesMap()).set(newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.PROPERTIES_SET_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.PROPERTIES_SET_STYLE__PROPERTIES_MAP: + getPropertiesMap().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.PROPERTIES_SET_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.PROPERTIES_SET_STYLE__PROPERTIES_MAP: + return !getPropertiesMap().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // PropertiesSetStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PropertyValueImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PropertyValueImpl.java new file mode 100644 index 0000000000..32e74a2f8a --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/PropertyValueImpl.java @@ -0,0 +1,281 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PropertyValue; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Property Value</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PropertyValueImpl#getRawValue <em>Raw Value</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.PropertyValueImpl#getInstanceType <em>Instance Type</em>}</li> + * </ul> + * + * @generated + */ +public class PropertyValueImpl extends CDOObjectImpl implements PropertyValue +{ + /** + * The default value of the '{@link #getRawValue() <em>Raw Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRawValue() + * @generated + * @ordered + */ + protected static final String RAW_VALUE_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PropertyValueImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.PROPERTY_VALUE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getRawValue() + { + return (String)eDynamicGet(NotationPackage.PROPERTY_VALUE__RAW_VALUE, NotationPackage.Literals.PROPERTY_VALUE__RAW_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setRawValue(String newRawValue) + { + if (getInstanceType() != null) + { + try + { + getObjectFromString(newRawValue); + } + catch (Exception e) + { + throw new IllegalArgumentException("Value <" + newRawValue//$NON-NLS-1$ + + "> cannot be associated with Data type <"//$NON-NLS-1$ + + getInstanceType().toString() + ">: " + e.getMessage()); //$NON-NLS-1$ + } + } + setRawValueGen(newRawValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRawValueGen(String newRawValue) + { + eDynamicSet(NotationPackage.PROPERTY_VALUE__RAW_VALUE, NotationPackage.Literals.PROPERTY_VALUE__RAW_VALUE, newRawValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getInstanceType() + { + return (EDataType)eDynamicGet(NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE, NotationPackage.Literals.PROPERTY_VALUE__INSTANCE_TYPE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType basicGetInstanceType() + { + return (EDataType)eDynamicGet(NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE, NotationPackage.Literals.PROPERTY_VALUE__INSTANCE_TYPE, false, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setInstanceType(EDataType newInstanceType) + { + eDynamicSet(NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE, NotationPackage.Literals.PROPERTY_VALUE__INSTANCE_TYPE, newInstanceType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Object getValue() + { + return getObjectFromString(getRawValue()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setValue(Object newValue) + { + setRawValue(getStringFromObject(newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public String getStringFromObject(Object objectValue) + { + if (getInstanceType() == null && objectValue instanceof String) + { + return (String)objectValue; + } + return EcoreUtil.convertToString(getInstanceType(), objectValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Object getObjectFromString(String stringValue) + { + if (getInstanceType() == null) + { + return stringValue; + } + return EcoreUtil.createFromString(getInstanceType(), stringValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.PROPERTY_VALUE__RAW_VALUE: + return getRawValue(); + case NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE: + if (resolve) + { + return getInstanceType(); + } + return basicGetInstanceType(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.PROPERTY_VALUE__RAW_VALUE: + setRawValue((String)newValue); + return; + case NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE: + setInstanceType((EDataType)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.PROPERTY_VALUE__RAW_VALUE: + setRawValue(RAW_VALUE_EDEFAULT); + return; + case NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE: + setInstanceType((EDataType)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.PROPERTY_VALUE__RAW_VALUE: + return RAW_VALUE_EDEFAULT == null ? getRawValue() != null : !RAW_VALUE_EDEFAULT.equals(getRawValue()); + case NotationPackage.PROPERTY_VALUE__INSTANCE_TYPE: + return basicGetInstanceType() != null; + } + return eDynamicIsSet(featureID); + } + +} // PropertyValueImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RatioImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RatioImpl.java new file mode 100644 index 0000000000..9483faf275 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RatioImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Ratio; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Ratio</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RatioImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class RatioImpl extends CDOObjectImpl implements Ratio +{ + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = -1.0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RatioImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.RATIO; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public double getValue() + { + return ((Double)eDynamicGet(NotationPackage.RATIO__VALUE, NotationPackage.Literals.RATIO__VALUE, true, true)).doubleValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(double newValue) + { + eDynamicSet(NotationPackage.RATIO__VALUE, NotationPackage.Literals.RATIO__VALUE, new Double(newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.RATIO__VALUE: + return new Double(getValue()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.RATIO__VALUE: + setValue(((Double)newValue).doubleValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.RATIO__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.RATIO__VALUE: + return getValue() != VALUE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // RatioImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RelativeBendpointsImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RelativeBendpointsImpl.java new file mode 100644 index 0000000000..0c170168ce --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RelativeBendpointsImpl.java @@ -0,0 +1,215 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.RelativeBendpoints; +import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Relative Bendpoints</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RelativeBendpointsImpl#getPoints <em>Points</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class RelativeBendpointsImpl extends CDOObjectImpl implements RelativeBendpoints +{ + /** + * The default value of the '{@link #getPoints() <em>Points</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPoints() + * @generated NOT + * @ordered + */ + protected static final List POINTS_EDEFAULT = Collections.EMPTY_LIST; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RelativeBendpointsImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.RELATIVE_BENDPOINTS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public List getPoints() + { + return Collections.unmodifiableList(getPointsGen()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getPointsGen() + { + return (List)eDynamicGet(NotationPackage.RELATIVE_BENDPOINTS__POINTS, NotationPackage.Literals.RELATIVE_BENDPOINTS__POINTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setPoints(List newPoints) + { + if (newPoints == null) + { + throw new NullPointerException("the 'newPoints' parameter is null"); //$NON-NLS-1$ + } + + if (newPoints.isEmpty()) + { + setPointsGen(POINTS_EDEFAULT); + } + else + { + List tempList = new ArrayList(newPoints.size()); + for (Iterator i = newPoints.iterator(); i.hasNext();) + { + Object point = i.next(); + if (!(point instanceof RelativeBendpoint)) + { + throw new IllegalArgumentException("One or more objects in the list is not of type org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint"); //$NON-NLS-1$ + } + tempList.add(point); + } + setPointsGen(tempList); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPointsGen(List newPoints) + { + eDynamicSet(NotationPackage.RELATIVE_BENDPOINTS__POINTS, NotationPackage.Literals.RELATIVE_BENDPOINTS__POINTS, newPoints); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.RELATIVE_BENDPOINTS__POINTS: + return getPoints(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.RELATIVE_BENDPOINTS__POINTS: + setPoints((List)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.RELATIVE_BENDPOINTS__POINTS: + setPoints(POINTS_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.RELATIVE_BENDPOINTS__POINTS: + return POINTS_EDEFAULT == null ? getPoints() != null : !POINTS_EDEFAULT.equals(getPoints()); + } + return eDynamicIsSet(featureID); + } + +} // RelativeBendpointsImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RoundedCornersStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RoundedCornersStyleImpl.java new file mode 100644 index 0000000000..7087fa76ff --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RoundedCornersStyleImpl.java @@ -0,0 +1,165 @@ +/****************************************************************************** + * Copyright (c) 2010 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.RoundedCornersStyle; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Rounded Corners Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoundedCornersStyleImpl#getRoundedBendpointsRadius <em>Rounded Bendpoints Radius</em>}</li> + * </ul> + * + * @generated + */ +public class RoundedCornersStyleImpl extends CDOObjectImpl implements RoundedCornersStyle +{ + /** + * The default value of the '{@link #getRoundedBendpointsRadius() <em>Rounded Bendpoints Radius</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRoundedBendpointsRadius() + * @generated + * @ordered + */ + protected static final int ROUNDED_BENDPOINTS_RADIUS_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RoundedCornersStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.ROUNDED_CORNERS_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getRoundedBendpointsRadius() + { + return ((Integer)eDynamicGet(NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, + NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRoundedBendpointsRadius(int newRoundedBendpointsRadius) + { + eDynamicSet(NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, + new Integer(newRoundedBendpointsRadius)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return new Integer(getRoundedBendpointsRadius()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(ROUNDED_BENDPOINTS_RADIUS_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return getRoundedBendpointsRadius() != ROUNDED_BENDPOINTS_RADIUS_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // RoundedCornersStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RoutingStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RoutingStyleImpl.java new file mode 100644 index 0000000000..bd967f1436 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/RoutingStyleImpl.java @@ -0,0 +1,419 @@ +/****************************************************************************** + * Copyright (c) 2004, 2010 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.JumpLinkStatus; +import org.eclipse.gmf.runtime.notation.JumpLinkType; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Routing; +import org.eclipse.gmf.runtime.notation.RoutingStyle; +import org.eclipse.gmf.runtime.notation.Smoothness; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Routing Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#getRouting <em>Routing</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#getSmoothness <em>Smoothness</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#isAvoidObstructions <em>Avoid Obstructions</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#isClosestDistance <em>Closest Distance</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#getJumpLinkStatus <em>Jump Link Status</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#getJumpLinkType <em>Jump Link Type</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl#isJumpLinksReverse <em>Jump Links Reverse</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class RoutingStyleImpl extends RoundedCornersStyleImpl implements RoutingStyle +{ + /** + * The default value of the '{@link #getRouting() <em>Routing</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRouting() + * @generated + * @ordered + */ + protected static final Routing ROUTING_EDEFAULT = Routing.MANUAL_LITERAL; + + /** + * The default value of the '{@link #getSmoothness() <em>Smoothness</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSmoothness() + * @generated + * @ordered + */ + protected static final Smoothness SMOOTHNESS_EDEFAULT = Smoothness.NONE_LITERAL; + + /** + * The default value of the '{@link #isAvoidObstructions() <em>Avoid Obstructions</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isAvoidObstructions() + * @generated + * @ordered + */ + protected static final boolean AVOID_OBSTRUCTIONS_EDEFAULT = false; + + /** + * The default value of the '{@link #isClosestDistance() <em>Closest Distance</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isClosestDistance() + * @generated + * @ordered + */ + protected static final boolean CLOSEST_DISTANCE_EDEFAULT = false; + + /** + * The default value of the '{@link #getJumpLinkStatus() <em>Jump Link Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJumpLinkStatus() + * @generated + * @ordered + */ + protected static final JumpLinkStatus JUMP_LINK_STATUS_EDEFAULT = JumpLinkStatus.NONE_LITERAL; + + /** + * The default value of the '{@link #getJumpLinkType() <em>Jump Link Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJumpLinkType() + * @generated + * @ordered + */ + protected static final JumpLinkType JUMP_LINK_TYPE_EDEFAULT = JumpLinkType.SEMICIRCLE_LITERAL; + + /** + * The default value of the '{@link #isJumpLinksReverse() <em>Jump Links Reverse</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isJumpLinksReverse() + * @generated + * @ordered + */ + protected static final boolean JUMP_LINKS_REVERSE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RoutingStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.ROUTING_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Routing getRouting() + { + return (Routing)eDynamicGet(NotationPackage.ROUTING_STYLE__ROUTING, NotationPackage.Literals.ROUTING_STYLE__ROUTING, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRouting(Routing newRouting) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__ROUTING, NotationPackage.Literals.ROUTING_STYLE__ROUTING, newRouting); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Smoothness getSmoothness() + { + return (Smoothness)eDynamicGet(NotationPackage.ROUTING_STYLE__SMOOTHNESS, NotationPackage.Literals.ROUTING_STYLE__SMOOTHNESS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSmoothness(Smoothness newSmoothness) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__SMOOTHNESS, NotationPackage.Literals.ROUTING_STYLE__SMOOTHNESS, newSmoothness); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isAvoidObstructions() + { + return ((Boolean)eDynamicGet(NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS, NotationPackage.Literals.ROUTING_STYLE__AVOID_OBSTRUCTIONS, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAvoidObstructions(boolean newAvoidObstructions) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS, NotationPackage.Literals.ROUTING_STYLE__AVOID_OBSTRUCTIONS, + new Boolean(newAvoidObstructions)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isClosestDistance() + { + return ((Boolean)eDynamicGet(NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE, NotationPackage.Literals.ROUTING_STYLE__CLOSEST_DISTANCE, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setClosestDistance(boolean newClosestDistance) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE, NotationPackage.Literals.ROUTING_STYLE__CLOSEST_DISTANCE, new Boolean(newClosestDistance)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JumpLinkStatus getJumpLinkStatus() + { + return (JumpLinkStatus)eDynamicGet(NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_STATUS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJumpLinkStatus(JumpLinkStatus newJumpLinkStatus) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_STATUS, newJumpLinkStatus); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JumpLinkType getJumpLinkType() + { + return (JumpLinkType)eDynamicGet(NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_TYPE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJumpLinkType(JumpLinkType newJumpLinkType) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINK_TYPE, newJumpLinkType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isJumpLinksReverse() + { + return ((Boolean)eDynamicGet(NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINKS_REVERSE, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJumpLinksReverse(boolean newJumpLinksReverse) + { + eDynamicSet(NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE, NotationPackage.Literals.ROUTING_STYLE__JUMP_LINKS_REVERSE, + new Boolean(newJumpLinksReverse)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.ROUTING_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return new Integer(getRoundedBendpointsRadius()); + case NotationPackage.ROUTING_STYLE__ROUTING: + return getRouting(); + case NotationPackage.ROUTING_STYLE__SMOOTHNESS: + return getSmoothness(); + case NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS: + return isAvoidObstructions() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE: + return isClosestDistance() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS: + return getJumpLinkStatus(); + case NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE: + return getJumpLinkType(); + case NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE: + return isJumpLinksReverse() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.ROUTING_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(((Integer)newValue).intValue()); + return; + case NotationPackage.ROUTING_STYLE__ROUTING: + setRouting((Routing)newValue); + return; + case NotationPackage.ROUTING_STYLE__SMOOTHNESS: + setSmoothness((Smoothness)newValue); + return; + case NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS: + setAvoidObstructions(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE: + setClosestDistance(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS: + setJumpLinkStatus((JumpLinkStatus)newValue); + return; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE: + setJumpLinkType((JumpLinkType)newValue); + return; + case NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE: + setJumpLinksReverse(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.ROUTING_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(ROUNDED_BENDPOINTS_RADIUS_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__ROUTING: + setRouting(ROUTING_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__SMOOTHNESS: + setSmoothness(SMOOTHNESS_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS: + setAvoidObstructions(AVOID_OBSTRUCTIONS_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE: + setClosestDistance(CLOSEST_DISTANCE_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS: + setJumpLinkStatus(JUMP_LINK_STATUS_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE: + setJumpLinkType(JUMP_LINK_TYPE_EDEFAULT); + return; + case NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE: + setJumpLinksReverse(JUMP_LINKS_REVERSE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.ROUTING_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return getRoundedBendpointsRadius() != ROUNDED_BENDPOINTS_RADIUS_EDEFAULT; + case NotationPackage.ROUTING_STYLE__ROUTING: + return getRouting() != ROUTING_EDEFAULT; + case NotationPackage.ROUTING_STYLE__SMOOTHNESS: + return getSmoothness() != SMOOTHNESS_EDEFAULT; + case NotationPackage.ROUTING_STYLE__AVOID_OBSTRUCTIONS: + return isAvoidObstructions() != AVOID_OBSTRUCTIONS_EDEFAULT; + case NotationPackage.ROUTING_STYLE__CLOSEST_DISTANCE: + return isClosestDistance() != CLOSEST_DISTANCE_EDEFAULT; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_STATUS: + return getJumpLinkStatus() != JUMP_LINK_STATUS_EDEFAULT; + case NotationPackage.ROUTING_STYLE__JUMP_LINK_TYPE: + return getJumpLinkType() != JUMP_LINK_TYPE_EDEFAULT; + case NotationPackage.ROUTING_STYLE__JUMP_LINKS_REVERSE: + return isJumpLinksReverse() != JUMP_LINKS_REVERSE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // RoutingStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SemanticListCompartmentImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SemanticListCompartmentImpl.java new file mode 100644 index 0000000000..1f1e491cf6 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SemanticListCompartmentImpl.java @@ -0,0 +1,680 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.Filtering; +import org.eclipse.gmf.runtime.notation.FilteringStyle; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.SemanticListCompartment; +import org.eclipse.gmf.runtime.notation.Sorting; +import org.eclipse.gmf.runtime.notation.SortingStyle; +import org.eclipse.gmf.runtime.notation.TitleStyle; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Semantic List Compartment</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#getSorting <em>Sorting</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#getSortingKeys <em>Sorting Keys</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#getSortedObjects <em>Sorted Objects</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#getFiltering <em>Filtering</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#getFilteringKeys <em>Filtering Keys</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#getFilteredObjects <em>Filtered Objects</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl#isShowTitle <em>Show Title</em>}</li> + * </ul> + * + * @generated + */ +public class SemanticListCompartmentImpl extends BasicSemanticCompartmentImpl implements SemanticListCompartment +{ + /** + * The default value of the '{@link #getSorting() <em>Sorting</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSorting() + * @generated + * @ordered + */ + protected static final Sorting SORTING_EDEFAULT = Sorting.NONE_LITERAL; + + /** + * The default value of the '{@link #getSortingKeys() <em>Sorting Keys</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSortingKeys() + * @generated + * @ordered + */ + protected static final Map SORTING_KEYS_EDEFAULT = null; + + /** + * The default value of the '{@link #getFiltering() <em>Filtering</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFiltering() + * @generated + * @ordered + */ + protected static final Filtering FILTERING_EDEFAULT = Filtering.NONE_LITERAL; + + /** + * The default value of the '{@link #getFilteringKeys() <em>Filtering Keys</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilteringKeys() + * @generated + * @ordered + */ + protected static final List FILTERING_KEYS_EDEFAULT = null; + + /** + * The default value of the '{@link #isShowTitle() <em>Show Title</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isShowTitle() + * @generated + * @ordered + */ + protected static final boolean SHOW_TITLE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SemanticListCompartmentImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.SEMANTIC_LIST_COMPARTMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Sorting getSorting() + { + return (Sorting)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSorting(Sorting newSorting) + { + eDynamicSet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING, newSorting); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Map getSortingKeys() + { + return (Map)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.SORTING_STYLE__SORTING_KEYS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSortingKeys(Map newSortingKeys) + { + eDynamicSet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.SORTING_STYLE__SORTING_KEYS, + newSortingKeys); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getSortedObjects() + { + return (EList)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.SORTING_STYLE__SORTED_OBJECTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Filtering getFiltering() + { + return (Filtering)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.FILTERING_STYLE__FILTERING, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFiltering(Filtering newFiltering) + { + eDynamicSet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILTERING_STYLE__FILTERING, + newFiltering); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getFilteringKeys() + { + return (List)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.FILTERING_STYLE__FILTERING_KEYS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFilteringKeys(List newFilteringKeys) + { + eDynamicSet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILTERING_STYLE__FILTERING_KEYS, + newFilteringKeys); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getFilteredObjects() + { + return (EList)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.FILTERING_STYLE__FILTERED_OBJECTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isShowTitle() + { + return ((Boolean)eDynamicGet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setShowTitle(boolean newShowTitle) + { + eDynamicSet(NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, + new Boolean(newShowTitle)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TYPE: + return getType(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + return getStyles(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__COLLAPSED: + return isCollapsed() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING: + return getSorting(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS: + return getSortingKeys(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS: + return getSortedObjects(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING: + return getFiltering(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS: + return getFilteringKeys(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS: + return getFilteredObjects(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE: + return isShowTitle() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return; + default: + eSetGen(featureID, newValue); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSetGen(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TYPE: + setType((String)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__COLLAPSED: + setCollapsed(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING: + setSorting((Sorting)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS: + setSortingKeys((Map)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS: + getSortedObjects().clear(); + getSortedObjects().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING: + setFiltering((Filtering)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS: + setFilteringKeys((List)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS: + getFilteredObjects().clear(); + getFilteredObjects().addAll((Collection)newValue); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE: + setShowTitle(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return; + default: + eUnsetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnsetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + getStyles().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__ELEMENT: + unsetElement(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__COLLAPSED: + setCollapsed(COLLAPSED_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING: + setSorting(SORTING_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS: + setSortingKeys(SORTING_KEYS_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS: + getSortedObjects().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING: + setFiltering(FILTERING_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS: + setFilteringKeys(FILTERING_KEYS_EDEFAULT); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS: + getFilteredObjects().clear(); + return; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE: + setShowTitle(SHOW_TITLE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return false; + default: + return eIsSetGen(featureID); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSetGen(int featureID) + { + switch (featureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__ELEMENT: + return isSetElement(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__COLLAPSED: + return isCollapsed() != COLLAPSED_EDEFAULT; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING: + return getSorting() != SORTING_EDEFAULT; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS: + return SORTING_KEYS_EDEFAULT == null ? getSortingKeys() != null : !SORTING_KEYS_EDEFAULT.equals(getSortingKeys()); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS: + return !getSortedObjects().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING: + return getFiltering() != FILTERING_EDEFAULT; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS: + return FILTERING_KEYS_EDEFAULT == null ? getFilteringKeys() != null : !FILTERING_KEYS_EDEFAULT.equals(getFilteringKeys()); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS: + return !getFilteredObjects().isEmpty(); + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE: + return isShowTitle() != SHOW_TITLE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == SortingStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING: + return NotationPackage.SORTING_STYLE__SORTING; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS: + return NotationPackage.SORTING_STYLE__SORTING_KEYS; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS: + return NotationPackage.SORTING_STYLE__SORTED_OBJECTS; + default: + return -1; + } + } + if (baseClass == FilteringStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING: + return NotationPackage.FILTERING_STYLE__FILTERING; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS: + return NotationPackage.FILTERING_STYLE__FILTERING_KEYS; + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS: + return NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS; + default: + return -1; + } + } + if (baseClass == TitleStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE: + return NotationPackage.TITLE_STYLE__SHOW_TITLE; + 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 == SortingStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.SORTING_STYLE__SORTING: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING; + case NotationPackage.SORTING_STYLE__SORTING_KEYS: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTING_KEYS; + case NotationPackage.SORTING_STYLE__SORTED_OBJECTS: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__SORTED_OBJECTS; + default: + return -1; + } + } + if (baseClass == FilteringStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.FILTERING_STYLE__FILTERING: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING; + case NotationPackage.FILTERING_STYLE__FILTERING_KEYS: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERING_KEYS; + case NotationPackage.FILTERING_STYLE__FILTERED_OBJECTS: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__FILTERED_OBJECTS; + default: + return -1; + } + } + if (baseClass == TitleStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + return NotationPackage.SEMANTIC_LIST_COMPARTMENT__SHOW_TITLE; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // SemanticListCompartmentImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ShapeImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ShapeImpl.java new file mode 100644 index 0000000000..4e962a8ec3 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ShapeImpl.java @@ -0,0 +1,1035 @@ +/****************************************************************************** + * Copyright (c) 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.FillStyle; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.LayoutConstraint; +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.RoundedCornersStyle; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.ShapeStyle; +import org.eclipse.gmf.runtime.notation.Style; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Shape</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getFontColor <em>Font Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getFontName <em>Font Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getFontHeight <em>Font Height</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#isBold <em>Bold</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#isItalic <em>Italic</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#isUnderline <em>Underline</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#isStrikeThrough <em>Strike Through</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getDescription <em>Description</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getFillColor <em>Fill Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getTransparency <em>Transparency</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getGradient <em>Gradient</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getLineColor <em>Line Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getLineWidth <em>Line Width</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl#getRoundedBendpointsRadius <em>Rounded Bendpoints Radius</em>}</li> + * </ul> + * + * @generated + */ +public class ShapeImpl extends NodeImpl implements Shape +{ + /** + * The default value of the '{@link #getFontColor() <em>Font Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFontColor() + * @generated + * @ordered + */ + protected static final int FONT_COLOR_EDEFAULT = 0; + + /** + * The default value of the '{@link #getFontName() <em>Font Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFontName() + * @generated + * @ordered + */ + protected static final String FONT_NAME_EDEFAULT = "Tahoma"; //$NON-NLS-1$ + + /** + * The default value of the '{@link #getFontHeight() <em>Font Height</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFontHeight() + * @generated + * @ordered + */ + protected static final int FONT_HEIGHT_EDEFAULT = 9; + + /** + * The default value of the '{@link #isBold() <em>Bold</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isBold() + * @generated + * @ordered + */ + protected static final boolean BOLD_EDEFAULT = false; + + /** + * The default value of the '{@link #isItalic() <em>Italic</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isItalic() + * @generated + * @ordered + */ + protected static final boolean ITALIC_EDEFAULT = false; + + /** + * The default value of the '{@link #isUnderline() <em>Underline</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isUnderline() + * @generated + * @ordered + */ + protected static final boolean UNDERLINE_EDEFAULT = false; + + /** + * The default value of the '{@link #isStrikeThrough() <em>Strike Through</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isStrikeThrough() + * @generated + * @ordered + */ + protected static final boolean STRIKE_THROUGH_EDEFAULT = false; + + /** + * 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 = ""; //$NON-NLS-1$ + + /** + * The default value of the '{@link #getFillColor() <em>Fill Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFillColor() + * @generated + * @ordered + */ + protected static final int FILL_COLOR_EDEFAULT = 16777215; + + /** + * The default value of the '{@link #getTransparency() <em>Transparency</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTransparency() + * @generated + * @ordered + */ + protected static final int TRANSPARENCY_EDEFAULT = -1; + + /** + * The default value of the '{@link #getGradient() <em>Gradient</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGradient() + * @generated + * @ordered + */ + protected static final GradientData GRADIENT_EDEFAULT = null; + + /** + * The default value of the '{@link #getLineColor() <em>Line Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineColor() + * @generated + * @ordered + */ + protected static final int LINE_COLOR_EDEFAULT = 11579568; + + /** + * The default value of the '{@link #getLineWidth() <em>Line Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineWidth() + * @generated + * @ordered + */ + protected static final int LINE_WIDTH_EDEFAULT = -1; + + /** + * The default value of the '{@link #getRoundedBendpointsRadius() <em>Rounded Bendpoints Radius</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRoundedBendpointsRadius() + * @generated + * @ordered + */ + protected static final int ROUNDED_BENDPOINTS_RADIUS_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ShapeImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.SHAPE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFontColor() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__FONT_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__FONT_COLOR, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFontColor(int newFontColor) + { + eDynamicSet(NotationPackage.SHAPE__FONT_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__FONT_COLOR, new Integer(newFontColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFontName() + { + return (String)eDynamicGet(NotationPackage.SHAPE__FONT_NAME - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__FONT_NAME, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setFontName(String newFontName) + { + setFontNameGen(newFontName == null ? null : newFontName.intern()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFontNameGen(String newFontName) + { + eDynamicSet(NotationPackage.SHAPE__FONT_NAME - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__FONT_NAME, newFontName); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFontHeight() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__FONT_HEIGHT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__FONT_HEIGHT, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFontHeight(int newFontHeight) + { + eDynamicSet(NotationPackage.SHAPE__FONT_HEIGHT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__FONT_HEIGHT, new Integer(newFontHeight)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isBold() + { + return ((Boolean)eDynamicGet(NotationPackage.SHAPE__BOLD - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__BOLD, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBold(boolean newBold) + { + eDynamicSet(NotationPackage.SHAPE__BOLD - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__BOLD, new Boolean(newBold)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isItalic() + { + return ((Boolean)eDynamicGet(NotationPackage.SHAPE__ITALIC - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__ITALIC, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setItalic(boolean newItalic) + { + eDynamicSet(NotationPackage.SHAPE__ITALIC - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__ITALIC, new Boolean(newItalic)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isUnderline() + { + return ((Boolean)eDynamicGet(NotationPackage.SHAPE__UNDERLINE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__UNDERLINE, true, true)) + .booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUnderline(boolean newUnderline) + { + eDynamicSet(NotationPackage.SHAPE__UNDERLINE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__UNDERLINE, new Boolean(newUnderline)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isStrikeThrough() + { + return ((Boolean)eDynamicGet(NotationPackage.SHAPE__STRIKE_THROUGH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__STRIKE_THROUGH, true, + true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setStrikeThrough(boolean newStrikeThrough) + { + eDynamicSet(NotationPackage.SHAPE__STRIKE_THROUGH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FONT_STYLE__STRIKE_THROUGH, + new Boolean(newStrikeThrough)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() + { + return (String)eDynamicGet(NotationPackage.SHAPE__DESCRIPTION - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) + { + eDynamicSet(NotationPackage.SHAPE__DESCRIPTION - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, newDescription); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFillColor() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__FILL_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILL_STYLE__FILL_COLOR, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFillColor(int newFillColor) + { + eDynamicSet(NotationPackage.SHAPE__FILL_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILL_STYLE__FILL_COLOR, new Integer(newFillColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getTransparency() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__TRANSPARENCY - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILL_STYLE__TRANSPARENCY, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTransparency(int newTransparency) + { + eDynamicSet(NotationPackage.SHAPE__TRANSPARENCY - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILL_STYLE__TRANSPARENCY, new Integer(newTransparency)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GradientData getGradient() + { + return (GradientData)eDynamicGet(NotationPackage.SHAPE__GRADIENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILL_STYLE__GRADIENT, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setGradient(GradientData newGradient) + { + eDynamicSet(NotationPackage.SHAPE__GRADIENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.FILL_STYLE__GRADIENT, newGradient); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineColor() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__LINE_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineColor(int newLineColor) + { + eDynamicSet(NotationPackage.SHAPE__LINE_COLOR - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, new Integer(newLineColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineWidth() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__LINE_WIDTH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineWidth(int newLineWidth) + { + eDynamicSet(NotationPackage.SHAPE__LINE_WIDTH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, new Integer(newLineWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getRoundedBendpointsRadius() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRoundedBendpointsRadius(int newRoundedBendpointsRadius) + { + eDynamicSet(NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, new Integer(newRoundedBendpointsRadius)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.SHAPE__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.SHAPE__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE__TYPE: + return getType(); + case NotationPackage.SHAPE__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.SHAPE__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.SHAPE__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.SHAPE__STYLES: + return getStyles(); + case NotationPackage.SHAPE__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.SHAPE__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.SHAPE__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.SHAPE__LAYOUT_CONSTRAINT: + return getLayoutConstraint(); + case NotationPackage.SHAPE__FONT_COLOR: + return new Integer(getFontColor()); + case NotationPackage.SHAPE__FONT_NAME: + return getFontName(); + case NotationPackage.SHAPE__FONT_HEIGHT: + return new Integer(getFontHeight()); + case NotationPackage.SHAPE__BOLD: + return isBold() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE__ITALIC: + return isItalic() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE__UNDERLINE: + return isUnderline() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE__STRIKE_THROUGH: + return isStrikeThrough() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE__DESCRIPTION: + return getDescription(); + case NotationPackage.SHAPE__FILL_COLOR: + return new Integer(getFillColor()); + case NotationPackage.SHAPE__TRANSPARENCY: + return new Integer(getTransparency()); + case NotationPackage.SHAPE__GRADIENT: + return getGradient(); + case NotationPackage.SHAPE__LINE_COLOR: + return new Integer(getLineColor()); + case NotationPackage.SHAPE__LINE_WIDTH: + return new Integer(getLineWidth()); + case NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS: + return new Integer(getRoundedBendpointsRadius()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SHAPE__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.SHAPE__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE__TYPE: + setType((String)newValue); + return; + case NotationPackage.SHAPE__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.SHAPE__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.SHAPE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.SHAPE__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.SHAPE__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.SHAPE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.SHAPE__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)newValue); + return; + case NotationPackage.SHAPE__FONT_COLOR: + setFontColor(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE__FONT_NAME: + setFontName((String)newValue); + return; + case NotationPackage.SHAPE__FONT_HEIGHT: + setFontHeight(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE__BOLD: + setBold(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE__ITALIC: + setItalic(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE__UNDERLINE: + setUnderline(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE__STRIKE_THROUGH: + setStrikeThrough(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE__DESCRIPTION: + setDescription((String)newValue); + return; + case NotationPackage.SHAPE__FILL_COLOR: + setFillColor(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE__TRANSPARENCY: + setTransparency(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE__GRADIENT: + setGradient((GradientData)newValue); + return; + case NotationPackage.SHAPE__LINE_COLOR: + setLineColor(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE__LINE_WIDTH: + setLineWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.SHAPE__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.SHAPE__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.SHAPE__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.SHAPE__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.SHAPE__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.SHAPE__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.SHAPE__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.SHAPE__STYLES: + getStyles().clear(); + return; + case NotationPackage.SHAPE__ELEMENT: + unsetElement(); + return; + case NotationPackage.SHAPE__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.SHAPE__LAYOUT_CONSTRAINT: + setLayoutConstraint((LayoutConstraint)null); + return; + case NotationPackage.SHAPE__FONT_COLOR: + setFontColor(FONT_COLOR_EDEFAULT); + return; + case NotationPackage.SHAPE__FONT_NAME: + setFontName(FONT_NAME_EDEFAULT); + return; + case NotationPackage.SHAPE__FONT_HEIGHT: + setFontHeight(FONT_HEIGHT_EDEFAULT); + return; + case NotationPackage.SHAPE__BOLD: + setBold(BOLD_EDEFAULT); + return; + case NotationPackage.SHAPE__ITALIC: + setItalic(ITALIC_EDEFAULT); + return; + case NotationPackage.SHAPE__UNDERLINE: + setUnderline(UNDERLINE_EDEFAULT); + return; + case NotationPackage.SHAPE__STRIKE_THROUGH: + setStrikeThrough(STRIKE_THROUGH_EDEFAULT); + return; + case NotationPackage.SHAPE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case NotationPackage.SHAPE__FILL_COLOR: + setFillColor(FILL_COLOR_EDEFAULT); + return; + case NotationPackage.SHAPE__TRANSPARENCY: + setTransparency(TRANSPARENCY_EDEFAULT); + return; + case NotationPackage.SHAPE__GRADIENT: + setGradient(GRADIENT_EDEFAULT); + return; + case NotationPackage.SHAPE__LINE_COLOR: + setLineColor(LINE_COLOR_EDEFAULT); + return; + case NotationPackage.SHAPE__LINE_WIDTH: + setLineWidth(LINE_WIDTH_EDEFAULT); + return; + case NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(ROUNDED_BENDPOINTS_RADIUS_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.SHAPE__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.SHAPE__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.SHAPE__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.SHAPE__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.SHAPE__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.SHAPE__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.SHAPE__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.SHAPE__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.SHAPE__ELEMENT: + return isSetElement(); + case NotationPackage.SHAPE__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.SHAPE__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.SHAPE__LAYOUT_CONSTRAINT: + return getLayoutConstraint() != null; + case NotationPackage.SHAPE__FONT_COLOR: + return getFontColor() != FONT_COLOR_EDEFAULT; + case NotationPackage.SHAPE__FONT_NAME: + return FONT_NAME_EDEFAULT == null ? getFontName() != null : !FONT_NAME_EDEFAULT.equals(getFontName()); + case NotationPackage.SHAPE__FONT_HEIGHT: + return getFontHeight() != FONT_HEIGHT_EDEFAULT; + case NotationPackage.SHAPE__BOLD: + return isBold() != BOLD_EDEFAULT; + case NotationPackage.SHAPE__ITALIC: + return isItalic() != ITALIC_EDEFAULT; + case NotationPackage.SHAPE__UNDERLINE: + return isUnderline() != UNDERLINE_EDEFAULT; + case NotationPackage.SHAPE__STRIKE_THROUGH: + return isStrikeThrough() != STRIKE_THROUGH_EDEFAULT; + case NotationPackage.SHAPE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? getDescription() != null : !DESCRIPTION_EDEFAULT.equals(getDescription()); + case NotationPackage.SHAPE__FILL_COLOR: + return getFillColor() != FILL_COLOR_EDEFAULT; + case NotationPackage.SHAPE__TRANSPARENCY: + return getTransparency() != TRANSPARENCY_EDEFAULT; + case NotationPackage.SHAPE__GRADIENT: + return GRADIENT_EDEFAULT == null ? getGradient() != null : !GRADIENT_EDEFAULT.equals(getGradient()); + case NotationPackage.SHAPE__LINE_COLOR: + return getLineColor() != LINE_COLOR_EDEFAULT; + case NotationPackage.SHAPE__LINE_WIDTH: + return getLineWidth() != LINE_WIDTH_EDEFAULT; + case NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS: + return getRoundedBendpointsRadius() != ROUNDED_BENDPOINTS_RADIUS_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Style.class) + { + switch (derivedFeatureID) + { + default: + return -1; + } + } + if (baseClass == FontStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE__FONT_COLOR: + return NotationPackage.FONT_STYLE__FONT_COLOR; + case NotationPackage.SHAPE__FONT_NAME: + return NotationPackage.FONT_STYLE__FONT_NAME; + case NotationPackage.SHAPE__FONT_HEIGHT: + return NotationPackage.FONT_STYLE__FONT_HEIGHT; + case NotationPackage.SHAPE__BOLD: + return NotationPackage.FONT_STYLE__BOLD; + case NotationPackage.SHAPE__ITALIC: + return NotationPackage.FONT_STYLE__ITALIC; + case NotationPackage.SHAPE__UNDERLINE: + return NotationPackage.FONT_STYLE__UNDERLINE; + case NotationPackage.SHAPE__STRIKE_THROUGH: + return NotationPackage.FONT_STYLE__STRIKE_THROUGH; + default: + return -1; + } + } + if (baseClass == DescriptionStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE__DESCRIPTION: + return NotationPackage.DESCRIPTION_STYLE__DESCRIPTION; + default: + return -1; + } + } + if (baseClass == FillStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE__FILL_COLOR: + return NotationPackage.FILL_STYLE__FILL_COLOR; + case NotationPackage.SHAPE__TRANSPARENCY: + return NotationPackage.FILL_STYLE__TRANSPARENCY; + case NotationPackage.SHAPE__GRADIENT: + return NotationPackage.FILL_STYLE__GRADIENT; + default: + return -1; + } + } + if (baseClass == LineStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE__LINE_COLOR: + return NotationPackage.LINE_STYLE__LINE_COLOR; + case NotationPackage.SHAPE__LINE_WIDTH: + return NotationPackage.LINE_STYLE__LINE_WIDTH; + default: + return -1; + } + } + if (baseClass == RoundedCornersStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS: + return NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS; + default: + return -1; + } + } + if (baseClass == ShapeStyle.class) + { + switch (derivedFeatureID) + { + 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 == Style.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + if (baseClass == FontStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.FONT_STYLE__FONT_COLOR: + return NotationPackage.SHAPE__FONT_COLOR; + case NotationPackage.FONT_STYLE__FONT_NAME: + return NotationPackage.SHAPE__FONT_NAME; + case NotationPackage.FONT_STYLE__FONT_HEIGHT: + return NotationPackage.SHAPE__FONT_HEIGHT; + case NotationPackage.FONT_STYLE__BOLD: + return NotationPackage.SHAPE__BOLD; + case NotationPackage.FONT_STYLE__ITALIC: + return NotationPackage.SHAPE__ITALIC; + case NotationPackage.FONT_STYLE__UNDERLINE: + return NotationPackage.SHAPE__UNDERLINE; + case NotationPackage.FONT_STYLE__STRIKE_THROUGH: + return NotationPackage.SHAPE__STRIKE_THROUGH; + default: + return -1; + } + } + if (baseClass == DescriptionStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + return NotationPackage.SHAPE__DESCRIPTION; + default: + return -1; + } + } + if (baseClass == FillStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.FILL_STYLE__FILL_COLOR: + return NotationPackage.SHAPE__FILL_COLOR; + case NotationPackage.FILL_STYLE__TRANSPARENCY: + return NotationPackage.SHAPE__TRANSPARENCY; + case NotationPackage.FILL_STYLE__GRADIENT: + return NotationPackage.SHAPE__GRADIENT; + default: + return -1; + } + } + if (baseClass == LineStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + return NotationPackage.SHAPE__LINE_COLOR; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + return NotationPackage.SHAPE__LINE_WIDTH; + default: + return -1; + } + } + if (baseClass == RoundedCornersStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return NotationPackage.SHAPE__ROUNDED_BENDPOINTS_RADIUS; + default: + return -1; + } + } + if (baseClass == ShapeStyle.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // ShapeImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ShapeStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ShapeStyleImpl.java new file mode 100644 index 0000000000..7c7a9a0352 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ShapeStyleImpl.java @@ -0,0 +1,603 @@ +/****************************************************************************** + * Copyright (c) 2004, 2010 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.FillStyle; +import org.eclipse.gmf.runtime.notation.LineStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.RoundedCornersStyle; +import org.eclipse.gmf.runtime.notation.ShapeStyle; +import org.eclipse.gmf.runtime.notation.datatype.GradientData; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Shape Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getDescription <em>Description</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getFillColor <em>Fill Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getTransparency <em>Transparency</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getGradient <em>Gradient</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getLineColor <em>Line Color</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getLineWidth <em>Line Width</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl#getRoundedBendpointsRadius <em>Rounded Bendpoints Radius</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class ShapeStyleImpl extends FontStyleImpl implements ShapeStyle +{ + + /** + * 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 = ""; //$NON-NLS-1$ + + /** + * The default value of the '{@link #getFillColor() <em>Fill Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFillColor() + * @generated + * @ordered + */ + protected static final int FILL_COLOR_EDEFAULT = 16777215; + + /** + * The default value of the '{@link #getTransparency() <em>Transparency</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTransparency() + * @generated + * @ordered + */ + protected static final int TRANSPARENCY_EDEFAULT = -1; + + /** + * The default value of the '{@link #getGradient() <em>Gradient</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGradient() + * @generated + * @ordered + */ + protected static final GradientData GRADIENT_EDEFAULT = null; + + /** + * The default value of the '{@link #getLineColor() <em>Line Color</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineColor() + * @generated + * @ordered + */ + protected static final int LINE_COLOR_EDEFAULT = 11579568; + + /** + * The default value of the '{@link #getLineWidth() <em>Line Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLineWidth() + * @generated + * @ordered + */ + protected static final int LINE_WIDTH_EDEFAULT = -1; + + /** + * The default value of the '{@link #getRoundedBendpointsRadius() <em>Rounded Bendpoints Radius</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRoundedBendpointsRadius() + * @generated + * @ordered + */ + protected static final int ROUNDED_BENDPOINTS_RADIUS_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ShapeStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.SHAPE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + @Override + public void setFontName(String newFontName) + { + setFontNameGen(newFontName == null ? null : newFontName.intern()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() + { + return (String)eDynamicGet(NotationPackage.SHAPE_STYLE__DESCRIPTION, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__DESCRIPTION, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, newDescription); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFillColor() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE_STYLE__FILL_COLOR, NotationPackage.Literals.FILL_STYLE__FILL_COLOR, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFillColor(int newFillColor) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__FILL_COLOR, NotationPackage.Literals.FILL_STYLE__FILL_COLOR, new Integer(newFillColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getTransparency() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE_STYLE__TRANSPARENCY, NotationPackage.Literals.FILL_STYLE__TRANSPARENCY, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTransparency(int newTransparency) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__TRANSPARENCY, NotationPackage.Literals.FILL_STYLE__TRANSPARENCY, new Integer(newTransparency)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GradientData getGradient() + { + return (GradientData)eDynamicGet(NotationPackage.SHAPE_STYLE__GRADIENT, NotationPackage.Literals.FILL_STYLE__GRADIENT, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setGradient(GradientData newGradient) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__GRADIENT, NotationPackage.Literals.FILL_STYLE__GRADIENT, newGradient); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineColor() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE_STYLE__LINE_COLOR, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineColor(int newLineColor) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__LINE_COLOR, NotationPackage.Literals.LINE_STYLE__LINE_COLOR, new Integer(newLineColor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getLineWidth() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE_STYLE__LINE_WIDTH, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLineWidth(int newLineWidth) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__LINE_WIDTH, NotationPackage.Literals.LINE_STYLE__LINE_WIDTH, new Integer(newLineWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getRoundedBendpointsRadius() + { + return ((Integer)eDynamicGet(NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS, + NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRoundedBendpointsRadius(int newRoundedBendpointsRadius) + { + eDynamicSet(NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS, NotationPackage.Literals.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS, + new Integer(newRoundedBendpointsRadius)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.SHAPE_STYLE__FONT_COLOR: + return new Integer(getFontColor()); + case NotationPackage.SHAPE_STYLE__FONT_NAME: + return getFontName(); + case NotationPackage.SHAPE_STYLE__FONT_HEIGHT: + return new Integer(getFontHeight()); + case NotationPackage.SHAPE_STYLE__BOLD: + return isBold() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE_STYLE__ITALIC: + return isItalic() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE_STYLE__UNDERLINE: + return isUnderline() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE_STYLE__STRIKE_THROUGH: + return isStrikeThrough() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.SHAPE_STYLE__DESCRIPTION: + return getDescription(); + case NotationPackage.SHAPE_STYLE__FILL_COLOR: + return new Integer(getFillColor()); + case NotationPackage.SHAPE_STYLE__TRANSPARENCY: + return new Integer(getTransparency()); + case NotationPackage.SHAPE_STYLE__GRADIENT: + return getGradient(); + case NotationPackage.SHAPE_STYLE__LINE_COLOR: + return new Integer(getLineColor()); + case NotationPackage.SHAPE_STYLE__LINE_WIDTH: + return new Integer(getLineWidth()); + case NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return new Integer(getRoundedBendpointsRadius()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SHAPE_STYLE__FONT_COLOR: + setFontColor(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE_STYLE__FONT_NAME: + setFontName((String)newValue); + return; + case NotationPackage.SHAPE_STYLE__FONT_HEIGHT: + setFontHeight(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE_STYLE__BOLD: + setBold(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE_STYLE__ITALIC: + setItalic(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE_STYLE__UNDERLINE: + setUnderline(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE_STYLE__STRIKE_THROUGH: + setStrikeThrough(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.SHAPE_STYLE__DESCRIPTION: + setDescription((String)newValue); + return; + case NotationPackage.SHAPE_STYLE__FILL_COLOR: + setFillColor(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE_STYLE__TRANSPARENCY: + setTransparency(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE_STYLE__GRADIENT: + setGradient((GradientData)newValue); + return; + case NotationPackage.SHAPE_STYLE__LINE_COLOR: + setLineColor(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE_STYLE__LINE_WIDTH: + setLineWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.SHAPE_STYLE__FONT_COLOR: + setFontColor(FONT_COLOR_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__FONT_NAME: + setFontName(FONT_NAME_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__FONT_HEIGHT: + setFontHeight(FONT_HEIGHT_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__BOLD: + setBold(BOLD_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__ITALIC: + setItalic(ITALIC_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__UNDERLINE: + setUnderline(UNDERLINE_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__STRIKE_THROUGH: + setStrikeThrough(STRIKE_THROUGH_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__FILL_COLOR: + setFillColor(FILL_COLOR_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__TRANSPARENCY: + setTransparency(TRANSPARENCY_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__GRADIENT: + setGradient(GRADIENT_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__LINE_COLOR: + setLineColor(LINE_COLOR_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__LINE_WIDTH: + setLineWidth(LINE_WIDTH_EDEFAULT); + return; + case NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS: + setRoundedBendpointsRadius(ROUNDED_BENDPOINTS_RADIUS_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.SHAPE_STYLE__FONT_COLOR: + return getFontColor() != FONT_COLOR_EDEFAULT; + case NotationPackage.SHAPE_STYLE__FONT_NAME: + return FONT_NAME_EDEFAULT == null ? getFontName() != null : !FONT_NAME_EDEFAULT.equals(getFontName()); + case NotationPackage.SHAPE_STYLE__FONT_HEIGHT: + return getFontHeight() != FONT_HEIGHT_EDEFAULT; + case NotationPackage.SHAPE_STYLE__BOLD: + return isBold() != BOLD_EDEFAULT; + case NotationPackage.SHAPE_STYLE__ITALIC: + return isItalic() != ITALIC_EDEFAULT; + case NotationPackage.SHAPE_STYLE__UNDERLINE: + return isUnderline() != UNDERLINE_EDEFAULT; + case NotationPackage.SHAPE_STYLE__STRIKE_THROUGH: + return isStrikeThrough() != STRIKE_THROUGH_EDEFAULT; + case NotationPackage.SHAPE_STYLE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? getDescription() != null : !DESCRIPTION_EDEFAULT.equals(getDescription()); + case NotationPackage.SHAPE_STYLE__FILL_COLOR: + return getFillColor() != FILL_COLOR_EDEFAULT; + case NotationPackage.SHAPE_STYLE__TRANSPARENCY: + return getTransparency() != TRANSPARENCY_EDEFAULT; + case NotationPackage.SHAPE_STYLE__GRADIENT: + return GRADIENT_EDEFAULT == null ? getGradient() != null : !GRADIENT_EDEFAULT.equals(getGradient()); + case NotationPackage.SHAPE_STYLE__LINE_COLOR: + return getLineColor() != LINE_COLOR_EDEFAULT; + case NotationPackage.SHAPE_STYLE__LINE_WIDTH: + return getLineWidth() != LINE_WIDTH_EDEFAULT; + case NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return getRoundedBendpointsRadius() != ROUNDED_BENDPOINTS_RADIUS_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == DescriptionStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE_STYLE__DESCRIPTION: + return NotationPackage.DESCRIPTION_STYLE__DESCRIPTION; + default: + return -1; + } + } + if (baseClass == FillStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE_STYLE__FILL_COLOR: + return NotationPackage.FILL_STYLE__FILL_COLOR; + case NotationPackage.SHAPE_STYLE__TRANSPARENCY: + return NotationPackage.FILL_STYLE__TRANSPARENCY; + case NotationPackage.SHAPE_STYLE__GRADIENT: + return NotationPackage.FILL_STYLE__GRADIENT; + default: + return -1; + } + } + if (baseClass == LineStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE_STYLE__LINE_COLOR: + return NotationPackage.LINE_STYLE__LINE_COLOR; + case NotationPackage.SHAPE_STYLE__LINE_WIDTH: + return NotationPackage.LINE_STYLE__LINE_WIDTH; + default: + return -1; + } + } + if (baseClass == RoundedCornersStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS; + 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 == DescriptionStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + return NotationPackage.SHAPE_STYLE__DESCRIPTION; + default: + return -1; + } + } + if (baseClass == FillStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.FILL_STYLE__FILL_COLOR: + return NotationPackage.SHAPE_STYLE__FILL_COLOR; + case NotationPackage.FILL_STYLE__TRANSPARENCY: + return NotationPackage.SHAPE_STYLE__TRANSPARENCY; + case NotationPackage.FILL_STYLE__GRADIENT: + return NotationPackage.SHAPE_STYLE__GRADIENT; + default: + return -1; + } + } + if (baseClass == LineStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.LINE_STYLE__LINE_COLOR: + return NotationPackage.SHAPE_STYLE__LINE_COLOR; + case NotationPackage.LINE_STYLE__LINE_WIDTH: + return NotationPackage.SHAPE_STYLE__LINE_WIDTH; + default: + return -1; + } + } + if (baseClass == RoundedCornersStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.ROUNDED_CORNERS_STYLE__ROUNDED_BENDPOINTS_RADIUS: + return NotationPackage.SHAPE_STYLE__ROUNDED_BENDPOINTS_RADIUS; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // ShapeStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SingleValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SingleValueStyleImpl.java new file mode 100644 index 0000000000..915051b2a2 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SingleValueStyleImpl.java @@ -0,0 +1,218 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.SingleValueStyle; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Single Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SingleValueStyleImpl#getRawValue <em>Raw Value</em>}</li> + * </ul> + * + * @generated + */ +public class SingleValueStyleImpl extends DataTypeStyleImpl implements SingleValueStyle +{ + /** + * The default value of the '{@link #getRawValue() <em>Raw Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRawValue() + * @generated + * @ordered + */ + protected static final String RAW_VALUE_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SingleValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.SINGLE_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getRawValue() + { + return (String)eDynamicGet(NotationPackage.SINGLE_VALUE_STYLE__RAW_VALUE, NotationPackage.Literals.SINGLE_VALUE_STYLE__RAW_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setRawValue(String newRawValue) + { + if (getInstanceType() != null) + { + try + { + getObjectFromString(newRawValue); + } + catch (Exception e) + { + throw new IllegalArgumentException("Value <" + newRawValue//$NON-NLS-1$ + + "> cannot be associated with Data type <"//$NON-NLS-1$ + + getInstanceType().toString() + ">: " + e.getMessage());//$NON-NLS-1$ + } + } + setRawValueGen(newRawValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRawValueGen(String newRawValue) + { + eDynamicSet(NotationPackage.SINGLE_VALUE_STYLE__RAW_VALUE, NotationPackage.Literals.SINGLE_VALUE_STYLE__RAW_VALUE, newRawValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Object getValue() + { + return getObjectFromString(getRawValue()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setValue(Object newValue) + { + setRawValue(getStringFromObject(newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.SINGLE_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.SINGLE_VALUE_STYLE__INSTANCE_TYPE: + if (resolve) + { + return getInstanceType(); + } + return basicGetInstanceType(); + case NotationPackage.SINGLE_VALUE_STYLE__RAW_VALUE: + return getRawValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SINGLE_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.SINGLE_VALUE_STYLE__INSTANCE_TYPE: + setInstanceType((EDataType)newValue); + return; + case NotationPackage.SINGLE_VALUE_STYLE__RAW_VALUE: + setRawValue((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.SINGLE_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.SINGLE_VALUE_STYLE__INSTANCE_TYPE: + setInstanceType((EDataType)null); + return; + case NotationPackage.SINGLE_VALUE_STYLE__RAW_VALUE: + setRawValue(RAW_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.SINGLE_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.SINGLE_VALUE_STYLE__INSTANCE_TYPE: + return basicGetInstanceType() != null; + case NotationPackage.SINGLE_VALUE_STYLE__RAW_VALUE: + return RAW_VALUE_EDEFAULT == null ? getRawValue() != null : !RAW_VALUE_EDEFAULT.equals(getRawValue()); + } + return eDynamicIsSet(featureID); + } + +} // SingleValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SizeImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SizeImpl.java new file mode 100644 index 0000000000..198c3b205c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SizeImpl.java @@ -0,0 +1,208 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Size; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Size</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SizeImpl#getWidth <em>Width</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SizeImpl#getHeight <em>Height</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class SizeImpl extends CDOObjectImpl implements Size +{ + /** + * The default value of the '{@link #getWidth() <em>Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getWidth() + * @generated + * @ordered + */ + protected static final int WIDTH_EDEFAULT = -1; + + /** + * The default value of the '{@link #getHeight() <em>Height</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getHeight() + * @generated + * @ordered + */ + protected static final int HEIGHT_EDEFAULT = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SizeImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.SIZE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getWidth() + { + return ((Integer)eDynamicGet(NotationPackage.SIZE__WIDTH, NotationPackage.Literals.SIZE__WIDTH, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setWidth(int newWidth) + { + eDynamicSet(NotationPackage.SIZE__WIDTH, NotationPackage.Literals.SIZE__WIDTH, new Integer(newWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getHeight() + { + return ((Integer)eDynamicGet(NotationPackage.SIZE__HEIGHT, NotationPackage.Literals.SIZE__HEIGHT, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setHeight(int newHeight) + { + eDynamicSet(NotationPackage.SIZE__HEIGHT, NotationPackage.Literals.SIZE__HEIGHT, new Integer(newHeight)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.SIZE__WIDTH: + return new Integer(getWidth()); + case NotationPackage.SIZE__HEIGHT: + return new Integer(getHeight()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SIZE__WIDTH: + setWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.SIZE__HEIGHT: + setHeight(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.SIZE__WIDTH: + setWidth(WIDTH_EDEFAULT); + return; + case NotationPackage.SIZE__HEIGHT: + setHeight(HEIGHT_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.SIZE__WIDTH: + return getWidth() != WIDTH_EDEFAULT; + case NotationPackage.SIZE__HEIGHT: + return getHeight() != HEIGHT_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // SizeImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SortingStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SortingStyleImpl.java new file mode 100644 index 0000000000..21a61fa2f0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/SortingStyleImpl.java @@ -0,0 +1,286 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Sorting; +import org.eclipse.gmf.runtime.notation.SortingDirection; +import org.eclipse.gmf.runtime.notation.SortingStyle; + +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Sorting Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SortingStyleImpl#getSorting <em>Sorting</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SortingStyleImpl#getSortingKeys <em>Sorting Keys</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.SortingStyleImpl#getSortedObjects <em>Sorted Objects</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class SortingStyleImpl extends CDOObjectImpl implements SortingStyle +{ + /** + * The default value of the '{@link #getSorting() <em>Sorting</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSorting() + * @generated + * @ordered + */ + protected static final Sorting SORTING_EDEFAULT = Sorting.NONE_LITERAL; + + /** + * The default value of the '{@link #getSortingKeys() <em>Sorting Keys</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSortingKeys() + * @generated NOT + * @ordered + */ + protected static final Map SORTING_KEYS_EDEFAULT = Collections.EMPTY_MAP; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SortingStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.SORTING_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Sorting getSorting() + { + return (Sorting)eDynamicGet(NotationPackage.SORTING_STYLE__SORTING, NotationPackage.Literals.SORTING_STYLE__SORTING, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSorting(Sorting newSorting) + { + eDynamicSet(NotationPackage.SORTING_STYLE__SORTING, NotationPackage.Literals.SORTING_STYLE__SORTING, newSorting); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public Map getSortingKeys() + { + return Collections.unmodifiableMap(getSortingKeysGen()); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Map getSortingKeysGen() + { + return (Map)eDynamicGet(NotationPackage.SORTING_STYLE__SORTING_KEYS, NotationPackage.Literals.SORTING_STYLE__SORTING_KEYS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public void setSortingKeys(Map newSortingKeys) + { + if (newSortingKeys == null) + { + throw new NullPointerException("the 'newSortingKeys' parameter is null"); //$NON-NLS-1$ + } + + if (newSortingKeys.isEmpty()) + { + setSortingKeysGen(SORTING_KEYS_EDEFAULT); + } + else + { + Map tempMap = new LinkedHashMap(newSortingKeys.size()); + for (Iterator i = newSortingKeys.keySet().iterator(); i.hasNext();) + { + Object key = i.next(); + if (!(key instanceof String)) + { + throw new IllegalArgumentException("One or more keys in the map is not of type java.lang.String"); //$NON-NLS-1$ + } + Object value = newSortingKeys.get(key); + if (!(value instanceof SortingDirection)) + { + throw new IllegalArgumentException("One or more values in the map is not of type org.eclipse.gmf.runtime.notation.SortingDirection"); //$NON-NLS-1$ + } + tempMap.put(key, value); + } + setSortingKeysGen(tempMap); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSortingKeysGen(Map newSortingKeys) + { + eDynamicSet(NotationPackage.SORTING_STYLE__SORTING_KEYS, NotationPackage.Literals.SORTING_STYLE__SORTING_KEYS, newSortingKeys); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getSortedObjects() + { + return (EList)eDynamicGet(NotationPackage.SORTING_STYLE__SORTED_OBJECTS, NotationPackage.Literals.SORTING_STYLE__SORTED_OBJECTS, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.SORTING_STYLE__SORTING: + return getSorting(); + case NotationPackage.SORTING_STYLE__SORTING_KEYS: + return getSortingKeys(); + case NotationPackage.SORTING_STYLE__SORTED_OBJECTS: + return getSortedObjects(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.SORTING_STYLE__SORTING: + setSorting((Sorting)newValue); + return; + case NotationPackage.SORTING_STYLE__SORTING_KEYS: + setSortingKeys((Map)newValue); + return; + case NotationPackage.SORTING_STYLE__SORTED_OBJECTS: + getSortedObjects().clear(); + getSortedObjects().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.SORTING_STYLE__SORTING: + setSorting(SORTING_EDEFAULT); + return; + case NotationPackage.SORTING_STYLE__SORTING_KEYS: + setSortingKeys(SORTING_KEYS_EDEFAULT); + return; + case NotationPackage.SORTING_STYLE__SORTED_OBJECTS: + getSortedObjects().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.SORTING_STYLE__SORTING: + return getSorting() != SORTING_EDEFAULT; + case NotationPackage.SORTING_STYLE__SORTING_KEYS: + return SORTING_KEYS_EDEFAULT == null ? getSortingKeys() != null : !SORTING_KEYS_EDEFAULT.equals(getSortingKeys()); + case NotationPackage.SORTING_STYLE__SORTED_OBJECTS: + return !getSortedObjects().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // SortingStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StandardDiagramImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StandardDiagramImpl.java new file mode 100644 index 0000000000..1cd7cf33b8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StandardDiagramImpl.java @@ -0,0 +1,704 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +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.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.DescriptionStyle; +import org.eclipse.gmf.runtime.notation.DiagramStyle; +import org.eclipse.gmf.runtime.notation.GuideStyle; +import org.eclipse.gmf.runtime.notation.MeasurementUnit; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PageStyle; +import org.eclipse.gmf.runtime.notation.StandardDiagram; +import org.eclipse.gmf.runtime.notation.Style; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Standard Diagram</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getPageX <em>Page X</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getPageY <em>Page Y</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getPageWidth <em>Page Width</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getPageHeight <em>Page Height</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getHorizontalGuides <em>Horizontal Guides</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getVerticalGuides <em>Vertical Guides</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl#getDescription <em>Description</em>}</li> + * </ul> + * + * @generated + */ +public class StandardDiagramImpl extends DiagramImpl implements StandardDiagram +{ + /** + * The default value of the '{@link #getPageX() <em>Page X</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageX() + * @generated + * @ordered + */ + protected static final int PAGE_X_EDEFAULT = 0; + + /** + * The default value of the '{@link #getPageY() <em>Page Y</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageY() + * @generated + * @ordered + */ + protected static final int PAGE_Y_EDEFAULT = 0; + + /** + * The default value of the '{@link #getPageWidth() <em>Page Width</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageWidth() + * @generated + * @ordered + */ + protected static final int PAGE_WIDTH_EDEFAULT = 100; + + /** + * The default value of the '{@link #getPageHeight() <em>Page Height</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPageHeight() + * @generated + * @ordered + */ + protected static final int PAGE_HEIGHT_EDEFAULT = 100; + + /** + * 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 = ""; //$NON-NLS-1$ + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StandardDiagramImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.STANDARD_DIAGRAM; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageX() + { + return ((Integer)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__PAGE_X - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_X, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageX(int newPageX) + { + eDynamicSet(NotationPackage.STANDARD_DIAGRAM__PAGE_X - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_X, new Integer(newPageX)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageY() + { + return ((Integer)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__PAGE_Y - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_Y, true, true)) + .intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageY(int newPageY) + { + eDynamicSet(NotationPackage.STANDARD_DIAGRAM__PAGE_Y - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_Y, new Integer(newPageY)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageWidth() + { + return ((Integer)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_WIDTH, true, + true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageWidth(int newPageWidth) + { + eDynamicSet(NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_WIDTH, + new Integer(newPageWidth)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getPageHeight() + { + return ((Integer)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_HEIGHT, true, + true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPageHeight(int newPageHeight) + { + eDynamicSet(NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.PAGE_STYLE__PAGE_HEIGHT, + new Integer(newPageHeight)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getHorizontalGuides() + { + return (EList)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES - ESTATIC_FEATURE_COUNT, + NotationPackage.Literals.GUIDE_STYLE__HORIZONTAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getVerticalGuides() + { + return (EList)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.GUIDE_STYLE__VERTICAL_GUIDES, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() + { + return (String)eDynamicGet(NotationPackage.STANDARD_DIAGRAM__DESCRIPTION - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) + { + eDynamicSet(NotationPackage.STANDARD_DIAGRAM__DESCRIPTION - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.DESCRIPTION_STYLE__DESCRIPTION, newDescription); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.STANDARD_DIAGRAM__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_CHILDREN: + return ((InternalEList)getPersistedChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__STYLES: + return ((InternalEList)getStyles()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_CHILDREN: + return ((InternalEList)getTransientChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_EDGES: + return ((InternalEList)getPersistedEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_EDGES: + return ((InternalEList)getTransientEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES: + return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); + case NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES: + return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.STANDARD_DIAGRAM__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.STANDARD_DIAGRAM__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.STANDARD_DIAGRAM__TYPE: + return getType(); + case NotationPackage.STANDARD_DIAGRAM__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.STANDARD_DIAGRAM__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.STANDARD_DIAGRAM__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.STANDARD_DIAGRAM__STYLES: + return getStyles(); + case NotationPackage.STANDARD_DIAGRAM__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.STANDARD_DIAGRAM__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_CHILDREN: + return getTransientChildren(); + case NotationPackage.STANDARD_DIAGRAM__NAME: + return getName(); + case NotationPackage.STANDARD_DIAGRAM__MEASUREMENT_UNIT: + return getMeasurementUnit(); + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_EDGES: + return getPersistedEdges(); + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_EDGES: + return getTransientEdges(); + case NotationPackage.STANDARD_DIAGRAM__PAGE_X: + return new Integer(getPageX()); + case NotationPackage.STANDARD_DIAGRAM__PAGE_Y: + return new Integer(getPageY()); + case NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH: + return new Integer(getPageWidth()); + case NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT: + return new Integer(getPageHeight()); + case NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES: + return getHorizontalGuides(); + case NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES: + return getVerticalGuides(); + case NotationPackage.STANDARD_DIAGRAM__DESCRIPTION: + return getDescription(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.STANDARD_DIAGRAM__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.STANDARD_DIAGRAM__TYPE: + setType((String)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.STANDARD_DIAGRAM__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__NAME: + setName((String)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__MEASUREMENT_UNIT: + setMeasurementUnit((MeasurementUnit)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_EDGES: + getPersistedEdges().clear(); + getPersistedEdges().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_EDGES: + getTransientEdges().clear(); + getTransientEdges().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_X: + setPageX(((Integer)newValue).intValue()); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_Y: + setPageY(((Integer)newValue).intValue()); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH: + setPageWidth(((Integer)newValue).intValue()); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT: + setPageHeight(((Integer)newValue).intValue()); + return; + case NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + getHorizontalGuides().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES: + getVerticalGuides().clear(); + getVerticalGuides().addAll((Collection)newValue); + return; + case NotationPackage.STANDARD_DIAGRAM__DESCRIPTION: + setDescription((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.STANDARD_DIAGRAM__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__STYLES: + getStyles().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__ELEMENT: + unsetElement(); + return; + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__MEASUREMENT_UNIT: + unsetMeasurementUnit(); + return; + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_EDGES: + getPersistedEdges().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_EDGES: + getTransientEdges().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_X: + setPageX(PAGE_X_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_Y: + setPageY(PAGE_Y_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH: + setPageWidth(PAGE_WIDTH_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT: + setPageHeight(PAGE_HEIGHT_EDEFAULT); + return; + case NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES: + getVerticalGuides().clear(); + return; + case NotationPackage.STANDARD_DIAGRAM__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.STANDARD_DIAGRAM__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.STANDARD_DIAGRAM__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.STANDARD_DIAGRAM__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.STANDARD_DIAGRAM__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__ELEMENT: + return isSetElement(); + case NotationPackage.STANDARD_DIAGRAM__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.STANDARD_DIAGRAM__MEASUREMENT_UNIT: + return isSetMeasurementUnit(); + case NotationPackage.STANDARD_DIAGRAM__PERSISTED_EDGES: + return !getPersistedEdges().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__TRANSIENT_EDGES: + return !getTransientEdges().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__PAGE_X: + return getPageX() != PAGE_X_EDEFAULT; + case NotationPackage.STANDARD_DIAGRAM__PAGE_Y: + return getPageY() != PAGE_Y_EDEFAULT; + case NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH: + return getPageWidth() != PAGE_WIDTH_EDEFAULT; + case NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT: + return getPageHeight() != PAGE_HEIGHT_EDEFAULT; + case NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES: + return !getHorizontalGuides().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES: + return !getVerticalGuides().isEmpty(); + case NotationPackage.STANDARD_DIAGRAM__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? getDescription() != null : !DESCRIPTION_EDEFAULT.equals(getDescription()); + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Style.class) + { + switch (derivedFeatureID) + { + default: + return -1; + } + } + if (baseClass == PageStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.STANDARD_DIAGRAM__PAGE_X: + return NotationPackage.PAGE_STYLE__PAGE_X; + case NotationPackage.STANDARD_DIAGRAM__PAGE_Y: + return NotationPackage.PAGE_STYLE__PAGE_Y; + case NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH: + return NotationPackage.PAGE_STYLE__PAGE_WIDTH; + case NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT: + return NotationPackage.PAGE_STYLE__PAGE_HEIGHT; + default: + return -1; + } + } + if (baseClass == GuideStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES: + return NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES; + case NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES: + return NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES; + default: + return -1; + } + } + if (baseClass == DescriptionStyle.class) + { + switch (derivedFeatureID) + { + case NotationPackage.STANDARD_DIAGRAM__DESCRIPTION: + return NotationPackage.DESCRIPTION_STYLE__DESCRIPTION; + default: + return -1; + } + } + if (baseClass == DiagramStyle.class) + { + switch (derivedFeatureID) + { + 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 == Style.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + if (baseClass == PageStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.PAGE_STYLE__PAGE_X: + return NotationPackage.STANDARD_DIAGRAM__PAGE_X; + case NotationPackage.PAGE_STYLE__PAGE_Y: + return NotationPackage.STANDARD_DIAGRAM__PAGE_Y; + case NotationPackage.PAGE_STYLE__PAGE_WIDTH: + return NotationPackage.STANDARD_DIAGRAM__PAGE_WIDTH; + case NotationPackage.PAGE_STYLE__PAGE_HEIGHT: + return NotationPackage.STANDARD_DIAGRAM__PAGE_HEIGHT; + default: + return -1; + } + } + if (baseClass == GuideStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return NotationPackage.STANDARD_DIAGRAM__HORIZONTAL_GUIDES; + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return NotationPackage.STANDARD_DIAGRAM__VERTICAL_GUIDES; + default: + return -1; + } + } + if (baseClass == DescriptionStyle.class) + { + switch (baseFeatureID) + { + case NotationPackage.DESCRIPTION_STYLE__DESCRIPTION: + return NotationPackage.STANDARD_DIAGRAM__DESCRIPTION; + default: + return -1; + } + } + if (baseClass == DiagramStyle.class) + { + switch (baseFeatureID) + { + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // StandardDiagramImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringListValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringListValueStyleImpl.java new file mode 100644 index 0000000000..bd2806d5b0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringListValueStyleImpl.java @@ -0,0 +1,145 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.StringListValueStyle; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>String List Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StringListValueStyleImpl#getStringListValue <em>String List Value</em>}</li> + * </ul> + * + * @generated + */ +public class StringListValueStyleImpl extends NamedStyleImpl implements StringListValueStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StringListValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.STRING_LIST_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getStringListValue() + { + return (EList)eDynamicGet(NotationPackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE, NotationPackage.Literals.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE, + true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.STRING_LIST_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE: + return getStringListValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.STRING_LIST_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE: + getStringListValue().clear(); + getStringListValue().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.STRING_LIST_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE: + getStringListValue().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.STRING_LIST_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE: + return !getStringListValue().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // StringListValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringToPropertyValueMapEntryImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringToPropertyValueMapEntryImpl.java new file mode 100644 index 0000000000..9a4d026000 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringToPropertyValueMapEntryImpl.java @@ -0,0 +1,313 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.BasicEMap; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.PropertyValue; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>String To Property Value Map Entry</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StringToPropertyValueMapEntryImpl#getTypedKey <em>Key</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StringToPropertyValueMapEntryImpl#getTypedValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class StringToPropertyValueMapEntryImpl extends CDOObjectImpl implements BasicEMap.Entry +{ + /** + * The default value of the '{@link #getTypedKey() <em>Key</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTypedKey() + * @generated + * @ordered + */ + protected static final String KEY_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StringToPropertyValueMapEntryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.STRING_TO_PROPERTY_VALUE_MAP_ENTRY; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTypedKey() + { + return (String)eDynamicGet(NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY, NotationPackage.Literals.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY, true, + true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTypedKey(String newKey) + { + eDynamicSet(NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY, NotationPackage.Literals.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY, newKey); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public PropertyValue getTypedValue() + { + return (PropertyValue)eDynamicGet(NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE, + NotationPackage.Literals.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetTypedValue(PropertyValue newValue, NotificationChain msgs) + { + msgs = eDynamicInverseAdd((InternalEObject)newValue, NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTypedValue(PropertyValue newValue) + { + eDynamicSet(NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE, NotationPackage.Literals.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE: + return basicSetTypedValue(null, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY: + return getTypedKey(); + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE: + return getTypedValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY: + setTypedKey((String)newValue); + return; + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE: + setTypedValue((PropertyValue)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY: + setTypedKey(KEY_EDEFAULT); + return; + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE: + setTypedValue((PropertyValue)null); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__KEY: + return KEY_EDEFAULT == null ? getTypedKey() != null : !KEY_EDEFAULT.equals(getTypedKey()); + case NotationPackage.STRING_TO_PROPERTY_VALUE_MAP_ENTRY__VALUE: + return getTypedValue() != null; + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected int hash = -1; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getHash() + { + if (hash == -1) + { + Object theKey = getKey(); + hash = theKey == null ? 0 : theKey.hashCode(); + } + return hash; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setHash(int hash) + { + this.hash = hash; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getKey() + { + return getTypedKey(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setKey(Object key) + { + setTypedKey((String)key); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getValue() + { + return getTypedValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object setValue(Object value) + { + Object oldValue = getValue(); + setTypedValue((PropertyValue)value); + return oldValue; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EMap getEMap() + { + EObject container = eContainer(); + return container == null ? null : (EMap)container.eGet(eContainmentFeature()); + } + +} // StringToPropertyValueMapEntryImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringValueStyleImpl.java new file mode 100644 index 0000000000..023b393c31 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/StringValueStyleImpl.java @@ -0,0 +1,160 @@ +/****************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.StringValueStyle; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>String Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.StringValueStyleImpl#getStringValue <em>String Value</em>}</li> + * </ul> + * + * @generated + */ +public class StringValueStyleImpl extends NamedStyleImpl implements StringValueStyle +{ + /** + * The default value of the '{@link #getStringValue() <em>String Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStringValue() + * @generated + * @ordered + */ + protected static final String STRING_VALUE_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StringValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.STRING_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getStringValue() + { + return (String)eDynamicGet(NotationPackage.STRING_VALUE_STYLE__STRING_VALUE, NotationPackage.Literals.STRING_VALUE_STYLE__STRING_VALUE, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setStringValue(String newStringValue) + { + eDynamicSet(NotationPackage.STRING_VALUE_STYLE__STRING_VALUE, NotationPackage.Literals.STRING_VALUE_STYLE__STRING_VALUE, newStringValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.STRING_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.STRING_VALUE_STYLE__STRING_VALUE: + return getStringValue(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.STRING_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.STRING_VALUE_STYLE__STRING_VALUE: + setStringValue((String)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.STRING_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.STRING_VALUE_STYLE__STRING_VALUE: + setStringValue(STRING_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.STRING_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.STRING_VALUE_STYLE__STRING_VALUE: + return STRING_VALUE_EDEFAULT == null ? getStringValue() != null : !STRING_VALUE_EDEFAULT.equals(getStringValue()); + } + return eDynamicIsSet(featureID); + } + +} // StringValueStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/TextStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/TextStyleImpl.java new file mode 100644 index 0000000000..450c235f60 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/TextStyleImpl.java @@ -0,0 +1,164 @@ +/****************************************************************************** + * Copyright (c) 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.TextAlignment; +import org.eclipse.gmf.runtime.notation.TextStyle; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Text Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.TextStyleImpl#getTextAlignment <em>Text Alignment</em>}</li> + * </ul> + * + * @generated + */ +public class TextStyleImpl extends CDOObjectImpl implements TextStyle +{ + /** + * The default value of the '{@link #getTextAlignment() <em>Text Alignment</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTextAlignment() + * @generated + * @ordered + */ + protected static final TextAlignment TEXT_ALIGNMENT_EDEFAULT = TextAlignment.LEFT_LITERAL; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TextStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.TEXT_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TextAlignment getTextAlignment() + { + return (TextAlignment)eDynamicGet(NotationPackage.TEXT_STYLE__TEXT_ALIGNMENT, NotationPackage.Literals.TEXT_STYLE__TEXT_ALIGNMENT, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTextAlignment(TextAlignment newTextAlignment) + { + eDynamicSet(NotationPackage.TEXT_STYLE__TEXT_ALIGNMENT, NotationPackage.Literals.TEXT_STYLE__TEXT_ALIGNMENT, newTextAlignment); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.TEXT_STYLE__TEXT_ALIGNMENT: + return getTextAlignment(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.TEXT_STYLE__TEXT_ALIGNMENT: + setTextAlignment((TextAlignment)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.TEXT_STYLE__TEXT_ALIGNMENT: + setTextAlignment(TEXT_ALIGNMENT_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.TEXT_STYLE__TEXT_ALIGNMENT: + return getTextAlignment() != TEXT_ALIGNMENT_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // TextStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/TitleStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/TitleStyleImpl.java new file mode 100644 index 0000000000..49efd0bd10 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/TitleStyleImpl.java @@ -0,0 +1,167 @@ +/****************************************************************************** + * Copyright (c) 2004, 2006 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.TitleStyle; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Title Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.TitleStyleImpl#isShowTitle <em>Show Title</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy %partners + */ +public class TitleStyleImpl extends CDOObjectImpl implements TitleStyle +{ + /** + * The default value of the '{@link #isShowTitle() <em>Show Title</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isShowTitle() + * @generated + * @ordered + */ + protected static final boolean SHOW_TITLE_EDEFAULT = false; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TitleStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.TITLE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isShowTitle() + { + return ((Boolean)eDynamicGet(NotationPackage.TITLE_STYLE__SHOW_TITLE, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setShowTitle(boolean newShowTitle) + { + eDynamicSet(NotationPackage.TITLE_STYLE__SHOW_TITLE, NotationPackage.Literals.TITLE_STYLE__SHOW_TITLE, new Boolean(newShowTitle)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + return isShowTitle() ? Boolean.TRUE : Boolean.FALSE; + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + setShowTitle(((Boolean)newValue).booleanValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + setShowTitle(SHOW_TITLE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.TITLE_STYLE__SHOW_TITLE: + return isShowTitle() != SHOW_TITLE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // TitleStyleImpl diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ViewImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ViewImpl.java new file mode 100644 index 0000000000..5374eb7b5f --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/ViewImpl.java @@ -0,0 +1,759 @@ +/****************************************************************************** + * Copyright (c) 2004, 2009 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EContentsEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.NamedStyle; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.Style; +import org.eclipse.gmf.runtime.notation.View; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>View</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#isVisible <em>Visible</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getType <em>Type</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#isMutable <em>Mutable</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getSourceEdges <em>Source Edges</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getTargetEdges <em>Target Edges</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getPersistedChildren <em>Persisted Children</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getStyles <em>Styles</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getElement <em>Element</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getDiagram <em>Diagram</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.ViewImpl#getTransientChildren <em>Transient Children</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public abstract class ViewImpl extends org.eclipse.emf.cdo.ecore.impl.EModelElementImpl implements View +{ + + /** + * The default value of the '{@link #isVisible() <em>Visible</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isVisible() + * @generated + * @ordered + */ + protected static final boolean VISIBLE_EDEFAULT = true; + + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = ""; //$NON-NLS-1$ + + /** + * The default value of the '{@link #isMutable() <em>Mutable</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isMutable() + * @generated + * @ordered + */ + protected static final boolean MUTABLE_EDEFAULT = false; + + // EATM + // private EContentsEList allChildren = null; + + protected static final EStructuralFeature[] childrenFeatures = new EStructuralFeature[] { NotationPackage.Literals.VIEW__PERSISTED_CHILDREN, + NotationPackage.Literals.VIEW__TRANSIENT_CHILDREN }; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ViewImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.VIEW; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static final int ESTATIC_FEATURE_COUNT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return ESTATIC_FEATURE_COUNT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean isVisible() + { + return ((Boolean)eDynamicGet(NotationPackage.VIEW__VISIBLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__VISIBLE, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setVisible(boolean newVisible) + { + eDynamicSet(NotationPackage.VIEW__VISIBLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__VISIBLE, new Boolean(newVisible)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getType() + { + return (String)eDynamicGet(NotationPackage.VIEW__TYPE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TYPE, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public void setType(String newType) + { + setTypeGen(newType == null ? null : newType.intern()); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setTypeGen(String newType) + { + eDynamicSet(NotationPackage.VIEW__TYPE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TYPE, newType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean isMutable() + { + return ((Boolean)eDynamicGet(NotationPackage.VIEW__MUTABLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__MUTABLE, true, true)).booleanValue(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setMutable(boolean newMutable) + { + eDynamicSet(NotationPackage.VIEW__MUTABLE - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__MUTABLE, new Boolean(newMutable)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getSourceEdges() + { + return (EList)eDynamicGet(NotationPackage.VIEW__SOURCE_EDGES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__SOURCE_EDGES, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getTargetEdges() + { + return (EList)eDynamicGet(NotationPackage.VIEW__TARGET_EDGES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TARGET_EDGES, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getPersistedChildren() + { + return (EList)eDynamicGet(NotationPackage.VIEW__PERSISTED_CHILDREN - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__PERSISTED_CHILDREN, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public EList getChildren() + { + return new EContentsEList(this, childrenFeatures); + // if (allChildren == null) { + // allChildren = new EContentsEList(this, childrenFeatures); + // } + // return allChildren; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getStyles() + { + return (EList)eDynamicGet(NotationPackage.VIEW__STYLES - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__STYLES, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public EObject getElement() + { + if (!isSetElement()) + { + EObject container = eContainer(); + if (container instanceof View) + { + View view = (View)container; + return view.getElement(); + } + } + + return getElementGen(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EObject getElementGen() + { + return (EObject)eDynamicGet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EObject basicGetElement() + { + return (EObject)eDynamicGet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT, false, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setElement(EObject newElement) + { + eDynamicSet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT, newElement); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void unsetElement() + { + eDynamicUnset(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isSetElement() + { + return eDynamicIsSet(NotationPackage.VIEW__ELEMENT - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__ELEMENT); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Diagram getDiagram() + { + Diagram diagram = basicGetDiagram(); + return diagram != null && diagram.eIsProxy() ? (Diagram)eResolveProxy((InternalEObject)diagram) : diagram; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public Diagram basicGetDiagram() + { + for (EObject parent = this; parent != null; parent = ((InternalEObject)parent).eInternalContainer()) + { + if (NotationPackage.Literals.DIAGRAM.isSuperTypeOf(parent.eClass())) + { + return (Diagram)parent; + } + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList getTransientChildren() + { + return (EList)eDynamicGet(NotationPackage.VIEW__TRANSIENT_CHILDREN - ESTATIC_FEATURE_COUNT, NotationPackage.Literals.VIEW__TRANSIENT_CHILDREN, true, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public Style getStyle(EClass eClass) + { + if (eClass != null && NotationPackage.eINSTANCE.getStyle().isSuperTypeOf(eClass)) + { + if (eClass.isSuperTypeOf(eClass())) + { + return (Style)this; + } + if (eIsSet(NotationPackage.Literals.VIEW__STYLES)) + { + for (Iterator i = getStyles().iterator(); i.hasNext();) + { + Style style = (Style)i.next(); + if (style.eClass() == eClass || eClass.isInstance(style)) + { + return style; + } + } + } + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public Node createChild(EClass eClass) + { + Node newChild = (Node)eClass.getEPackage().getEFactoryInstance().create(eClass); + getPersistedChildren().add(newChild); + return newChild; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public Style createStyle(EClass eClass) + { + Style newStyle = (Style)eClass.getEPackage().getEFactoryInstance().create(eClass); + getStyles().add(newStyle); + return newStyle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public NamedStyle getNamedStyle(EClass eClass, String name) + { + if (eClass != null && eIsSet(NotationPackage.Literals.VIEW__STYLES) && NotationPackage.eINSTANCE.getNamedStyle().isSuperTypeOf(eClass)) + { + for (Iterator i = getStyles().iterator(); i.hasNext();) + { + Style style = (Style)i.next(); + if (style.eClass() == eClass || eClass.isInstance(style)) + { + if (style.eGet(NotationPackage.eINSTANCE.getNamedStyle_Name()).equals(name)) + { + return (NamedStyle)style; + } + } + } + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.VIEW__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicAdd(otherEnd, msgs); + case NotationPackage.VIEW__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicAdd(otherEnd, msgs); + case NotationPackage.VIEW__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicAdd(otherEnd, msgs); + } + return eDynamicInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.VIEW__EANNOTATIONS: + return ((InternalEList)getEAnnotations()).basicRemove(otherEnd, msgs); + case NotationPackage.VIEW__SOURCE_EDGES: + return ((InternalEList)getSourceEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.VIEW__TARGET_EDGES: + return ((InternalEList)getTargetEdges()).basicRemove(otherEnd, msgs); + case NotationPackage.VIEW__PERSISTED_CHILDREN: + return ((InternalEList)getPersistedChildren()).basicRemove(otherEnd, msgs); + case NotationPackage.VIEW__STYLES: + return ((InternalEList)getStyles()).basicRemove(otherEnd, msgs); + case NotationPackage.VIEW__TRANSIENT_CHILDREN: + return ((InternalEList)getTransientChildren()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.VIEW__EANNOTATIONS: + return getEAnnotations(); + case NotationPackage.VIEW__VISIBLE: + return isVisible() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.VIEW__TYPE: + return getType(); + case NotationPackage.VIEW__MUTABLE: + return isMutable() ? Boolean.TRUE : Boolean.FALSE; + case NotationPackage.VIEW__SOURCE_EDGES: + return getSourceEdges(); + case NotationPackage.VIEW__TARGET_EDGES: + return getTargetEdges(); + case NotationPackage.VIEW__PERSISTED_CHILDREN: + return getPersistedChildren(); + case NotationPackage.VIEW__STYLES: + return getStyles(); + case NotationPackage.VIEW__ELEMENT: + if (resolve) + { + return getElement(); + } + return basicGetElement(); + case NotationPackage.VIEW__DIAGRAM: + if (resolve) + { + return getDiagram(); + } + return basicGetDiagram(); + case NotationPackage.VIEW__TRANSIENT_CHILDREN: + return getTransientChildren(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.VIEW__EANNOTATIONS: + getEAnnotations().clear(); + getEAnnotations().addAll((Collection)newValue); + return; + case NotationPackage.VIEW__VISIBLE: + setVisible(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.VIEW__TYPE: + setType((String)newValue); + return; + case NotationPackage.VIEW__MUTABLE: + setMutable(((Boolean)newValue).booleanValue()); + return; + case NotationPackage.VIEW__SOURCE_EDGES: + getSourceEdges().clear(); + getSourceEdges().addAll((Collection)newValue); + return; + case NotationPackage.VIEW__TARGET_EDGES: + getTargetEdges().clear(); + getTargetEdges().addAll((Collection)newValue); + return; + case NotationPackage.VIEW__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + getPersistedChildren().addAll((Collection)newValue); + return; + case NotationPackage.VIEW__STYLES: + getStyles().clear(); + getStyles().addAll((Collection)newValue); + return; + case NotationPackage.VIEW__ELEMENT: + setElement((EObject)newValue); + return; + case NotationPackage.VIEW__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + getTransientChildren().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.VIEW__EANNOTATIONS: + getEAnnotations().clear(); + return; + case NotationPackage.VIEW__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case NotationPackage.VIEW__TYPE: + setType(TYPE_EDEFAULT); + return; + case NotationPackage.VIEW__MUTABLE: + setMutable(MUTABLE_EDEFAULT); + return; + case NotationPackage.VIEW__SOURCE_EDGES: + getSourceEdges().clear(); + return; + case NotationPackage.VIEW__TARGET_EDGES: + getTargetEdges().clear(); + return; + case NotationPackage.VIEW__PERSISTED_CHILDREN: + getPersistedChildren().clear(); + return; + case NotationPackage.VIEW__STYLES: + getStyles().clear(); + return; + case NotationPackage.VIEW__ELEMENT: + unsetElement(); + return; + case NotationPackage.VIEW__TRANSIENT_CHILDREN: + getTransientChildren().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.VIEW__EANNOTATIONS: + return !getEAnnotations().isEmpty(); + case NotationPackage.VIEW__VISIBLE: + return isVisible() != VISIBLE_EDEFAULT; + case NotationPackage.VIEW__TYPE: + return TYPE_EDEFAULT == null ? getType() != null : !TYPE_EDEFAULT.equals(getType()); + case NotationPackage.VIEW__MUTABLE: + return isMutable() != MUTABLE_EDEFAULT; + case NotationPackage.VIEW__SOURCE_EDGES: + return !getSourceEdges().isEmpty(); + case NotationPackage.VIEW__TARGET_EDGES: + return !getTargetEdges().isEmpty(); + case NotationPackage.VIEW__PERSISTED_CHILDREN: + return !getPersistedChildren().isEmpty(); + case NotationPackage.VIEW__STYLES: + return !getStyles().isEmpty(); + case NotationPackage.VIEW__ELEMENT: + return isSetElement(); + case NotationPackage.VIEW__DIAGRAM: + return basicGetDiagram() != null; + case NotationPackage.VIEW__TRANSIENT_CHILDREN: + return !getTransientChildren().isEmpty(); + } + return eDynamicIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void persistChildren() + { + if (eIsSet(NotationPackage.VIEW__TRANSIENT_CHILDREN)) + { + getPersistedChildren().addAll(getTransientChildren()); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void insertChild(View child) + { + persistChildren(); + getPersistedChildren().add(child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void insertChildAt(View child, int index) + { + persistChildren(); + if (getPersistedChildren().size() >= index) + { + getPersistedChildren().add(index, child); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void insertChild(View child, boolean persisted) + { + List children = null; + if (persisted) + { + children = getPersistedChildren(); + } + else + { + children = getTransientChildren(); + } + children.add(child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void removeChild(View child) + { + if (child.eContainer() == this) + { + EStructuralFeature eContainingFeature = child.eContainingFeature(); + if (eContainingFeature == NotationPackage.Literals.VIEW__TRANSIENT_CHILDREN) + { + getTransientChildren().remove(child); + } + else if (eContainingFeature == NotationPackage.Literals.VIEW__PERSISTED_CHILDREN) + { + getPersistedChildren().remove(child); + } + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public void persist() + { + EObject eContainer = eContainer(); + if (eContainer instanceof View) + { + EStructuralFeature eContaingFeature = eContainingFeature(); + if (eContaingFeature != null && eContaingFeature.isTransient()) + { + View vContainer = (View)eContainer; + vContainer.persistChildren(); + } + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + */ + public EList getVisibleChildren() + { + boolean persistedChildrenSet = eIsSet(NotationPackage.VIEW__PERSISTED_CHILDREN); + boolean transientChildrenSet = eIsSet(NotationPackage.VIEW__TRANSIENT_CHILDREN); + + if (persistedChildrenSet && transientChildrenSet) + { + return ECollections.EMPTY_ELIST; + } + + List _children = new ArrayList(); + if (persistedChildrenSet) + { + EList persistedChildren = getPersistedChildren(); + for (Iterator iter = persistedChildren.iterator(); iter.hasNext();) + { + View view = (View)iter.next(); + if (view.isVisible()) + { + _children.add(view); + } + } + } + + if (transientChildrenSet) + { + EList transientChildren = getTransientChildren(); + for (Iterator iter = transientChildren.iterator(); iter.hasNext();) + { + View view = (View)iter.next(); + if (view.isVisible()) + { + _children.add(view); + } + } + } + + return new BasicEList.UnmodifiableEList(_children.size(), _children.toArray()); + } + +} // ViewImpl |