blob: 6788134fd0cf5362b76119cd99bb3ff6410ab980 [file] [log] [blame]
/**
* 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:
* Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation
*
*/
package org.eclipse.osbp.xtext.chart.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.osbp.xtext.chart.ChartDSLPackage;
import org.eclipse.osbp.xtext.chart.ChartPie;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Chart Pie</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.osbp.xtext.chart.impl.ChartPieImpl#isEmpty <em>Empty</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ChartPieImpl extends ChartLazyResolverImpl implements ChartPie {
/**
* The default value of the '{@link #isEmpty() <em>Empty</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isEmpty()
* @generated
* @ordered
*/
protected static final boolean EMPTY_EDEFAULT = false;
/**
* The cached value of the '{@link #isEmpty() <em>Empty</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isEmpty()
* @generated
* @ordered
*/
protected boolean empty = EMPTY_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ChartPieImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ChartDSLPackage.Literals.CHART_PIE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isEmpty() {
return empty;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEmpty(boolean newEmpty) {
boolean oldEmpty = empty;
empty = newEmpty;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ChartDSLPackage.CHART_PIE__EMPTY, oldEmpty, empty));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ChartDSLPackage.CHART_PIE__EMPTY:
return isEmpty();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ChartDSLPackage.CHART_PIE__EMPTY:
setEmpty((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ChartDSLPackage.CHART_PIE__EMPTY:
setEmpty(EMPTY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ChartDSLPackage.CHART_PIE__EMPTY:
return empty != EMPTY_EDEFAULT;
}
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(" (empty: ");
result.append(empty);
result.append(')');
return result.toString();
}
} //ChartPieImpl