Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-08-11 05:12:58 +0000
committerEike Stepper2008-08-11 05:12:58 +0000
commit5abef58c4a5449d9bbceea307bcfa52370febd5b (patch)
treeb9871988ef402d110550e5262fac51c25e7b9e1b /plugins/org.eclipse.emf.cdo.tests.mango/src
parent49bc984696d03d674cb534680efc3d8648b00116 (diff)
downloadcdo-5abef58c4a5449d9bbceea307bcfa52370febd5b.tar.gz
cdo-5abef58c4a5449d9bbceea307bcfa52370febd5b.tar.xz
cdo-5abef58c4a5449d9bbceea307bcfa52370febd5b.zip
formatting
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.mango/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoPackageImpl.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java17
3 files changed, 34 insertions, 14 deletions
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 05566921c6..05ea59d38a 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
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: MangoFactoryImpl.java,v 1.4 2008-06-12 17:22:17 estepper Exp $
+ * $Id: MangoFactoryImpl.java,v 1.5 2008-08-11 05:11:36 estepper Exp $
*/
package org.eclipse.emf.cdo.tests.mango.impl;
@@ -71,11 +71,11 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory
switch (eClass.getClassifierID())
{
case MangoPackage.VALUE_LIST:
- return (EObject)createValueList();
+ return createValueList();
case MangoPackage.VALUE:
- return (EObject)createValue();
+ return createValue();
case MangoPackage.PARAMETER:
- return (EObject)createParameter();
+ return createParameter();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -157,8 +157,10 @@ 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 e974ef2a8e..099d3ded0f 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
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: MangoPackageImpl.java,v 1.4 2008-06-12 17:22:17 estepper Exp $
+ * $Id: MangoPackageImpl.java,v 1.5 2008-08-11 05:11:36 estepper Exp $
*/
package org.eclipse.emf.cdo.tests.mango.impl;
@@ -100,7 +100,10 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
*/
public static MangoPackage init()
{
- if (isInited) return (MangoPackage)EPackage.Registry.INSTANCE.getEPackage(MangoPackage.eNS_URI);
+ if (isInited)
+ {
+ return (MangoPackage)EPackage.Registry.INSTANCE.getEPackage(MangoPackage.eNS_URI);
+ }
// Obtain or create and register package
MangoPackageImpl theMangoPackage = (MangoPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof MangoPackageImpl ? EPackage.Registry.INSTANCE
@@ -236,7 +239,10 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
*/
public void createPackageContents()
{
- if (isCreated) return;
+ if (isCreated)
+ {
+ return;
+ }
isCreated = true;
// Create classes and their features
@@ -270,7 +276,10 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
*/
public void initializePackageContents()
{
- if (isInitialized) return;
+ if (isInitialized)
+ {
+ return;
+ }
isInitialized = true;
// Initialize package
@@ -288,7 +297,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
initEClass(valueListEClass, ValueList.class, "ValueList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getValueList_Name(), ecorePackage.getEString(), "name", null, 0, 1, ValueList.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getValueList_Values(), this.getValue(), null, "values", null, 0, -1, ValueList.class, !IS_TRANSIENT,
+ initEReference(getValueList_Values(), getValue(), null, "values", null, 0, -1, ValueList.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
@@ -299,7 +308,7 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getParameter_Name(), ecorePackage.getEString(), "name", null, 0, 1, Parameter.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getParameter_Passing(), this.getParameterPassing(), "passing", null, 0, 1, Parameter.class,
+ initEAttribute(getParameter_Passing(), getParameterPassing(), "passing", null, 0, 1, Parameter.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
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 4e308b2766..20e9d375ff 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
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: MangoSwitch.java,v 1.4 2008-06-12 17:22:17 estepper Exp $
+ * $Id: MangoSwitch.java,v 1.5 2008-08-11 05:11:36 estepper Exp $
*/
package org.eclipse.emf.cdo.tests.mango.util;
@@ -94,21 +94,30 @@ public class MangoSwitch<T>
{
ValueList valueList = (ValueList)theEObject;
T result = caseValueList(valueList);
- if (result == null) result = defaultCase(theEObject);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
return result;
}
case MangoPackage.VALUE:
{
Value value = (Value)theEObject;
T result = caseValue(value);
- if (result == null) result = defaultCase(theEObject);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
return result;
}
case MangoPackage.PARAMETER:
{
Parameter parameter = (Parameter)theEObject;
T result = caseParameter(parameter);
- if (result == null) result = defaultCase(theEObject);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
return result;
}
default:

Back to the top