/******************************************************************************* * Copyright (c) 2008, 2011 Obeo. * 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: * Obeo - initial API and implementation *******************************************************************************/ package org.eclipse.emf.eef.modelingBot.EclipseActions.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.eef.modelingBot.EclipseActions.CreateProject; import org.eclipse.emf.eef.modelingBot.EclipseActions.EclipseActionsPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Create Project</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.emf.eef.modelingBot.EclipseActions.impl.CreateProjectImpl#getProjectName <em>Project Name</em>}</li> * </ul> * </p> * * @generated */ public class CreateProjectImpl extends EclipseActionImpl implements CreateProject { /** * The default value of the '{@link #getProjectName() <em>Project Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getProjectName() * @generated * @ordered */ protected static final String PROJECT_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getProjectName() <em>Project Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getProjectName() * @generated * @ordered */ protected String projectName = PROJECT_NAME_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected CreateProjectImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EclipseActionsPackage.Literals.CREATE_PROJECT; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getProjectName() { return projectName; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setProjectName(String newProjectName) { String oldProjectName = projectName; projectName = newProjectName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EclipseActionsPackage.CREATE_PROJECT__PROJECT_NAME, oldProjectName, projectName)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EclipseActionsPackage.CREATE_PROJECT__PROJECT_NAME: return getProjectName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EclipseActionsPackage.CREATE_PROJECT__PROJECT_NAME: setProjectName((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EclipseActionsPackage.CREATE_PROJECT__PROJECT_NAME: setProjectName(PROJECT_NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EclipseActionsPackage.CREATE_PROJECT__PROJECT_NAME: return PROJECT_NAME_EDEFAULT == null ? projectName != null : !PROJECT_NAME_EDEFAULT.equals(projectName); } 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(" (projectName: "); result.append(projectName); result.append(')'); return result.toString(); } } //CreateProjectImpl