diff options
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java')
-rw-r--r-- | plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java new file mode 100644 index 00000000000..ad91294f957 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java @@ -0,0 +1,206 @@ +/** + * Copyright (c) 2017 CEA LIST. + * + * 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: + * Maged Elaasar - Initial API and implementation + * + * + */ +package org.eclipse.papyrus.infra.gmfdiag.representation.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.gmf.runtime.emf.type.core.IElementType; + +import org.eclipse.papyrus.infra.architecture.representation.impl.RuleImpl; + +import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule; +import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Assistant Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl#getElementTypeID <em>Element Type ID</em>}</li> + * </ul> + * + * @generated + */ +public class AssistantRuleImpl extends RuleImpl implements AssistantRule { + /** + * The default value of the '{@link #getElementTypeID() <em>Element Type ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getElementTypeID() + * @generated + * @ordered + */ + protected static final String ELEMENT_TYPE_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getElementTypeID() <em>Element Type ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getElementTypeID() + * @generated + * @ordered + */ + protected String elementTypeID = ELEMENT_TYPE_ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AssistantRuleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RepresentationPackage.Literals.ASSISTANT_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getElementTypeID() { + return elementTypeID; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setElementTypeID(String newElementTypeID) { + String oldElementTypeID = elementTypeID; + elementTypeID = newElementTypeID; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID, oldElementTypeID, elementTypeID)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean matches(IElementType elementType) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID: + return getElementTypeID(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID: + setElementTypeID((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID: + setElementTypeID(ELEMENT_TYPE_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID: + return ELEMENT_TYPE_ID_EDEFAULT == null ? elementTypeID != null : !ELEMENT_TYPE_ID_EDEFAULT.equals(elementTypeID); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RepresentationPackage.ASSISTANT_RULE___MATCHES__IELEMENTTYPE: + return matches((IElementType)arguments.get(0)); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (elementTypeID: "); + result.append(elementTypeID); + result.append(')'); + return result.toString(); + } + +} //AssistantRuleImpl |