| /******************************************************************************* |
| * Copyright (c) 2009, 2014 Xored Software Inc 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: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.tesla.ecl.model.impl; |
| |
| import org.eclipse.rcptt.tesla.ecl.model.ControlHandler; |
| import org.eclipse.rcptt.tesla.ecl.model.GetCell; |
| import org.eclipse.rcptt.tesla.ecl.model.TeslaPackage; |
| |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.rcptt.ecl.core.impl.CommandImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Get Cell</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getId <em>Id</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getAfter <em>After</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getIndex <em>Index</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getParent <em>Parent</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getRow <em>Row</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetCellImpl#getColumn <em>Column</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class GetCellImpl extends CommandImpl implements GetCell { |
| /** |
| * 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 = null; |
| |
| /** |
| * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected String id = ID_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getAfter() <em>After</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAfter() |
| * @generated |
| * @ordered |
| */ |
| protected ControlHandler after; |
| |
| /** |
| * 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 = null; |
| |
| /** |
| * The cached value of the '{@link #getType() <em>Type</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected String type = TYPE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIndex() |
| * @generated |
| * @ordered |
| */ |
| protected static final Integer INDEX_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIndex() |
| * @generated |
| * @ordered |
| */ |
| protected Integer index = INDEX_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getParent() <em>Parent</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getParent() |
| * @generated |
| * @ordered |
| */ |
| protected ControlHandler parent; |
| |
| /** |
| * The default value of the '{@link #getRow() <em>Row</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRow() |
| * @generated |
| * @ordered |
| */ |
| protected static final Integer ROW_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getRow() <em>Row</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRow() |
| * @generated |
| * @ordered |
| */ |
| protected Integer row = ROW_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getColumn() <em>Column</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumn() |
| * @generated |
| * @ordered |
| */ |
| protected static final Integer COLUMN_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getColumn() <em>Column</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumn() |
| * @generated |
| * @ordered |
| */ |
| protected Integer column = COLUMN_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected GetCellImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TeslaPackage.Literals.GET_CELL; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getId() { |
| return id; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setId(String newId) { |
| String oldId = id; |
| id = newId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__ID, oldId, id)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler getAfter() { |
| if (after != null && after.eIsProxy()) { |
| InternalEObject oldAfter = (InternalEObject)after; |
| after = (ControlHandler)eResolveProxy(oldAfter); |
| if (after != oldAfter) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TeslaPackage.GET_CELL__AFTER, oldAfter, after)); |
| } |
| } |
| return after; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler basicGetAfter() { |
| return after; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setAfter(ControlHandler newAfter) { |
| ControlHandler oldAfter = after; |
| after = newAfter; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__AFTER, oldAfter, after)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Integer getIndex() { |
| return index; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIndex(Integer newIndex) { |
| Integer oldIndex = index; |
| index = newIndex; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__INDEX, oldIndex, index)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler getParent() { |
| if (parent != null && parent.eIsProxy()) { |
| InternalEObject oldParent = (InternalEObject)parent; |
| parent = (ControlHandler)eResolveProxy(oldParent); |
| if (parent != oldParent) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TeslaPackage.GET_CELL__PARENT, oldParent, parent)); |
| } |
| } |
| return parent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler basicGetParent() { |
| return parent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setParent(ControlHandler newParent) { |
| ControlHandler oldParent = parent; |
| parent = newParent; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__PARENT, oldParent, parent)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getType() { |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(String newType) { |
| String oldType = type; |
| type = newType; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__TYPE, oldType, type)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Integer getRow() { |
| return row; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRow(Integer newRow) { |
| Integer oldRow = row; |
| row = newRow; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__ROW, oldRow, row)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Integer getColumn() { |
| return column; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setColumn(Integer newColumn) { |
| Integer oldColumn = column; |
| column = newColumn; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_CELL__COLUMN, oldColumn, column)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case TeslaPackage.GET_CELL__ID: |
| return getId(); |
| case TeslaPackage.GET_CELL__AFTER: |
| if (resolve) return getAfter(); |
| return basicGetAfter(); |
| case TeslaPackage.GET_CELL__TYPE: |
| return getType(); |
| case TeslaPackage.GET_CELL__INDEX: |
| return getIndex(); |
| case TeslaPackage.GET_CELL__PARENT: |
| if (resolve) return getParent(); |
| return basicGetParent(); |
| case TeslaPackage.GET_CELL__ROW: |
| return getRow(); |
| case TeslaPackage.GET_CELL__COLUMN: |
| return getColumn(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case TeslaPackage.GET_CELL__ID: |
| setId((String)newValue); |
| return; |
| case TeslaPackage.GET_CELL__AFTER: |
| setAfter((ControlHandler)newValue); |
| return; |
| case TeslaPackage.GET_CELL__TYPE: |
| setType((String)newValue); |
| return; |
| case TeslaPackage.GET_CELL__INDEX: |
| setIndex((Integer)newValue); |
| return; |
| case TeslaPackage.GET_CELL__PARENT: |
| setParent((ControlHandler)newValue); |
| return; |
| case TeslaPackage.GET_CELL__ROW: |
| setRow((Integer)newValue); |
| return; |
| case TeslaPackage.GET_CELL__COLUMN: |
| setColumn((Integer)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TeslaPackage.GET_CELL__ID: |
| setId(ID_EDEFAULT); |
| return; |
| case TeslaPackage.GET_CELL__AFTER: |
| setAfter((ControlHandler)null); |
| return; |
| case TeslaPackage.GET_CELL__TYPE: |
| setType(TYPE_EDEFAULT); |
| return; |
| case TeslaPackage.GET_CELL__INDEX: |
| setIndex(INDEX_EDEFAULT); |
| return; |
| case TeslaPackage.GET_CELL__PARENT: |
| setParent((ControlHandler)null); |
| return; |
| case TeslaPackage.GET_CELL__ROW: |
| setRow(ROW_EDEFAULT); |
| return; |
| case TeslaPackage.GET_CELL__COLUMN: |
| setColumn(COLUMN_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TeslaPackage.GET_CELL__ID: |
| return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| case TeslaPackage.GET_CELL__AFTER: |
| return after != null; |
| case TeslaPackage.GET_CELL__TYPE: |
| return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); |
| case TeslaPackage.GET_CELL__INDEX: |
| return INDEX_EDEFAULT == null ? index != null : !INDEX_EDEFAULT.equals(index); |
| case TeslaPackage.GET_CELL__PARENT: |
| return parent != null; |
| case TeslaPackage.GET_CELL__ROW: |
| return ROW_EDEFAULT == null ? row != null : !ROW_EDEFAULT.equals(row); |
| case TeslaPackage.GET_CELL__COLUMN: |
| return COLUMN_EDEFAULT == null ? column != null : !COLUMN_EDEFAULT.equals(column); |
| } |
| 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(" (id: "); |
| result.append(id); |
| result.append(", type: "); |
| result.append(type); |
| result.append(", index: "); |
| result.append(index); |
| result.append(", row: "); |
| result.append(row); |
| result.append(", column: "); |
| result.append(column); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //GetCellImpl |