| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id$ |
| */ |
| package org.eclipse.egf.portfolio.genchain.ecoretools.ecoreToolsExtension.impl; |
| |
| import org.eclipse.egf.portfolio.genchain.ecoretools.ecoreToolsExtension.EcoreToolsExtensionPackage; |
| import org.eclipse.egf.portfolio.genchain.ecoretools.ecoreToolsExtension.EcoreToolsGeneration; |
| import org.eclipse.egf.portfolio.genchain.generationChain.impl.EcoreElementImpl; |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Ecore Tools Generation</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.egf.portfolio.genchain.ecoretools.ecoreToolsExtension.impl.EcoreToolsGenerationImpl#getFileName <em>File Name</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class EcoreToolsGenerationImpl extends EcoreElementImpl implements |
| EcoreToolsGeneration { |
| /** |
| * The default value of the '{@link #getFileName() <em>File Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFileName() |
| * @generated |
| * @ordered |
| */ |
| protected static final String FILE_NAME_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getFileName() <em>File Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFileName() |
| * @generated |
| * @ordered |
| */ |
| protected String fileName = FILE_NAME_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EcoreToolsGenerationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return EcoreToolsExtensionPackage.Literals.ECORE_TOOLS_GENERATION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getFileName() { |
| return fileName; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFileName(String newFileName) { |
| String oldFileName = fileName; |
| fileName = newFileName; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl( |
| this, |
| Notification.SET, |
| EcoreToolsExtensionPackage.ECORE_TOOLS_GENERATION__FILE_NAME, |
| oldFileName, fileName)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case EcoreToolsExtensionPackage.ECORE_TOOLS_GENERATION__FILE_NAME: |
| return getFileName(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case EcoreToolsExtensionPackage.ECORE_TOOLS_GENERATION__FILE_NAME: |
| setFileName((String) newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case EcoreToolsExtensionPackage.ECORE_TOOLS_GENERATION__FILE_NAME: |
| setFileName(FILE_NAME_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case EcoreToolsExtensionPackage.ECORE_TOOLS_GENERATION__FILE_NAME: |
| return FILE_NAME_EDEFAULT == null ? fileName != null |
| : !FILE_NAME_EDEFAULT.equals(fileName); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) |
| return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (fileName: "); //$NON-NLS-1$ |
| result.append(fileName); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //EcoreToolsGenerationImpl |