| /******************************************************************************* |
| * Copyright (c) 2009, 2019 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 |
| * https://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.ecl.data.commands.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.InternalEObject; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.rcptt.ecl.core.impl.CommandImpl; |
| import org.eclipse.rcptt.ecl.data.commands.CommandsPackage; |
| import org.eclipse.rcptt.ecl.data.commands.GetAttrs; |
| import org.eclipse.rcptt.ecl.data.objects.Tree; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Get Attributes</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.ecl.data.commands.impl.GetAttrsImpl#getObject <em>Object</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class GetAttrsImpl extends CommandImpl implements GetAttrs { |
| /** |
| * The cached value of the '{@link #getObject() <em>Object</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getObject() |
| * @generated |
| * @ordered |
| */ |
| protected EObject object; |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected GetAttrsImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return CommandsPackage.Literals.GET_ATTRS; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EObject getObject() { |
| if (object != null && object.eIsProxy()) { |
| InternalEObject oldObject = (InternalEObject)object; |
| object = eResolveProxy(oldObject); |
| if (object != oldObject) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommandsPackage.GET_ATTRS__OBJECT, oldObject, object)); |
| } |
| } |
| return object; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EObject basicGetObject() { |
| return object; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setObject(EObject newObject) { |
| EObject oldObject = object; |
| object = newObject; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, CommandsPackage.GET_ATTRS__OBJECT, oldObject, object)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case CommandsPackage.GET_ATTRS__OBJECT: |
| if (resolve) return getObject(); |
| return basicGetObject(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case CommandsPackage.GET_ATTRS__OBJECT: |
| setObject((EObject)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case CommandsPackage.GET_ATTRS__OBJECT: |
| setObject((EObject)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case CommandsPackage.GET_ATTRS__OBJECT: |
| return object != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //GetAttributesImpl |