| /** |
| * Copyright (c) 2013 CEA LIST. |
| * |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation |
| */ |
| package org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattableaxis.impl; |
| |
| import java.lang.reflect.InvocationTargetException; |
| |
| 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.papyrus.infra.nattable.model.cdo.nattable.nattablestyle.impl.StyledElementImpl; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureAxis; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Feature Axis</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattableaxis.impl.FeatureAxisImpl#getManager <em>Manager</em>}</li> |
| * <li>{@link org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattableaxis.impl.FeatureAxisImpl#getAlias <em>Alias</em>}</li> |
| * <li>{@link org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattableaxis.impl.FeatureAxisImpl#getLocalLabelConfiguration <em>Local Label Configuration</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class FeatureAxisImpl extends StyledElementImpl implements FeatureAxis { |
| |
| /** |
| * The default value of the '{@link #getAlias() <em>Alias</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAlias() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ALIAS_EDEFAULT = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected FeatureAxisImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return NattableaxisPackage.Literals.FEATURE_AXIS; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public AxisManagerRepresentation getManager() { |
| return (AxisManagerRepresentation)eDynamicGet(NattableaxisPackage.FEATURE_AXIS__MANAGER - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.IAXIS__MANAGER, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public AxisManagerRepresentation basicGetManager() { |
| return (AxisManagerRepresentation)eDynamicGet(NattableaxisPackage.FEATURE_AXIS__MANAGER - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.IAXIS__MANAGER, false, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setManager(AxisManagerRepresentation newManager) { |
| eDynamicSet(NattableaxisPackage.FEATURE_AXIS__MANAGER - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.IAXIS__MANAGER, newManager); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getAlias() { |
| return (String)eDynamicGet(NattableaxisPackage.FEATURE_AXIS__ALIAS - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.IAXIS__ALIAS, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setAlias(String newAlias) { |
| eDynamicSet(NattableaxisPackage.FEATURE_AXIS__ALIAS - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.IAXIS__ALIAS, newAlias); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public FeatureLabelProviderConfiguration getLocalLabelConfiguration() { |
| return (FeatureLabelProviderConfiguration)eDynamicGet(NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetLocalLabelConfiguration(FeatureLabelProviderConfiguration newLocalLabelConfiguration, NotificationChain msgs) { |
| msgs = eDynamicInverseAdd((InternalEObject)newLocalLabelConfiguration, NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION, msgs); |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setLocalLabelConfiguration(FeatureLabelProviderConfiguration newLocalLabelConfiguration) { |
| eDynamicSet(NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION, newLocalLabelConfiguration); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object getElement() { |
| // TODO: implement this method |
| // Ensure that you remove @generated or mark it @generated NOT |
| throw new UnsupportedOperationException(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION: |
| return basicSetLocalLabelConfiguration(null, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case NattableaxisPackage.FEATURE_AXIS__MANAGER: |
| if (resolve) return getManager(); |
| return basicGetManager(); |
| case NattableaxisPackage.FEATURE_AXIS__ALIAS: |
| return getAlias(); |
| case NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION: |
| return getLocalLabelConfiguration(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case NattableaxisPackage.FEATURE_AXIS__MANAGER: |
| setManager((AxisManagerRepresentation)newValue); |
| return; |
| case NattableaxisPackage.FEATURE_AXIS__ALIAS: |
| setAlias((String)newValue); |
| return; |
| case NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION: |
| setLocalLabelConfiguration((FeatureLabelProviderConfiguration)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case NattableaxisPackage.FEATURE_AXIS__MANAGER: |
| setManager((AxisManagerRepresentation)null); |
| return; |
| case NattableaxisPackage.FEATURE_AXIS__ALIAS: |
| setAlias(ALIAS_EDEFAULT); |
| return; |
| case NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION: |
| setLocalLabelConfiguration((FeatureLabelProviderConfiguration)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case NattableaxisPackage.FEATURE_AXIS__MANAGER: |
| return basicGetManager() != null; |
| case NattableaxisPackage.FEATURE_AXIS__ALIAS: |
| return ALIAS_EDEFAULT == null ? getAlias() != null : !ALIAS_EDEFAULT.equals(getAlias()); |
| case NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION: |
| return getLocalLabelConfiguration() != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { |
| switch (operationID) { |
| case NattableaxisPackage.FEATURE_AXIS___GET_ELEMENT: |
| return getElement(); |
| } |
| return super.eInvoke(operationID, arguments); |
| } |
| } // FeatureAxisImpl |