| /** |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * 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 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors{ |
| * Jose C. Dominguez - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.strategy.impl; |
| |
| 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.emf.ecore.impl.MinimalEObjectImpl; |
| |
| import org.eclipse.osbp.xtext.strategy.FocusingEnhancer; |
| import org.eclipse.osbp.xtext.strategy.LayoutingStrategy; |
| import org.eclipse.osbp.xtext.strategy.StrategyDSLPackage; |
| import org.eclipse.osbp.xtext.strategy.StrategyDefault; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Strategy Default</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.strategy.impl.StrategyDefaultImpl#getDefaultLayouting <em>Default Layouting</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.strategy.impl.StrategyDefaultImpl#getDefaultFocusing <em>Default Focusing</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class StrategyDefaultImpl extends MinimalEObjectImpl.Container implements StrategyDefault { |
| /** |
| * The cached value of the '{@link #getDefaultLayouting() <em>Default Layouting</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDefaultLayouting() |
| * @generated |
| * @ordered |
| */ |
| protected LayoutingStrategy defaultLayouting; |
| |
| /** |
| * The cached value of the '{@link #getDefaultFocusing() <em>Default Focusing</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDefaultFocusing() |
| * @generated |
| * @ordered |
| */ |
| protected FocusingEnhancer defaultFocusing; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected StrategyDefaultImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StrategyDSLPackage.Literals.STRATEGY_DEFAULT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LayoutingStrategy getDefaultLayouting() { |
| if (defaultLayouting != null && defaultLayouting.eIsProxy()) { |
| InternalEObject oldDefaultLayouting = (InternalEObject)defaultLayouting; |
| defaultLayouting = (LayoutingStrategy)eResolveProxy(oldDefaultLayouting); |
| if (defaultLayouting != oldDefaultLayouting) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_LAYOUTING, oldDefaultLayouting, defaultLayouting)); |
| } |
| } |
| return defaultLayouting; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LayoutingStrategy basicGetDefaultLayouting() { |
| return defaultLayouting; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDefaultLayouting(LayoutingStrategy newDefaultLayouting) { |
| LayoutingStrategy oldDefaultLayouting = defaultLayouting; |
| defaultLayouting = newDefaultLayouting; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_LAYOUTING, oldDefaultLayouting, defaultLayouting)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FocusingEnhancer getDefaultFocusing() { |
| if (defaultFocusing != null && defaultFocusing.eIsProxy()) { |
| InternalEObject oldDefaultFocusing = (InternalEObject)defaultFocusing; |
| defaultFocusing = (FocusingEnhancer)eResolveProxy(oldDefaultFocusing); |
| if (defaultFocusing != oldDefaultFocusing) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_FOCUSING, oldDefaultFocusing, defaultFocusing)); |
| } |
| } |
| return defaultFocusing; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FocusingEnhancer basicGetDefaultFocusing() { |
| return defaultFocusing; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDefaultFocusing(FocusingEnhancer newDefaultFocusing) { |
| FocusingEnhancer oldDefaultFocusing = defaultFocusing; |
| defaultFocusing = newDefaultFocusing; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_FOCUSING, oldDefaultFocusing, defaultFocusing)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_LAYOUTING: |
| if (resolve) return getDefaultLayouting(); |
| return basicGetDefaultLayouting(); |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_FOCUSING: |
| if (resolve) return getDefaultFocusing(); |
| return basicGetDefaultFocusing(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_LAYOUTING: |
| setDefaultLayouting((LayoutingStrategy)newValue); |
| return; |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_FOCUSING: |
| setDefaultFocusing((FocusingEnhancer)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_LAYOUTING: |
| setDefaultLayouting((LayoutingStrategy)null); |
| return; |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_FOCUSING: |
| setDefaultFocusing((FocusingEnhancer)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_LAYOUTING: |
| return defaultLayouting != null; |
| case StrategyDSLPackage.STRATEGY_DEFAULT__DEFAULT_FOCUSING: |
| return defaultFocusing != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //StrategyDefaultImpl |