blob: 478d8b1923a73c6b1ff98a590b85a5c1443ce081 [file] [log] [blame]
/**
* 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 org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Feature Id 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.FeatureIdAxisImpl#getLocalLabelConfiguration <em>Local Label Configuration</em>}</li>
* </ul>
*
* @generated
*/
public class FeatureIdAxisImpl extends IdAxisImpl implements FeatureIdAxis {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FeatureIdAxisImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return NattableaxisPackage.Literals.FEATURE_ID_AXIS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FeatureLabelProviderConfiguration getLocalLabelConfiguration() {
return (FeatureLabelProviderConfiguration)eDynamicGet(NattableaxisPackage.FEATURE_ID_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_ID_AXIS__LOCAL_LABEL_CONFIGURATION, msgs);
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setLocalLabelConfiguration(FeatureLabelProviderConfiguration newLocalLabelConfiguration) {
eDynamicSet(NattableaxisPackage.FEATURE_ID_AXIS__LOCAL_LABEL_CONFIGURATION - ESTATIC_FEATURE_COUNT, NattableaxisPackage.Literals.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION, newLocalLabelConfiguration);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case NattableaxisPackage.FEATURE_ID_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_ID_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_ID_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_ID_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_ID_AXIS__LOCAL_LABEL_CONFIGURATION:
return getLocalLabelConfiguration() != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == FeatureAxis.class) {
switch (derivedFeatureID) {
case NattableaxisPackage.FEATURE_ID_AXIS__LOCAL_LABEL_CONFIGURATION: return NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION;
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 == FeatureAxis.class) {
switch (baseFeatureID) {
case NattableaxisPackage.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION: return NattableaxisPackage.FEATURE_ID_AXIS__LOCAL_LABEL_CONFIGURATION;
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} // FeatureIdAxisImpl