| /******************************************************************************* |
| * 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.sherlock.core.model.sherlock.report.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.ecore.impl.EObjectImpl; |
| |
| import org.eclipse.rcptt.sherlock.core.model.sherlock.report.ReportPackage; |
| import org.eclipse.rcptt.sherlock.core.model.sherlock.report.TraceData; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Trace Data</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.sherlock.core.model.sherlock.report.impl.TraceDataImpl#getMessage <em>Message</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class TraceDataImpl extends EObjectImpl implements TraceData { |
| /** |
| * The default value of the '{@link #getMessage() <em>Message</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMessage() |
| * @generated |
| * @ordered |
| */ |
| protected static final String MESSAGE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMessage() |
| * @generated |
| * @ordered |
| */ |
| protected String message = MESSAGE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected TraceDataImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ReportPackage.Literals.TRACE_DATA; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getMessage() { |
| return message; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMessage(String newMessage) { |
| String oldMessage = message; |
| message = newMessage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ReportPackage.TRACE_DATA__MESSAGE, oldMessage, message)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ReportPackage.TRACE_DATA__MESSAGE: |
| return getMessage(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ReportPackage.TRACE_DATA__MESSAGE: |
| setMessage((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ReportPackage.TRACE_DATA__MESSAGE: |
| setMessage(MESSAGE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ReportPackage.TRACE_DATA__MESSAGE: |
| return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message); |
| } |
| 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(" (message: "); |
| result.append(message); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //TraceDataImpl |