Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-02-05 10:41:53 +0000
committerEike Stepper2010-02-05 10:41:53 +0000
commit9945444baa1a2cb3c7a49859b9845567d527a1fd (patch)
treece4f3db07c43b86e19b55a5ca245638b42a5a46d /plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf
parent89bdb56d4cf31e285c34f0f76654760e5b2c105c (diff)
downloadcdo-9945444baa1a2cb3c7a49859b9845567d527a1fd.tar.gz
cdo-9945444baa1a2cb3c7a49859b9845567d527a1fd.tar.xz
cdo-9945444baa1a2cb3c7a49859b9845567d527a1fd.zip
fixed warnings
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/impl/MangoFactoryImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java4
-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/util/MangoSwitch.java6
8 files changed, 42 insertions, 8 deletions
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 d817179119..f7800aff46 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
@@ -170,8 +170,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/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 4433a187af..09180f11e5 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
@@ -104,7 +104,9 @@ 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
@@ -243,7 +245,9 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void createPackageContents()
{
if (isCreated)
+ {
return;
+ }
isCreated = true;
// Create classes and their features
@@ -278,7 +282,9 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void initializePackageContents()
{
if (isInitialized)
+ {
return;
+ }
isInitialized = true;
// Initialize package
@@ -297,7 +303,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(), this.getMangoValue(), null, "values", null, 0, -1, MangoValueList.class,
+ initEReference(getMangoValueList_Values(), 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,9 +316,8 @@ 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(), this.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(), 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 ddc8332083..40da0771c8 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
@@ -113,7 +113,9 @@ 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));
+ }
}
/**
@@ -136,7 +138,9 @@ 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));
+ }
}
/**
@@ -224,7 +228,9 @@ 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 0f9a21662a..9acd490afe 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
@@ -91,7 +91,9 @@ 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));
+ }
}
/**
@@ -169,7 +171,9 @@ 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 7c01df0c02..40c3cc5615 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
@@ -107,7 +107,9 @@ 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));
+ }
}
/**
@@ -211,7 +213,9 @@ 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/impl/MangoFactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/impl/MangoFactoryImpl.java
index cf6bcdfea5..9497795859 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,8 +161,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 63f0a99704..988b5af820 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,7 +99,9 @@ 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
@@ -238,7 +240,9 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void createPackageContents()
{
if (isCreated)
+ {
return;
+ }
isCreated = true;
// Create classes and their features
@@ -273,7 +277,9 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage
public void initializePackageContents()
{
if (isInitialized)
+ {
return;
+ }
isInitialized = true;
// Initialize package
@@ -292,7 +298,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(), this.getMangoValue(), null, "values", null, 0, -1, MangoValueList.class,
+ initEReference(getMangoValueList_Values(), 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);
@@ -305,9 +311,8 @@ 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(), this.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(), 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/util/MangoSwitch.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
index 7cf0c5438c..54b9a59ab1 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,7 +99,9 @@ public class MangoSwitch<T>
MangoValueList mangoValueList = (MangoValueList)theEObject;
T result = caseMangoValueList(mangoValueList);
if (result == null)
+ {
result = defaultCase(theEObject);
+ }
return result;
}
case MangoPackage.MANGO_VALUE:
@@ -107,7 +109,9 @@ public class MangoSwitch<T>
MangoValue mangoValue = (MangoValue)theEObject;
T result = caseMangoValue(mangoValue);
if (result == null)
+ {
result = defaultCase(theEObject);
+ }
return result;
}
case MangoPackage.MANGO_PARAMETER:
@@ -115,7 +119,9 @@ 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