Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2011-02-22 21:38:54 +0000
committerMartin Fluegge2011-02-22 21:38:54 +0000
commit8a4ddd6e9ad7206180607c0a3f18e9ca2fc0bbdb (patch)
tree8fbc1120433884a2a3beafd71afd57c19a440b6d /plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf
parent969a029246a075fc27744d14298a6577935b5d72 (diff)
downloadcdo-8a4ddd6e9ad7206180607c0a3f18e9ca2fc0bbdb.tar.gz
cdo-8a4ddd6e9ad7206180607c0a3f18e9ca2fc0bbdb.tar.xz
cdo-8a4ddd6e9ad7206180607c0a3f18e9ca2fc0bbdb.zip
[335669] Remove LITERALS constant from CDO test models
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335669
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoFactory.java65
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoPackage.java270
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoPackage.java96
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoPackageImpl.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoParameterImpl.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueListImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java6
14 files changed, 366 insertions, 161 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoFactory.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoFactory.java
new file mode 100644
index 0000000000..30679d77e7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoFactory.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.legacy.mango;
+
+import org.eclipse.emf.cdo.tests.mango.MangoParameter;
+import org.eclipse.emf.cdo.tests.mango.MangoValue;
+import org.eclipse.emf.cdo.tests.mango.MangoValueList;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of
+ * the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage
+ * @generated
+ */
+public interface MangoFactory extends org.eclipse.emf.cdo.tests.mango.MangoFactory
+{
+ /**
+ * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ MangoFactory eINSTANCE = org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Value List</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Value List</em>'.
+ * @generated
+ */
+ MangoValueList createMangoValueList();
+
+ /**
+ * Returns a new object of class '<em>Value</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Value</em>'.
+ * @generated
+ */
+ MangoValue createMangoValue();
+
+ /**
+ * Returns a new object of class '<em>Parameter</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Parameter</em>'.
+ * @generated
+ */
+ MangoParameter createMangoParameter();
+
+ /**
+ * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ MangoPackage getMangoPackage();
+
+} // MangoFactory
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoPackage.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoPackage.java
new file mode 100644
index 0000000000..95625504ef
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoPackage.java
@@ -0,0 +1,270 @@
+/**
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.legacy.mango;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface MangoPackage extends org.eclipse.emf.cdo.tests.mango.MangoPackage
+{
+ /**
+ * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "mango";
+
+ /**
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/legacy/mango";
+
+ /**
+ * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "mango";
+
+ /**
+ * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ MangoPackage eINSTANCE = org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoValueListImpl
+ * <em>Value List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoValueListImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoPackageImpl#getMangoValueList()
+ * @generated
+ */
+ int MANGO_VALUE_LIST = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_VALUE_LIST__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Values</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_VALUE_LIST__VALUES = 1;
+
+ /**
+ * The number of structural features of the '<em>Value List</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_VALUE_LIST_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoValueImpl <em>Value</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoValueImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoPackageImpl#getMangoValue()
+ * @generated
+ */
+ int MANGO_VALUE = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_VALUE__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Value</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_VALUE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoParameterImpl
+ * <em>Parameter</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoParameterImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoPackageImpl#getMangoParameter()
+ * @generated
+ */
+ int MANGO_PARAMETER = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_PARAMETER__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Passing</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_PARAMETER__PASSING = 1;
+
+ /**
+ * The number of structural features of the '<em>Parameter</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MANGO_PARAMETER_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.mango.ParameterPassing
+ * <em>Parameter Passing</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.ParameterPassing
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoPackageImpl#getParameterPassing()
+ * @generated
+ */
+ int PARAMETER_PASSING = 3;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoValueList
+ * <em>Value List</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Value List</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoValueList
+ * @generated
+ */
+ EClass getMangoValueList();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoValueList#getName
+ * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoValueList#getName()
+ * @see #getMangoValueList()
+ * @generated
+ */
+ EAttribute getMangoValueList_Name();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.emf.cdo.tests.legacy.mango.MangoValueList#getValues <em>Values</em>}'. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Values</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoValueList#getValues()
+ * @see #getMangoValueList()
+ * @generated
+ */
+ EReference getMangoValueList_Values();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoValue <em>Value</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Value</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoValue
+ * @generated
+ */
+ EClass getMangoValue();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoValue#getName
+ * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoValue#getName()
+ * @see #getMangoValue()
+ * @generated
+ */
+ EAttribute getMangoValue_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoParameter <em>Parameter</em>}
+ * '. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Parameter</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoParameter
+ * @generated
+ */
+ EClass getMangoParameter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoParameter#getName
+ * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoParameter#getName()
+ * @see #getMangoParameter()
+ * @generated
+ */
+ EAttribute getMangoParameter_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoParameter#getPassing
+ * <em>Passing</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Passing</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoParameter#getPassing()
+ * @see #getMangoParameter()
+ * @generated
+ */
+ EAttribute getMangoParameter_Passing();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.legacy.mango.ParameterPassing
+ * <em>Parameter Passing</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for enum '<em>Parameter Passing</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.mango.ParameterPassing
+ * @generated
+ */
+ EEnum getParameterPassing();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ MangoFactory getMangoFactory();
+
+} // MangoPackage
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java
index d63d794288..8f8846d0ec 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java
@@ -10,8 +10,8 @@
*/
package org.eclipse.emf.cdo.tests.legacy.mango.impl;
-import org.eclipse.emf.cdo.tests.mango.MangoFactory;
-import org.eclipse.emf.cdo.tests.mango.MangoPackage;
+import org.eclipse.emf.cdo.tests.legacy.mango.MangoFactory;
+import org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage;
import org.eclipse.emf.cdo.tests.mango.MangoParameter;
import org.eclipse.emf.cdo.tests.mango.MangoValue;
import org.eclipse.emf.cdo.tests.mango.MangoValueList;
@@ -41,12 +41,12 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory
*
* @generated NOT
*/
- public static org.eclipse.emf.cdo.tests.mango.MangoFactory init()
+ public static MangoFactory init()
{
try
{
MangoFactory theMangoFactory = (MangoFactory)EPackage.Registry.INSTANCE
- .getEFactory("http://www.eclipse.org/emf/CDO/tests/mango");
+ .getEFactory("http://www.eclipse.org/emf/CDO/tests/legacy/mango");
if (theMangoFactory instanceof MangoFactoryImpl)
{
return theMangoFactory;
@@ -170,10 +170,8 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory
{
ParameterPassing result = ParameterPassing.get(initialValue);
if (result == null)
- {
throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '"
+ eDataType.getName() + "'");
- }
return result;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java
index c38d2d4808..6de27e0e50 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java
@@ -10,8 +10,8 @@
*/
package org.eclipse.emf.cdo.tests.legacy.mango.impl;
-import org.eclipse.emf.cdo.tests.mango.MangoFactory;
-import org.eclipse.emf.cdo.tests.mango.MangoPackage;
+import org.eclipse.emf.cdo.tests.legacy.mango.MangoFactory;
+import org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage;
import org.eclipse.emf.cdo.tests.mango.MangoParameter;
import org.eclipse.emf.cdo.tests.mango.MangoValue;
import org.eclipse.emf.cdo.tests.mango.MangoValueList;
@@ -104,9 +104,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public static MangoPackage init()
{
if (isInited)
- {
return (MangoPackage)EPackage.Registry.INSTANCE.getEPackage(MangoPackage.eNS_URI);
- }
// Obtain or create and register package
MangoPackageImpl theMangoPackage = (MangoPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MangoPackageImpl ? EPackage.Registry.INSTANCE
@@ -244,9 +242,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -281,9 +277,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -302,7 +296,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMangoValueList_Name(), ecorePackage.getEString(), "name", null, 0, 1, MangoValueList.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMangoValueList_Values(), getMangoValue(), null, "values", null, 0, -1, MangoValueList.class,
+ initEReference(getMangoValueList_Values(), this.getMangoValue(), null, "values", null, 0, -1, MangoValueList.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
@@ -315,8 +309,9 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMangoParameter_Name(), ecorePackage.getEString(), "name", null, 0, 1, MangoParameter.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMangoParameter_Passing(), getParameterPassing(), "passing", null, 0, 1, MangoParameter.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMangoParameter_Passing(), this.getParameterPassing(), "passing", null, 0, 1,
+ MangoParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(parameterPassingEEnum, ParameterPassing.class, "ParameterPassing");
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java
index 8e55275b82..a47c97d614 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java
@@ -10,7 +10,7 @@
*/
package org.eclipse.emf.cdo.tests.legacy.mango.impl;
-import org.eclipse.emf.cdo.tests.mango.MangoPackage;
+import org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage;
import org.eclipse.emf.cdo.tests.mango.MangoParameter;
import org.eclipse.emf.cdo.tests.mango.ParameterPassing;
@@ -90,7 +90,7 @@ public class MangoParameterImpl extends EObjectImpl implements MangoParameter
@Override
protected EClass eStaticClass()
{
- return MangoPackage.Literals.MANGO_PARAMETER;
+ return MangoPackage.eINSTANCE.getMangoParameter();
}
/**
@@ -113,9 +113,7 @@ public class MangoParameterImpl extends EObjectImpl implements MangoParameter
String oldName = name;
name = newName;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_PARAMETER__NAME, oldName, name));
- }
}
/**
@@ -138,9 +136,7 @@ public class MangoParameterImpl extends EObjectImpl implements MangoParameter
ParameterPassing oldPassing = passing;
passing = newPassing == null ? PASSING_EDEFAULT : newPassing;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_PARAMETER__PASSING, oldPassing, passing));
- }
}
/**
@@ -228,9 +224,7 @@ public class MangoParameterImpl extends EObjectImpl implements MangoParameter
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java
index c0fa29f924..4d47f73959 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java
@@ -10,7 +10,7 @@
*/
package org.eclipse.emf.cdo.tests.legacy.mango.impl;
-import org.eclipse.emf.cdo.tests.mango.MangoPackage;
+import org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage;
import org.eclipse.emf.cdo.tests.mango.MangoValue;
import org.eclipse.emf.common.notify.Notification;
@@ -68,7 +68,7 @@ public class MangoValueImpl extends EObjectImpl implements MangoValue
@Override
protected EClass eStaticClass()
{
- return MangoPackage.Literals.MANGO_VALUE;
+ return MangoPackage.eINSTANCE.getMangoValue();
}
/**
@@ -91,9 +91,7 @@ public class MangoValueImpl extends EObjectImpl implements MangoValue
String oldName = name;
name = newName;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_VALUE__NAME, oldName, name));
- }
}
/**
@@ -171,9 +169,7 @@ public class MangoValueImpl extends EObjectImpl implements MangoValue
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java
index 4feff1e556..9b5f514b69 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java
@@ -84,7 +84,7 @@ public class MangoValueListImpl extends EObjectImpl implements MangoValueList
@Override
protected EClass eStaticClass()
{
- return MangoPackage.Literals.MANGO_VALUE_LIST;
+ return MangoPackage.eINSTANCE.getMangoValueList();
}
/**
@@ -107,9 +107,7 @@ public class MangoValueListImpl extends EObjectImpl implements MangoValueList
String oldName = name;
name = newName;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_VALUE_LIST__NAME, oldName, name));
- }
}
/**
@@ -213,9 +211,7 @@ public class MangoValueListImpl extends EObjectImpl implements MangoValueList
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoPackage.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoPackage.java
index 1535f7c357..cf4ea2578e 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoPackage.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoPackage.java
@@ -267,100 +267,4 @@ public interface MangoPackage extends EPackage
*/
MangoFactory getMangoFactory();
- /**
- * <!-- begin-user-doc --> Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- *
- * @generated
- */
- interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl
- * <em>Value List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getMangoValueList()
- * @generated
- */
- EClass MANGO_VALUE_LIST = eINSTANCE.getMangoValueList();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute MANGO_VALUE_LIST__NAME = eINSTANCE.getMangoValueList_Name();
-
- /**
- * The meta object literal for the '<em><b>Values</b></em>' reference list feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EReference MANGO_VALUE_LIST__VALUES = eINSTANCE.getMangoValueList_Values();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueImpl <em>Value</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoValueImpl
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getMangoValue()
- * @generated
- */
- EClass MANGO_VALUE = eINSTANCE.getMangoValue();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute MANGO_VALUE__NAME = eINSTANCE.getMangoValue_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl
- * <em>Parameter</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getMangoParameter()
- * @generated
- */
- EClass MANGO_PARAMETER = eINSTANCE.getMangoParameter();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute MANGO_PARAMETER__NAME = eINSTANCE.getMangoParameter_Name();
-
- /**
- * The meta object literal for the '<em><b>Passing</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute MANGO_PARAMETER__PASSING = eINSTANCE.getMangoParameter_Passing();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing
- * <em>Parameter Passing</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing
- * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getParameterPassing()
- * @generated
- */
- EEnum PARAMETER_PASSING = eINSTANCE.getParameterPassing();
-
- }
-
} // MangoPackage
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java
index 1985deff5c..a4703c07ad 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java
@@ -161,10 +161,8 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory
{
ParameterPassing result = ParameterPassing.get(initialValue);
if (result == null)
- {
throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '"
+ eDataType.getName() + "'");
- }
return result;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoPackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoPackageImpl.java
index 7912c3230d..eef11d513d 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoPackageImpl.java
@@ -99,9 +99,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public static MangoPackage init()
{
if (isInited)
- {
return (MangoPackage)EPackage.Registry.INSTANCE.getEPackage(MangoPackage.eNS_URI);
- }
// Obtain or create and register package
MangoPackageImpl theMangoPackage = (MangoPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MangoPackageImpl ? EPackage.Registry.INSTANCE
@@ -239,9 +237,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -276,9 +272,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -297,7 +291,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMangoValueList_Name(), ecorePackage.getEString(), "name", null, 0, 1, MangoValueList.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMangoValueList_Values(), getMangoValue(), null, "values", null, 0, -1, MangoValueList.class,
+ initEReference(getMangoValueList_Values(), this.getMangoValue(), null, "values", null, 0, -1, MangoValueList.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
@@ -310,8 +304,9 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMangoParameter_Name(), ecorePackage.getEString(), "name", null, 0, 1, MangoParameter.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMangoParameter_Passing(), getParameterPassing(), "passing", null, 0, 1, MangoParameter.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMangoParameter_Passing(), this.getParameterPassing(), "passing", null, 0, 1,
+ MangoParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(parameterPassingEEnum, ParameterPassing.class, "ParameterPassing");
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoParameterImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoParameterImpl.java
index 54912918b5..b1127936b2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoParameterImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoParameterImpl.java
@@ -50,7 +50,7 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter
@Override
protected EClass eStaticClass()
{
- return MangoPackage.Literals.MANGO_PARAMETER;
+ return MangoPackage.eINSTANCE.getMangoParameter();
}
/**
@@ -71,7 +71,7 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter
*/
public String getName()
{
- return (String)eGet(MangoPackage.Literals.MANGO_PARAMETER__NAME, true);
+ return (String)eGet(MangoPackage.eINSTANCE.getMangoParameter_Name(), true);
}
/**
@@ -81,7 +81,7 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter
*/
public void setName(String newName)
{
- eSet(MangoPackage.Literals.MANGO_PARAMETER__NAME, newName);
+ eSet(MangoPackage.eINSTANCE.getMangoParameter_Name(), newName);
}
/**
@@ -91,7 +91,7 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter
*/
public ParameterPassing getPassing()
{
- return (ParameterPassing)eGet(MangoPackage.Literals.MANGO_PARAMETER__PASSING, true);
+ return (ParameterPassing)eGet(MangoPackage.eINSTANCE.getMangoParameter_Passing(), true);
}
/**
@@ -101,7 +101,7 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter
*/
public void setPassing(ParameterPassing newPassing)
{
- eSet(MangoPackage.Literals.MANGO_PARAMETER__PASSING, newPassing);
+ eSet(MangoPackage.eINSTANCE.getMangoParameter_Passing(), newPassing);
}
} // ParameterImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueImpl.java
index c6a9c7d3c5..d93d2c80ef 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueImpl.java
@@ -48,7 +48,7 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue
@Override
protected EClass eStaticClass()
{
- return MangoPackage.Literals.MANGO_VALUE;
+ return MangoPackage.eINSTANCE.getMangoValue();
}
/**
@@ -69,7 +69,7 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue
*/
public String getName()
{
- return (String)eGet(MangoPackage.Literals.MANGO_VALUE__NAME, true);
+ return (String)eGet(MangoPackage.eINSTANCE.getMangoValue_Name(), true);
}
/**
@@ -79,7 +79,7 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue
*/
public void setName(String newName)
{
- eSet(MangoPackage.Literals.MANGO_VALUE__NAME, newName);
+ eSet(MangoPackage.eINSTANCE.getMangoValue_Name(), newName);
}
} // ValueImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueListImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueListImpl.java
index fbaa4f82ef..745d37a836 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueListImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoValueListImpl.java
@@ -51,7 +51,7 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList
@Override
protected EClass eStaticClass()
{
- return MangoPackage.Literals.MANGO_VALUE_LIST;
+ return MangoPackage.eINSTANCE.getMangoValueList();
}
/**
@@ -72,7 +72,7 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList
*/
public String getName()
{
- return (String)eGet(MangoPackage.Literals.MANGO_VALUE_LIST__NAME, true);
+ return (String)eGet(MangoPackage.eINSTANCE.getMangoValueList_Name(), true);
}
/**
@@ -82,7 +82,7 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList
*/
public void setName(String newName)
{
- eSet(MangoPackage.Literals.MANGO_VALUE_LIST__NAME, newName);
+ eSet(MangoPackage.eINSTANCE.getMangoValueList_Name(), newName);
}
/**
@@ -93,7 +93,7 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList
@SuppressWarnings("unchecked")
public EList<MangoValue> getValues()
{
- return (EList<MangoValue>)eGet(MangoPackage.Literals.MANGO_VALUE_LIST__VALUES, true);
+ return (EList<MangoValue>)eGet(MangoPackage.eINSTANCE.getMangoValueList_Values(), true);
}
} // ValueListImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
index 40961959a9..dfe2bcd5b5 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
@@ -99,9 +99,7 @@ public class MangoSwitch<T>
MangoValueList mangoValueList = (MangoValueList)theEObject;
T result = caseMangoValueList(mangoValueList);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case MangoPackage.MANGO_VALUE:
@@ -109,9 +107,7 @@ public class MangoSwitch<T>
MangoValue mangoValue = (MangoValue)theEObject;
T result = caseMangoValue(mangoValue);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case MangoPackage.MANGO_PARAMETER:
@@ -119,9 +115,7 @@ public class MangoSwitch<T>
MangoParameter mangoParameter = (MangoParameter)theEObject;
T result = caseMangoParameter(mangoParameter);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:

Back to the top