Author: dazarov
Date: 2008-05-28 08:15:38 -0400 (Wed, 28 May 2008)
New Revision: 8399
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/ParamImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,424 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+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.EObjectImpl;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object
'<em><b>Link</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#getName
<em>Name</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#getFromElement
<em>From Element</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#getToElement <em>To
Element</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#isShortcut
<em>Shortcut</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LinkImpl extends EObjectImpl implements Link {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getFromElement() <em>From
Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFromElement()
+ * @generated
+ * @ordered
+ */
+ protected PagesElement fromElement;
+
+ /**
+ * The cached value of the '{@link #getToElement() <em>To
Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getToElement()
+ * @generated
+ * @ordered
+ */
+ protected PagesElement toElement;
+
+ /**
+ * The default value of the '{@link #isShortcut()
<em>Shortcut</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isShortcut()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean SHORTCUT_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isShortcut() <em>Shortcut</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isShortcut()
+ * @generated
+ * @ordered
+ */
+ protected boolean shortcut = SHORTCUT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LinkImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PagesPackage.Literals.LINK;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PagesPackage.LINK__NAME,
oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesElement getFromElement() {
+ if (fromElement != null && fromElement.eIsProxy()) {
+ InternalEObject oldFromElement = (InternalEObject)fromElement;
+ fromElement = (PagesElement)eResolveProxy(oldFromElement);
+ if (fromElement != oldFromElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
PagesPackage.LINK__FROM_ELEMENT, oldFromElement, fromElement));
+ }
+ }
+ return fromElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesElement basicGetFromElement() {
+ return fromElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetFromElement(PagesElement newFromElement,
NotificationChain msgs) {
+ PagesElement oldFromElement = fromElement;
+ fromElement = newFromElement;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
PagesPackage.LINK__FROM_ELEMENT, oldFromElement, newFromElement);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFromElement(PagesElement newFromElement) {
+ if (newFromElement != fromElement) {
+ NotificationChain msgs = null;
+ if (fromElement != null)
+ msgs = ((InternalEObject)fromElement).eInverseRemove(this,
PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS, PagesElement.class, msgs);
+ if (newFromElement != null)
+ msgs = ((InternalEObject)newFromElement).eInverseAdd(this,
PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS, PagesElement.class, msgs);
+ msgs = basicSetFromElement(newFromElement, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PagesPackage.LINK__FROM_ELEMENT,
newFromElement, newFromElement));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesElement getToElement() {
+ if (toElement != null && toElement.eIsProxy()) {
+ InternalEObject oldToElement = (InternalEObject)toElement;
+ toElement = (PagesElement)eResolveProxy(oldToElement);
+ if (toElement != oldToElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
PagesPackage.LINK__TO_ELEMENT, oldToElement, toElement));
+ }
+ }
+ return toElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesElement basicGetToElement() {
+ return toElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetToElement(PagesElement newToElement, NotificationChain
msgs) {
+ PagesElement oldToElement = toElement;
+ toElement = newToElement;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
PagesPackage.LINK__TO_ELEMENT, oldToElement, newToElement);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setToElement(PagesElement newToElement) {
+ if (newToElement != toElement) {
+ NotificationChain msgs = null;
+ if (toElement != null)
+ msgs = ((InternalEObject)toElement).eInverseRemove(this,
PagesPackage.PAGES_ELEMENT__INPUT_LINKS, PagesElement.class, msgs);
+ if (newToElement != null)
+ msgs = ((InternalEObject)newToElement).eInverseAdd(this,
PagesPackage.PAGES_ELEMENT__INPUT_LINKS, PagesElement.class, msgs);
+ msgs = basicSetToElement(newToElement, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PagesPackage.LINK__TO_ELEMENT,
newToElement, newToElement));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isShortcut() {
+ return shortcut;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setShortcut(boolean newShortcut) {
+ boolean oldShortcut = shortcut;
+ shortcut = newShortcut;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PagesPackage.LINK__SHORTCUT,
oldShortcut, shortcut));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID,
NotificationChain msgs) {
+ switch (featureID) {
+ case PagesPackage.LINK__FROM_ELEMENT:
+ if (fromElement != null)
+ msgs = ((InternalEObject)fromElement).eInverseRemove(this,
PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS, PagesElement.class, msgs);
+ return basicSetFromElement((PagesElement)otherEnd, msgs);
+ case PagesPackage.LINK__TO_ELEMENT:
+ if (toElement != null)
+ msgs = ((InternalEObject)toElement).eInverseRemove(this,
PagesPackage.PAGES_ELEMENT__INPUT_LINKS, PagesElement.class, msgs);
+ return basicSetToElement((PagesElement)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
NotificationChain msgs) {
+ switch (featureID) {
+ case PagesPackage.LINK__FROM_ELEMENT:
+ return basicSetFromElement(null, msgs);
+ case PagesPackage.LINK__TO_ELEMENT:
+ return basicSetToElement(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PagesPackage.LINK__NAME:
+ return getName();
+ case PagesPackage.LINK__FROM_ELEMENT:
+ if (resolve) return getFromElement();
+ return basicGetFromElement();
+ case PagesPackage.LINK__TO_ELEMENT:
+ if (resolve) return getToElement();
+ return basicGetToElement();
+ case PagesPackage.LINK__SHORTCUT:
+ return isShortcut() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PagesPackage.LINK__NAME:
+ setName((String)newValue);
+ return;
+ case PagesPackage.LINK__FROM_ELEMENT:
+ setFromElement((PagesElement)newValue);
+ return;
+ case PagesPackage.LINK__TO_ELEMENT:
+ setToElement((PagesElement)newValue);
+ return;
+ case PagesPackage.LINK__SHORTCUT:
+ setShortcut(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PagesPackage.LINK__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PagesPackage.LINK__FROM_ELEMENT:
+ setFromElement((PagesElement)null);
+ return;
+ case PagesPackage.LINK__TO_ELEMENT:
+ setToElement((PagesElement)null);
+ return;
+ case PagesPackage.LINK__SHORTCUT:
+ setShortcut(SHORTCUT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PagesPackage.LINK__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PagesPackage.LINK__FROM_ELEMENT:
+ return fromElement != null;
+ case PagesPackage.LINK__TO_ELEMENT:
+ return toElement != null;
+ case PagesPackage.LINK__SHORTCUT:
+ return shortcut != SHORTCUT_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(" (name: ");
+ result.append(name);
+ result.append(", shortcut: ");
+ result.append(shortcut);
+ result.append(')');
+ return result.toString();
+ }
+
+} //LinkImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,166 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object
'<em><b>Page</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PageImpl#isParamsVisible
<em>Params Visible</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PageImpl extends PagesElementImpl implements Page {
+ /**
+ * The default value of the '{@link #isParamsVisible() <em>Params
Visible</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isParamsVisible()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean PARAMS_VISIBLE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isParamsVisible() <em>Params
Visible</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isParamsVisible()
+ * @generated
+ * @ordered
+ */
+ protected boolean paramsVisible = PARAMS_VISIBLE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PageImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PagesPackage.Literals.PAGE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isParamsVisible() {
+ return paramsVisible;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParamsVisible(boolean newParamsVisible) {
+ boolean oldParamsVisible = paramsVisible;
+ paramsVisible = newParamsVisible;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
PagesPackage.PAGE__PARAMS_VISIBLE, oldParamsVisible, paramsVisible));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PagesPackage.PAGE__PARAMS_VISIBLE:
+ return isParamsVisible() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PagesPackage.PAGE__PARAMS_VISIBLE:
+ setParamsVisible(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PagesPackage.PAGE__PARAMS_VISIBLE:
+ setParamsVisible(PARAMS_VISIBLE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PagesPackage.PAGE__PARAMS_VISIBLE:
+ return paramsVisible != PARAMS_VISIBLE_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(" (paramsVisible: ");
+ result.append(paramsVisible);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PageImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,516 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import java.util.Collection;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+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.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object
'<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getName
<em>Name</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getLocation
<em>Location</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getSize
<em>Size</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getChildren
<em>Children</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getParent
<em>Parent</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getInputLinks
<em>Input Links</em>}</li>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesElementImpl#getOutputLinks
<em>Output Links</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PagesElementImpl extends EObjectImpl implements PagesElement {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLocation()
<em>Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLocation()
+ * @generated
+ * @ordered
+ */
+ protected static final Point LOCATION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLocation()
<em>Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLocation()
+ * @generated
+ * @ordered
+ */
+ protected Point location = LOCATION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSize() <em>Size</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSize()
+ * @generated
+ * @ordered
+ */
+ protected static final Dimension SIZE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSize() <em>Size</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSize()
+ * @generated
+ * @ordered
+ */
+ protected Dimension size = SIZE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getChildren()
<em>Children</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList<PagesElement> children;
+
+ /**
+ * The cached value of the '{@link #getParent() <em>Parent</em>}'
reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParent()
+ * @generated
+ * @ordered
+ */
+ protected PagesElement parent;
+
+ /**
+ * The cached value of the '{@link #getInputLinks() <em>Input
Links</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInputLinks()
+ * @generated
+ * @ordered
+ */
+ protected EList<Link> inputLinks;
+
+ /**
+ * The cached value of the '{@link #getOutputLinks() <em>Output
Links</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOutputLinks()
+ * @generated
+ * @ordered
+ */
+ protected EList<Link> outputLinks;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PagesElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PagesPackage.Literals.PAGES_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
PagesPackage.PAGES_ELEMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Point getLocation() {
+ return location;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLocation(Point newLocation) {
+ Point oldLocation = location;
+ location = newLocation;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
PagesPackage.PAGES_ELEMENT__LOCATION, oldLocation, location));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Dimension getSize() {
+ return size;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSize(Dimension newSize) {
+ Dimension oldSize = size;
+ size = newSize;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
PagesPackage.PAGES_ELEMENT__SIZE, oldSize, size));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PagesElement> getChildren() {
+ if (children == null) {
+ children = new
EObjectWithInverseResolvingEList<PagesElement>(PagesElement.class, this,
PagesPackage.PAGES_ELEMENT__CHILDREN, PagesPackage.PAGES_ELEMENT__PARENT);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesElement getParent() {
+ if (parent != null && parent.eIsProxy()) {
+ InternalEObject oldParent = (InternalEObject)parent;
+ parent = (PagesElement)eResolveProxy(oldParent);
+ if (parent != oldParent) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
PagesPackage.PAGES_ELEMENT__PARENT, oldParent, parent));
+ }
+ }
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesElement basicGetParent() {
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParent(PagesElement newParent, NotificationChain msgs)
{
+ PagesElement oldParent = parent;
+ parent = newParent;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
PagesPackage.PAGES_ELEMENT__PARENT, oldParent, newParent);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParent(PagesElement newParent) {
+ if (newParent != parent) {
+ NotificationChain msgs = null;
+ if (parent != null)
+ msgs = ((InternalEObject)parent).eInverseRemove(this,
PagesPackage.PAGES_ELEMENT__CHILDREN, PagesElement.class, msgs);
+ if (newParent != null)
+ msgs = ((InternalEObject)newParent).eInverseAdd(this,
PagesPackage.PAGES_ELEMENT__CHILDREN, PagesElement.class, msgs);
+ msgs = basicSetParent(newParent, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
PagesPackage.PAGES_ELEMENT__PARENT, newParent, newParent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Link> getInputLinks() {
+ if (inputLinks == null) {
+ inputLinks = new EObjectWithInverseResolvingEList<Link>(Link.class, this,
PagesPackage.PAGES_ELEMENT__INPUT_LINKS, PagesPackage.LINK__TO_ELEMENT);
+ }
+ return inputLinks;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Link> getOutputLinks() {
+ if (outputLinks == null) {
+ outputLinks = new EObjectWithInverseResolvingEList<Link>(Link.class, this,
PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS, PagesPackage.LINK__FROM_ELEMENT);
+ }
+ return outputLinks;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID,
NotificationChain msgs) {
+ switch (featureID) {
+ case PagesPackage.PAGES_ELEMENT__CHILDREN:
+ return
((InternalEList<InternalEObject>)(InternalEList<?>)getChildren()).basicAdd(otherEnd,
msgs);
+ case PagesPackage.PAGES_ELEMENT__PARENT:
+ if (parent != null)
+ msgs = ((InternalEObject)parent).eInverseRemove(this,
PagesPackage.PAGES_ELEMENT__CHILDREN, PagesElement.class, msgs);
+ return basicSetParent((PagesElement)otherEnd, msgs);
+ case PagesPackage.PAGES_ELEMENT__INPUT_LINKS:
+ return
((InternalEList<InternalEObject>)(InternalEList<?>)getInputLinks()).basicAdd(otherEnd,
msgs);
+ case PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS:
+ return
((InternalEList<InternalEObject>)(InternalEList<?>)getOutputLinks()).basicAdd(otherEnd,
msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
NotificationChain msgs) {
+ switch (featureID) {
+ case PagesPackage.PAGES_ELEMENT__CHILDREN:
+ return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);
+ case PagesPackage.PAGES_ELEMENT__PARENT:
+ return basicSetParent(null, msgs);
+ case PagesPackage.PAGES_ELEMENT__INPUT_LINKS:
+ return ((InternalEList<?>)getInputLinks()).basicRemove(otherEnd, msgs);
+ case PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS:
+ return ((InternalEList<?>)getOutputLinks()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PagesPackage.PAGES_ELEMENT__NAME:
+ return getName();
+ case PagesPackage.PAGES_ELEMENT__LOCATION:
+ return getLocation();
+ case PagesPackage.PAGES_ELEMENT__SIZE:
+ return getSize();
+ case PagesPackage.PAGES_ELEMENT__CHILDREN:
+ return getChildren();
+ case PagesPackage.PAGES_ELEMENT__PARENT:
+ if (resolve) return getParent();
+ return basicGetParent();
+ case PagesPackage.PAGES_ELEMENT__INPUT_LINKS:
+ return getInputLinks();
+ case PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS:
+ return getOutputLinks();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PagesPackage.PAGES_ELEMENT__NAME:
+ setName((String)newValue);
+ return;
+ case PagesPackage.PAGES_ELEMENT__LOCATION:
+ setLocation((Point)newValue);
+ return;
+ case PagesPackage.PAGES_ELEMENT__SIZE:
+ setSize((Dimension)newValue);
+ return;
+ case PagesPackage.PAGES_ELEMENT__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection<? extends PagesElement>)newValue);
+ return;
+ case PagesPackage.PAGES_ELEMENT__PARENT:
+ setParent((PagesElement)newValue);
+ return;
+ case PagesPackage.PAGES_ELEMENT__INPUT_LINKS:
+ getInputLinks().clear();
+ getInputLinks().addAll((Collection<? extends Link>)newValue);
+ return;
+ case PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS:
+ getOutputLinks().clear();
+ getOutputLinks().addAll((Collection<? extends Link>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PagesPackage.PAGES_ELEMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PagesPackage.PAGES_ELEMENT__LOCATION:
+ setLocation(LOCATION_EDEFAULT);
+ return;
+ case PagesPackage.PAGES_ELEMENT__SIZE:
+ setSize(SIZE_EDEFAULT);
+ return;
+ case PagesPackage.PAGES_ELEMENT__CHILDREN:
+ getChildren().clear();
+ return;
+ case PagesPackage.PAGES_ELEMENT__PARENT:
+ setParent((PagesElement)null);
+ return;
+ case PagesPackage.PAGES_ELEMENT__INPUT_LINKS:
+ getInputLinks().clear();
+ return;
+ case PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS:
+ getOutputLinks().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PagesPackage.PAGES_ELEMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PagesPackage.PAGES_ELEMENT__LOCATION:
+ return LOCATION_EDEFAULT == null ? location != null :
!LOCATION_EDEFAULT.equals(location);
+ case PagesPackage.PAGES_ELEMENT__SIZE:
+ return SIZE_EDEFAULT == null ? size != null : !SIZE_EDEFAULT.equals(size);
+ case PagesPackage.PAGES_ELEMENT__CHILDREN:
+ return children != null && !children.isEmpty();
+ case PagesPackage.PAGES_ELEMENT__PARENT:
+ return parent != null;
+ case PagesPackage.PAGES_ELEMENT__INPUT_LINKS:
+ return inputLinks != null && !inputLinks.isEmpty();
+ case PagesPackage.PAGES_ELEMENT__OUTPUT_LINKS:
+ return outputLinks != null && !outputLinks.isEmpty();
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(", location: ");
+ result.append(location);
+ result.append(", size: ");
+ result.append(size);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PagesElementImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,217 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PagesFactoryImpl extends EFactoryImpl implements PagesFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PagesFactory init() {
+ try {
+ PagesFactory thePagesFactory =
(PagesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore");
+ if (thePagesFactory != null) {
+ return thePagesFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PagesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PagesPackage.LINK: return createLink();
+ case PagesPackage.PAGE: return createPage();
+ case PagesPackage.PAGES_MODEL: return createPagesModel();
+ case PagesPackage.PARAM: return createParam();
+ case PagesPackage.PG_EXCEPTION: return createPgException();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() +
"' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case PagesPackage.POINT:
+ return createPointFromString(eDataType, initialValue);
+ case PagesPackage.DIMENSION:
+ return createDimensionFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" +
eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case PagesPackage.POINT:
+ return convertPointToString(eDataType, instanceValue);
+ case PagesPackage.DIMENSION:
+ return convertDimensionToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" +
eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Link createLink() {
+ LinkImpl link = new LinkImpl();
+ return link;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Page createPage() {
+ PageImpl page = new PageImpl();
+ return page;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesModel createPagesModel() {
+ PagesModelImpl pagesModel = new PagesModelImpl();
+ return pagesModel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Param createParam() {
+ ParamImpl param = new ParamImpl();
+ return param;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PgException createPgException() {
+ PgExceptionImpl pgException = new PgExceptionImpl();
+ return pgException;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Point createPointFromString(EDataType eDataType, String initialValue) {
+ return (Point)super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertPointToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Dimension createDimensionFromString(EDataType eDataType, String initialValue) {
+ return (Dimension)super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertDimensionToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesPackage getPagesPackage() {
+ return (PagesPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PagesPackage getPackage() {
+ return PagesPackage.eINSTANCE;
+ }
+
+} //PagesFactoryImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,43 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object
'<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class PagesModelImpl extends PagesElementImpl implements PagesModel {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PagesModelImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PagesPackage.Literals.PAGES_MODEL;
+ }
+
+} //PagesModelImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,474 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesFactory;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PagesPackageImpl extends EPackageImpl implements PagesPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass linkEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pageEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pagesElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pagesModelEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paramEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pgExceptionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType pointEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType dimensionEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PagesPackageImpl() {
+ super(eNS_URI, PagesFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static PagesPackage init() {
+ if (isInited) return
(PagesPackage)EPackage.Registry.INSTANCE.getEPackage(PagesPackage.eNS_URI);
+
+ // Obtain or create and register package
+ PagesPackageImpl thePagesPackage =
(PagesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof
PagesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new
PagesPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ thePagesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePagesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thePagesPackage.freeze();
+
+ return thePagesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLink() {
+ return linkEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLink_Name() {
+ return (EAttribute)linkEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_FromElement() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_ToElement() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLink_Shortcut() {
+ return (EAttribute)linkEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPage() {
+ return pageEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPage_ParamsVisible() {
+ return (EAttribute)pageEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPagesElement() {
+ return pagesElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPagesElement_Name() {
+ return (EAttribute)pagesElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPagesElement_Location() {
+ return (EAttribute)pagesElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPagesElement_Size() {
+ return (EAttribute)pagesElementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPagesElement_Children() {
+ return (EReference)pagesElementEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPagesElement_Parent() {
+ return (EReference)pagesElementEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPagesElement_InputLinks() {
+ return (EReference)pagesElementEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPagesElement_OutputLinks() {
+ return (EReference)pagesElementEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPagesModel() {
+ return pagesModelEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParam() {
+ return paramEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParam_Value() {
+ return (EAttribute)paramEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPgException() {
+ return pgExceptionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getPoint() {
+ return pointEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getDimension() {
+ return dimensionEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesFactory getPagesFactory() {
+ return (PagesFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ linkEClass = createEClass(LINK);
+ createEAttribute(linkEClass, LINK__NAME);
+ createEReference(linkEClass, LINK__FROM_ELEMENT);
+ createEReference(linkEClass, LINK__TO_ELEMENT);
+ createEAttribute(linkEClass, LINK__SHORTCUT);
+
+ pageEClass = createEClass(PAGE);
+ createEAttribute(pageEClass, PAGE__PARAMS_VISIBLE);
+
+ pagesElementEClass = createEClass(PAGES_ELEMENT);
+ createEAttribute(pagesElementEClass, PAGES_ELEMENT__NAME);
+ createEAttribute(pagesElementEClass, PAGES_ELEMENT__LOCATION);
+ createEAttribute(pagesElementEClass, PAGES_ELEMENT__SIZE);
+ createEReference(pagesElementEClass, PAGES_ELEMENT__CHILDREN);
+ createEReference(pagesElementEClass, PAGES_ELEMENT__PARENT);
+ createEReference(pagesElementEClass, PAGES_ELEMENT__INPUT_LINKS);
+ createEReference(pagesElementEClass, PAGES_ELEMENT__OUTPUT_LINKS);
+
+ pagesModelEClass = createEClass(PAGES_MODEL);
+
+ paramEClass = createEClass(PARAM);
+ createEAttribute(paramEClass, PARAM__VALUE);
+
+ pgExceptionEClass = createEClass(PG_EXCEPTION);
+
+ // Create data types
+ pointEDataType = createEDataType(POINT);
+ dimensionEDataType = createEDataType(DIMENSION);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ pageEClass.getESuperTypes().add(this.getPagesElement());
+ pagesModelEClass.getESuperTypes().add(this.getPagesElement());
+ paramEClass.getESuperTypes().add(this.getPagesElement());
+ pgExceptionEClass.getESuperTypes().add(this.getPagesElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(linkEClass, Link.class, "Link", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getLink_Name(), ecorePackage.getEString(), "name", null, 0, 1,
Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_FromElement(), this.getPagesElement(),
this.getPagesElement_OutputLinks(), "fromElement", null, 0, 1, Link.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_ToElement(), this.getPagesElement(),
this.getPagesElement_InputLinks(), "toElement", null, 0, 1, Link.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getLink_Shortcut(), ecorePackage.getEBoolean(), "shortcut",
null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
!IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pageEClass, Page.class, "Page", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPage_ParamsVisible(), ecorePackage.getEBoolean(),
"paramsVisible", null, 0, 1, Page.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pagesElementEClass, PagesElement.class, "PagesElement",
IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPagesElement_Name(), ecorePackage.getEString(), "name",
null, 0, 1, PagesElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
!IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPagesElement_Location(), this.getPoint(), "location", null,
0, 1, PagesElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
!IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPagesElement_Size(), this.getDimension(), "size", null, 0,
1, PagesElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPagesElement_Children(), this.getPagesElement(),
this.getPagesElement_Parent(), "children", null, 0, -1, PagesElement.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPagesElement_Parent(), this.getPagesElement(),
this.getPagesElement_Children(), "parent", null, 0, 1, PagesElement.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPagesElement_InputLinks(), this.getLink(), this.getLink_ToElement(),
"inputLinks", null, 0, -1, PagesElement.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
+ initEReference(getPagesElement_OutputLinks(), this.getLink(),
this.getLink_FromElement(), "outputLinks", null, 0, -1, PagesElement.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pagesModelEClass, PagesModel.class, "PagesModel", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(paramEClass, Param.class, "Param", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getParam_Value(), ecorePackage.getEString(), "value", null, 0,
1, Param.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pgExceptionEClass, PgException.class, "PgException", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ // Initialize data types
+ initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE,
!IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(dimensionEDataType, Dimension.class, "Dimension",
IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //PagesPackageImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/ParamImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/ParamImpl.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/ParamImpl.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,166 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object
'<em><b>Param</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.ParamImpl#getValue
<em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParamImpl extends PagesElementImpl implements Param {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ParamImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PagesPackage.Literals.PARAM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PagesPackage.PARAM__VALUE,
oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PagesPackage.PARAM__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PagesPackage.PARAM__VALUE:
+ setValue((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PagesPackage.PARAM__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PagesPackage.PARAM__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ParamImpl
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,214 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the
model.
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage
+ * @generated
+ */
+public class PagesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PagesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = PagesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the
model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PagesSwitch<Adapter> modelSwitch =
+ new PagesSwitch<Adapter>() {
+ @Override
+ public Adapter caseLink(Link object) {
+ return createLinkAdapter();
+ }
+ @Override
+ public Adapter casePage(Page object) {
+ return createPageAdapter();
+ }
+ @Override
+ public Adapter casePagesElement(PagesElement object) {
+ return createPagesElementAdapter();
+ }
+ @Override
+ public Adapter casePagesModel(PagesModel object) {
+ return createPagesModelAdapter();
+ }
+ @Override
+ public Adapter caseParam(Param object) {
+ return createParamAdapter();
+ }
+ @Override
+ public Adapter casePgException(PgException object) {
+ return createPgExceptionAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link <em>Link</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link
+ * @generated
+ */
+ public Adapter createLinkAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page <em>Page</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page
+ * @generated
+ */
+ public Adapter createPageAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement
<em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement
+ * @generated
+ */
+ public Adapter createPagesElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel
<em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel
+ * @generated
+ */
+ public Adapter createPagesModelAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param
+ * @generated
+ */
+ public Adapter createParamAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException <em>Pg
Exception</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException
+ * @generated
+ */
+ public Adapter createPgExceptionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //PagesAdapterFactory
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java 2008-05-28
12:15:38 UTC (rev 8399)
@@ -0,0 +1,239 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage
+ * @generated
+ */
+public class PagesSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PagesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PagesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = PagesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns
a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code>
call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns
a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code>
call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns
a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code>
call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case PagesPackage.LINK: {
+ Link link = (Link)theEObject;
+ T result = caseLink(link);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PagesPackage.PAGE: {
+ Page page = (Page)theEObject;
+ T result = casePage(page);
+ if (result == null) result = casePagesElement(page);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PagesPackage.PAGES_ELEMENT: {
+ PagesElement pagesElement = (PagesElement)theEObject;
+ T result = casePagesElement(pagesElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PagesPackage.PAGES_MODEL: {
+ PagesModel pagesModel = (PagesModel)theEObject;
+ T result = casePagesModel(pagesModel);
+ if (result == null) result = casePagesElement(pagesModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PagesPackage.PARAM: {
+ Param param = (Param)theEObject;
+ T result = caseParam(param);
+ if (result == null) result = casePagesElement(param);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PagesPackage.PG_EXCEPTION: {
+ PgException pgException = (PgException)theEObject;
+ T result = casePgException(pgException);
+ if (result == null) result = casePagesElement(pgException);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Link</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>Link</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLink(Link object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Page</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>Page</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePage(Page object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePagesElement(PagesElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Model</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePagesModel(PagesModel object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Param</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>Param</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParam(Param object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Pg
Exception</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Pg
Exception</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePgException(PgException object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case
anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //PagesSwitch