From 049312276c051a904c1726fe9f037d1948027274 Mon Sep 17 00:00:00 2001 From: Eike Stepper Date: Sun, 6 Jan 2013 18:16:50 +0100 Subject: mango --- .../META-INF/MANIFEST.MF | 7 +- .../model/mango.legacy-genmodel | 41 --- .../model/mango.legacy.genmodel | 29 ++ .../emf/cdo/tests/legacy/mango/MangoFactory.java | 65 ----- .../emf/cdo/tests/legacy/mango/MangoPackage.java | 270 ----------------- .../tests/legacy/mango/impl/MangoFactoryImpl.java | 212 -------------- .../tests/legacy/mango/impl/MangoPackageImpl.java | 325 --------------------- .../legacy/mango/impl/MangoParameterImpl.java | 238 --------------- .../tests/legacy/mango/impl/MangoValueImpl.java | 181 ------------ .../legacy/mango/impl/MangoValueListImpl.java | 223 -------------- .../eclipse/emf/cdo/tests/mango/MangoFactory.java | 21 +- .../eclipse/emf/cdo/tests/mango/MangoPackage.java | 99 +++---- .../emf/cdo/tests/mango/MangoParameter.java | 35 +-- .../eclipse/emf/cdo/tests/mango/MangoValue.java | 13 +- .../emf/cdo/tests/mango/MangoValueList.java | 27 +- .../emf/cdo/tests/mango/ParameterPassing.java | 53 ++-- .../emf/cdo/tests/mango/impl/MangoFactoryImpl.java | 24 +- .../emf/cdo/tests/mango/impl/MangoPackageImpl.java | 38 +-- .../cdo/tests/mango/impl/MangoParameterImpl.java | 13 +- .../emf/cdo/tests/mango/impl/MangoValueImpl.java | 9 +- .../cdo/tests/mango/impl/MangoValueListImpl.java | 12 +- .../emf/cdo/tests/mango/legacy/MangoFactory.java | 67 +++++ .../emf/cdo/tests/mango/legacy/MangoPackage.java | 259 ++++++++++++++++ .../tests/mango/legacy/impl/MangoFactoryImpl.java | 202 +++++++++++++ .../tests/mango/legacy/impl/MangoPackageImpl.java | 307 +++++++++++++++++++ .../mango/legacy/impl/MangoParameterImpl.java | 227 ++++++++++++++ .../tests/mango/legacy/impl/MangoValueImpl.java | 172 +++++++++++ .../mango/legacy/impl/MangoValueListImpl.java | 213 ++++++++++++++ .../mango/legacy/util/MangoAdapterFactory.java | 183 ++++++++++++ .../cdo/tests/mango/legacy/util/MangoSwitch.java | 195 +++++++++++++ .../cdo/tests/mango/util/MangoAdapterFactory.java | 42 ++- .../emf/cdo/tests/mango/util/MangoSwitch.java | 44 ++- 32 files changed, 2035 insertions(+), 1811 deletions(-) delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy-genmodel create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy.genmodel delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoFactory.java delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoPackage.java delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java delete mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoFactory.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoPackage.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoFactoryImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoPackageImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoParameterImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueListImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoAdapterFactory.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoSwitch.java diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.mango/META-INF/MANIFEST.MF index 3fd3eaadd2..9de5f2902c 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.tests.mango/META-INF/MANIFEST.MF @@ -10,9 +10,10 @@ Bundle-ClassPath: . Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)";visibility:=reexport, org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport -Export-Package: org.eclipse.emf.cdo.tests.legacy.mango;version="3.0.200", - org.eclipse.emf.cdo.tests.legacy.mango.impl;version="3.0.200", - org.eclipse.emf.cdo.tests.mango;version="3.0.300", +Export-Package: org.eclipse.emf.cdo.tests.mango;version="3.0.300", org.eclipse.emf.cdo.tests.mango.impl;version="3.0.300", + org.eclipse.emf.cdo.tests.mango.legacy;version="3.0.300", + org.eclipse.emf.cdo.tests.mango.legacy.impl;version="3.0.300", + org.eclipse.emf.cdo.tests.mango.legacy.util;version="3.0.300", org.eclipse.emf.cdo.tests.mango.util;version="3.0.300" diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy-genmodel b/plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy-genmodel deleted file mode 100644 index 4d334cf9e0..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy-genmodel +++ /dev/null @@ -1,41 +0,0 @@ - - - mango.ecore - CDO=org.eclipse.emf.cdo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy.genmodel b/plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy.genmodel new file mode 100644 index 0000000000..985705eb1d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/model/mango.legacy.genmodel @@ -0,0 +1,29 @@ + + + mango.ecore + CDO=org.eclipse.emf.cdo + + + + + + + + + + + + + + + + + + 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 deleted file mode 100644 index 2c59237ae7..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoFactory.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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; - -/** - * The Factory for the model. It provides a create method for each non-abstract class of - * the model. - * - * @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. - * - * @generated - */ - MangoFactory eINSTANCE = org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoFactoryImpl.init(); - - /** - * Returns a new object of class 'Value List'. - * - * @return a new object of class 'Value List'. - * @generated - */ - MangoValueList createMangoValueList(); - - /** - * Returns a new object of class 'Value'. - * - * @return a new object of class 'Value'. - * @generated - */ - MangoValue createMangoValue(); - - /** - * Returns a new object of class 'Parameter'. - * - * @return a new object of class 'Parameter'. - * @generated - */ - MangoParameter createMangoParameter(); - - /** - * Returns the package supported by this factory. - * - * @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 deleted file mode 100644 index df8f8fe567..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/MangoPackage.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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; - -/** - * The Package for the model. It contains accessors for the meta objects to represent - * - * - * - * @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. - * - * @generated - */ - String eNAME = "mango"; - - /** - * The package namespace URI. - * - * @generated - */ - String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/legacy/mango"; - - /** - * The package namespace name. - * - * @generated - */ - String eNS_PREFIX = "mango"; - - /** - * The singleton instance of the package. - * - * @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 - * Value List}' class. - * - * @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 'Name' attribute. - * - * @generated - * @ordered - */ - int MANGO_VALUE_LIST__NAME = 0; - - /** - * The feature id for the 'Values' reference list. - * - * @generated - * @ordered - */ - int MANGO_VALUE_LIST__VALUES = 1; - - /** - * The number of structural features of the 'Value List' class. - * - * @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 Value}' - * class. - * - * @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 'Name' attribute. - * - * @generated - * @ordered - */ - int MANGO_VALUE__NAME = 0; - - /** - * The number of structural features of the 'Value' class. - * - * @generated - * @ordered - */ - int MANGO_VALUE_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoParameterImpl - * Parameter}' class. - * - * @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 'Name' attribute. - * - * @generated - * @ordered - */ - int MANGO_PARAMETER__NAME = 0; - - /** - * The feature id for the 'Passing' attribute. - * - * @generated - * @ordered - */ - int MANGO_PARAMETER__PASSING = 1; - - /** - * The number of structural features of the 'Parameter' class. - * - * @generated - * @ordered - */ - int MANGO_PARAMETER_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.mango.ParameterPassing - * Parameter Passing}' enum. - * - * @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 - * Value List}'. - * - * @return the meta object for class 'Value List'. - * @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 - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @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 Values}'. - * - * - * @return the meta object for the reference list 'Values'. - * @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 Value}'. - * - * @return the meta object for class 'Value'. - * @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 - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @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 Parameter} - * '. - * - * @return the meta object for class 'Parameter'. - * @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 - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @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 - * Passing}'. - * - * @return the meta object for the attribute 'Passing'. - * @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 - * Parameter Passing}'. - * - * @return the meta object for enum 'Parameter Passing'. - * @see org.eclipse.emf.cdo.tests.legacy.mango.ParameterPassing - * @generated - */ - EEnum getParameterPassing(); - - /** - * Returns the factory that creates the instances of the model. - * - * @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 deleted file mode 100644 index d3781d3e7e..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoFactoryImpl.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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.impl; - -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; -import org.eclipse.emf.cdo.tests.mango.ParameterPassing; - -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; - -/** - * An implementation of the model Factory. - * - * @generated - */ -public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory -{ - /** - * @ADDED - */ - public static final MangoFactory eINSTANCE = org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoFactoryImpl.init(); - - /** - * Creates the default factory implementation. - * - * @generated NOT - */ - public static MangoFactory init() - { - try - { - MangoFactory theMangoFactory = (MangoFactory)EPackage.Registry.INSTANCE - .getEFactory("http://www.eclipse.org/emf/CDO/tests/legacy/mango"); - if (theMangoFactory instanceof MangoFactoryImpl) - { - return theMangoFactory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - - MangoFactoryImpl factory = new MangoFactoryImpl(); - // EPackage.Registry.INSTANCE.put(factory.getEPackage().getNsURI(), factory); - EPackage.Registry.INSTANCE.put("http://www.eclipse.org/emf/CDO/tests/legacy/mango", factory); - return factory; - } - - /** - * Creates an instance of the factory. - * - * @generated - */ - public MangoFactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case MangoPackage.MANGO_VALUE_LIST: - return createMangoValueList(); - case MangoPackage.MANGO_VALUE: - return createMangoValue(); - case MangoPackage.MANGO_PARAMETER: - return createMangoParameter(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) - { - switch (eDataType.getClassifierID()) - { - case MangoPackage.PARAMETER_PASSING: - return createParameterPassingFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) - { - switch (eDataType.getClassifierID()) - { - case MangoPackage.PARAMETER_PASSING: - return convertParameterPassingToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public MangoValueList createMangoValueList() - { - MangoValueListImpl mangoValueList = new MangoValueListImpl(); - return mangoValueList; - } - - /** - * - * - * @generated - */ - public MangoValue createMangoValue() - { - MangoValueImpl mangoValue = new MangoValueImpl(); - return mangoValue; - } - - /** - * - * - * @generated - */ - public MangoParameter createMangoParameter() - { - MangoParameterImpl mangoParameter = new MangoParameterImpl(); - return mangoParameter; - } - - /** - * - * - * @generated - */ - public ParameterPassing createParameterPassingFromString(EDataType eDataType, String initialValue) - { - ParameterPassing result = ParameterPassing.get(initialValue); - if (result == null) - { - throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" - + eDataType.getName() + "'"); - } - return result; - } - - /** - * - * - * @generated - */ - public String convertParameterPassingToString(EDataType eDataType, Object instanceValue) - { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - public MangoPackage getMangoPackage() - { - return (MangoPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static MangoPackage getPackage() - { - return MangoPackage.eINSTANCE; - } - -} // MangoFactoryImpl 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 deleted file mode 100644 index d74f0e9534..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoPackageImpl.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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.impl; - -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; -import org.eclipse.emf.cdo.tests.mango.ParameterPassing; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; - -/** - * An implementation of the model Package. - * - * @generated - */ -public class MangoPackageImpl extends EPackageImpl implements MangoPackage -{ - /** - * @ADDED - */ - public static final MangoPackage eINSTANCE = org.eclipse.emf.cdo.tests.legacy.mango.impl.MangoPackageImpl.init(); - - /** - * - * - * @generated - */ - private EClass mangoValueListEClass = null; - - /** - * - * - * @generated - */ - private EClass mangoValueEClass = null; - - /** - * - * - * @generated - */ - private EClass mangoParameterEClass = null; - - /** - * - * - * @generated - */ - private EEnum parameterPassingEEnum = null; - - /** - * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry - * EPackage.Registry} by the package package URI value. - *

- * 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. - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage#eNS_URI - * @see #init() - * @generated - */ - private MangoPackageImpl() - { - super(eNS_URI, MangoFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

- * This method is used to initialize {@link MangoPackage#eINSTANCE} when that field is accessed. Clients should not - * invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - 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 - .get(eNS_URI) : new MangoPackageImpl()); - - isInited = true; - - // Create package meta-data objects - theMangoPackage.createPackageContents(); - - // Initialize created meta-data - theMangoPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theMangoPackage.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(MangoPackage.eNS_URI, theMangoPackage); - return theMangoPackage; - } - - /** - * - * - * @generated - */ - public EClass getMangoValueList() - { - return mangoValueListEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getMangoValueList_Name() - { - return (EAttribute)mangoValueListEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getMangoValueList_Values() - { - return (EReference)mangoValueListEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getMangoValue() - { - return mangoValueEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getMangoValue_Name() - { - return (EAttribute)mangoValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getMangoParameter() - { - return mangoParameterEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getMangoParameter_Name() - { - return (EAttribute)mangoParameterEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getMangoParameter_Passing() - { - return (EAttribute)mangoParameterEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getParameterPassing() - { - return parameterPassingEEnum; - } - - /** - * - * - * @generated - */ - public MangoFactory getMangoFactory() - { - return (MangoFactory)getEFactoryInstance(); - } - - /** - * - * - * @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. - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) - return; - isCreated = true; - - // Create classes and their features - mangoValueListEClass = createEClass(MANGO_VALUE_LIST); - createEAttribute(mangoValueListEClass, MANGO_VALUE_LIST__NAME); - createEReference(mangoValueListEClass, MANGO_VALUE_LIST__VALUES); - - mangoValueEClass = createEClass(MANGO_VALUE); - createEAttribute(mangoValueEClass, MANGO_VALUE__NAME); - - mangoParameterEClass = createEClass(MANGO_PARAMETER); - createEAttribute(mangoParameterEClass, MANGO_PARAMETER__NAME); - createEAttribute(mangoParameterEClass, MANGO_PARAMETER__PASSING); - - // Create enums - parameterPassingEEnum = createEEnum(PARAMETER_PASSING); - } - - /** - * - * - * @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. - * - * @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 - - // Initialize classes and features; add operations and parameters - initEClass(mangoValueListEClass, MangoValueList.class, "MangoValueList", !IS_ABSTRACT, !IS_INTERFACE, - 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, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - - initEClass(mangoValueEClass, MangoValue.class, "MangoValue", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getMangoValue_Name(), ecorePackage.getEString(), "name", null, 0, 1, MangoValue.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(mangoParameterEClass, MangoParameter.class, "MangoParameter", !IS_ABSTRACT, !IS_INTERFACE, - 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); - - // Initialize enums and add enum literals - initEEnum(parameterPassingEEnum, ParameterPassing.class, "ParameterPassing"); - addEEnumLiteral(parameterPassingEEnum, ParameterPassing.BY_VALUE); - addEEnumLiteral(parameterPassingEEnum, ParameterPassing.BY_REFERENCE); - - // Create resource - createResource(eNS_URI); - } - -} // MangoPackageImpl 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 deleted file mode 100644 index 73f8c38891..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoParameterImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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.impl; - -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; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -/** - * An implementation of the model object 'Parameter'. - *

- * The following features are implemented: - *

- *

- * - * @generated - */ -public class MangoParameterImpl extends EObjectImpl implements MangoParameter -{ - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getPassing() Passing}' attribute. - * - * @see #getPassing() - * @generated - * @ordered - */ - protected static final ParameterPassing PASSING_EDEFAULT = ParameterPassing.BY_VALUE; - - /** - * The cached value of the '{@link #getPassing() Passing}' attribute. - * - * @see #getPassing() - * @generated - * @ordered - */ - protected ParameterPassing passing = PASSING_EDEFAULT; - - /** - * - * - * @generated - */ - protected MangoParameterImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return MangoPackage.eINSTANCE.getMangoParameter(); - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_PARAMETER__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public ParameterPassing getPassing() - { - return passing; - } - - /** - * - * - * @generated - */ - public void setPassing(ParameterPassing newPassing) - { - ParameterPassing oldPassing = passing; - passing = newPassing == null ? PASSING_EDEFAULT : newPassing; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_PARAMETER__PASSING, oldPassing, passing)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MangoPackage.MANGO_PARAMETER__NAME: - return getName(); - case MangoPackage.MANGO_PARAMETER__PASSING: - return getPassing(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MangoPackage.MANGO_PARAMETER__NAME: - setName((String)newValue); - return; - case MangoPackage.MANGO_PARAMETER__PASSING: - setPassing((ParameterPassing)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case MangoPackage.MANGO_PARAMETER__NAME: - setName(NAME_EDEFAULT); - return; - case MangoPackage.MANGO_PARAMETER__PASSING: - setPassing(PASSING_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MangoPackage.MANGO_PARAMETER__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case MangoPackage.MANGO_PARAMETER__PASSING: - return passing != PASSING_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(", passing: "); - result.append(passing); - result.append(')'); - return result.toString(); - } - -} // ParameterImpl 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 deleted file mode 100644 index 2e47920796..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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.impl; - -import org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage; -import org.eclipse.emf.cdo.tests.mango.MangoValue; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -/** - * An implementation of the model object 'Value'. - *

- * The following features are implemented: - *

- *

- * - * @generated - */ -public class MangoValueImpl extends EObjectImpl implements MangoValue -{ - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected MangoValueImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return MangoPackage.eINSTANCE.getMangoValue(); - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_VALUE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE__NAME: - return getName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE__NAME: - setName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE__NAME: - setName(NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} // ValueImpl 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 deleted file mode 100644 index ac768331ec..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/legacy/mango/impl/MangoValueListImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2004 - 2012 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.impl; - -import org.eclipse.emf.cdo.tests.mango.MangoPackage; -import org.eclipse.emf.cdo.tests.mango.MangoValue; -import org.eclipse.emf.cdo.tests.mango.MangoValueList; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Value List'. - *

- * The following features are implemented: - *

- *

- * - * @generated - */ -public class MangoValueListImpl extends EObjectImpl implements MangoValueList -{ - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getValues() Values}' reference list. - * - * @see #getValues() - * @generated - * @ordered - */ - protected EList values; - - /** - * - * - * @generated - */ - protected MangoValueListImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return MangoPackage.eINSTANCE.getMangoValueList(); - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_VALUE_LIST__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getValues() - { - if (values == null) - { - values = new EObjectResolvingEList(MangoValue.class, this, MangoPackage.MANGO_VALUE_LIST__VALUES); - } - return values; - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE_LIST__NAME: - return getName(); - case MangoPackage.MANGO_VALUE_LIST__VALUES: - return getValues(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE_LIST__NAME: - setName((String)newValue); - return; - case MangoPackage.MANGO_VALUE_LIST__VALUES: - getValues().clear(); - getValues().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE_LIST__NAME: - setName(NAME_EDEFAULT); - return; - case MangoPackage.MANGO_VALUE_LIST__VALUES: - getValues().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MangoPackage.MANGO_VALUE_LIST__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case MangoPackage.MANGO_VALUE_LIST__VALUES: - return values != null && !values.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} // ValueListImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoFactory.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoFactory.java index 21b77eb3f9..e51ed4b4ef 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoFactory.java @@ -15,46 +15,45 @@ import org.eclipse.emf.ecore.EFactory; /** * The Factory for the model. It provides a create method for each non-abstract class of * the model. - * * @see org.eclipse.emf.cdo.tests.mango.MangoPackage * @generated */ public interface MangoFactory extends EFactory { /** - * The singleton instance of the factory. - * + * The singleton instance of the factory. + * * @generated */ MangoFactory eINSTANCE = org.eclipse.emf.cdo.tests.mango.impl.MangoFactoryImpl.init(); /** - * Returns a new object of class 'Value List'. - * + * Returns a new object of class 'Value List'. + * * @return a new object of class 'Value List'. * @generated */ MangoValueList createMangoValueList(); /** - * Returns a new object of class 'Value'. - * + * Returns a new object of class 'Value'. + * * @return a new object of class 'Value'. * @generated */ MangoValue createMangoValue(); /** - * Returns a new object of class 'Parameter'. - * + * Returns a new object of class 'Parameter'. + * * @return a new object of class 'Parameter'. * @generated */ MangoParameter createMangoParameter(); /** - * Returns the package supported by this factory. - * + * Returns the package supported by this factory. + * * @return the package supported by this factory. * @generated */ 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 c6708f45a7..5ad0d3b833 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 @@ -25,7 +25,6 @@ import org.eclipse.emf.ecore.EReference; *
  • and each data type
  • * * - * * @see org.eclipse.emf.cdo.tests.mango.MangoFactory * @model kind="package" * @generated @@ -33,37 +32,36 @@ import org.eclipse.emf.ecore.EReference; public interface MangoPackage extends EPackage { /** - * The package name. - * + * The package name. + * * @generated */ String eNAME = "mango"; /** - * The package namespace URI. - * + * The package namespace URI. + * * @generated */ String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/mango"; /** - * The package namespace name. - * + * The package namespace name. + * * @generated */ String eNS_PREFIX = "mango"; /** - * The singleton instance of the package. - * + * The singleton instance of the package. + * * @generated */ MangoPackage eINSTANCE = org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl.init(); /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl Value List}' - * class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl Value List}' class. + * * @see org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getMangoValueList() * @generated @@ -71,24 +69,24 @@ public interface MangoPackage extends EPackage int MANGO_VALUE_LIST = 0; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int MANGO_VALUE_LIST__NAME = 0; /** - * The feature id for the 'Values' reference list. - * + * The feature id for the 'Values' reference list. + * * @generated * @ordered */ int MANGO_VALUE_LIST__VALUES = 1; /** - * The number of structural features of the 'Value List' class. - * + * The number of structural features of the 'Value List' class. + * * @generated * @ordered */ @@ -105,25 +103,24 @@ public interface MangoPackage extends EPackage int MANGO_VALUE = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int MANGO_VALUE__NAME = 0; /** - * The number of structural features of the 'Value' class. - * + * The number of structural features of the 'Value' class. + * * @generated * @ordered */ int MANGO_VALUE_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl Parameter}' - * class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl Parameter}' class. + * * @see org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getMangoParameter() * @generated @@ -131,33 +128,32 @@ public interface MangoPackage extends EPackage int MANGO_PARAMETER = 2; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int MANGO_PARAMETER__NAME = 0; /** - * The feature id for the 'Passing' attribute. - * + * The feature id for the 'Passing' attribute. + * * @generated * @ordered */ int MANGO_PARAMETER__PASSING = 1; /** - * The number of structural features of the 'Parameter' class. - * + * The number of structural features of the 'Parameter' class. + * * @generated * @ordered */ int MANGO_PARAMETER_FEATURE_COUNT = 2; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing Parameter Passing}' - * enum. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing Parameter Passing}' enum. + * * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing * @see org.eclipse.emf.cdo.tests.mango.impl.MangoPackageImpl#getParameterPassing() * @generated @@ -167,7 +163,6 @@ public interface MangoPackage extends EPackage /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList Value List}'. * - * * @return the meta object for class 'Value List'. * @see org.eclipse.emf.cdo.tests.mango.MangoValueList * @generated @@ -175,9 +170,8 @@ public interface MangoPackage extends EPackage EClass getMangoValueList(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getName - * Name}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.mango.MangoValueList#getName() * @see #getMangoValueList() @@ -186,9 +180,8 @@ public interface MangoPackage extends EPackage EAttribute getMangoValueList_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues - * Values}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues Values}'. + * * @return the meta object for the reference list 'Values'. * @see org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues() * @see #getMangoValueList() @@ -207,9 +200,8 @@ public interface MangoPackage extends EPackage EClass getMangoValue(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoValue#getName Name} - * '. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoValue#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.mango.MangoValue#getName() * @see #getMangoValue() @@ -228,9 +220,8 @@ public interface MangoPackage extends EPackage EClass getMangoParameter(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getName - * Name}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.mango.MangoParameter#getName() * @see #getMangoParameter() @@ -239,9 +230,8 @@ public interface MangoPackage extends EPackage EAttribute getMangoParameter_Name(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing - * Passing}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing Passing}'. + * * @return the meta object for the attribute 'Passing'. * @see org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing() * @see #getMangoParameter() @@ -250,9 +240,8 @@ public interface MangoPackage extends EPackage EAttribute getMangoParameter_Passing(); /** - * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing - * Parameter Passing}'. - * + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing Parameter Passing}'. + * * @return the meta object for enum 'Parameter Passing'. * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing * @generated @@ -260,8 +249,8 @@ public interface MangoPackage extends EPackage EEnum getParameterPassing(); /** - * Returns the factory that creates the instances of the model. - * + * Returns the factory that creates the instances of the model. + * * @return the factory that creates the instances of the model. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoParameter.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoParameter.java index f8a721d0d5..a50d1c1896 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoParameter.java +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoParameter.java @@ -14,30 +14,31 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Parameter'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing Passing}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing Passing}
    • *
    *

    - * - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoParameter() + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoParameter() * @model * @generated */ public interface MangoParameter extends EObject { /** - * Returns the value of the 'Name' attribute. + * Returns the value of the 'Name' attribute. + * *

    * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... *

    * - * * @return the value of the 'Name' attribute. * @see #setName(String) - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoParameter_Name() + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoParameter_Name() * @model * @generated */ @@ -46,38 +47,34 @@ public interface MangoParameter extends EObject /** * Sets the value of the '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getName Name}' attribute. * - * - * @param value - * the new value of the 'Name' attribute. + * @param value the new value of the 'Name' attribute. * @see #getName() * @generated */ void setName(String value); /** - * Returns the value of the 'Passing' attribute. The literals are from the enumeration - * {@link org.eclipse.emf.cdo.tests.mango.ParameterPassing}. + * Returns the value of the 'Passing' attribute. + * The literals are from the enumeration {@link org.eclipse.emf.cdo.tests.mango.ParameterPassing}. + * *

    * If the meaning of the 'Passing' attribute isn't clear, there really should be more of a description * here... *

    * - * * @return the value of the 'Passing' attribute. * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing * @see #setPassing(ParameterPassing) - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoParameter_Passing() + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoParameter_Passing() * @model * @generated */ ParameterPassing getPassing(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing Passing}' - * attribute. - * - * @param value - * the new value of the 'Passing' attribute. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing Passing}' attribute. + * + * @param value the new value of the 'Passing' attribute. * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing * @see #getPassing() * @generated diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValue.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValue.java index 3a555ba322..9fe321a610 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValue.java +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValue.java @@ -14,29 +14,30 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Value'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoValue#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoValue#getName Name}
    • *
    *

    - * - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoValue() + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoValue() * @model * @generated */ public interface MangoValue extends EObject { /** - * Returns the value of the 'Name' attribute. + * Returns the value of the 'Name' attribute. + * *

    * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... *

    * - * * @return the value of the 'Name' attribute. * @see #setName(String) - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoValue_Name() + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoValue_Name() * @model * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValueList.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValueList.java index 07da3c2cef..d50cdfd669 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValueList.java +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/MangoValueList.java @@ -15,30 +15,31 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Value List'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues Values}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues Values}
    • *
    *

    - * - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoValueList() + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoValueList() * @model * @generated */ public interface MangoValueList extends EObject { /** - * Returns the value of the 'Name' attribute. + * Returns the value of the 'Name' attribute. + * *

    * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... *

    * - * * @return the value of the 'Name' attribute. * @see #setName(String) - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoValueList_Name() + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoValueList_Name() * @model * @generated */ @@ -47,25 +48,23 @@ public interface MangoValueList extends EObject /** * Sets the value of the '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getName Name}' attribute. * - * - * @param value - * the new value of the 'Name' attribute. + * @param value the new value of the 'Name' attribute. * @see #getName() * @generated */ void setName(String value); /** - * Returns the value of the 'Values' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.mango.MangoValue}. + * Returns the value of the 'Values' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.mango.MangoValue}. + * *

    * If the meaning of the 'Values' reference list isn't clear, there really should be more of a description * here... *

    * - * * @return the value of the 'Values' reference list. - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getMangoValueList_Values() + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getMangoValueList_Values() * @model * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/ParameterPassing.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/ParameterPassing.java index c9b604768d..a7ef203bc7 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/ParameterPassing.java +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/ParameterPassing.java @@ -19,16 +19,15 @@ import java.util.List; /** * A representation of the literals of the enumeration 'Parameter Passing', and * utility methods for working with them. - * - * @see org.eclipse.emf.cdo.tests.mango.MangoPackage#getParameterPassing() + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage#getParameterPassing() * @model * @generated */ public enum ParameterPassing implements Enumerator { /** - * The 'By Value' literal object. - * + * The 'By Value' literal object. + * * @see #BY_VALUE_VALUE * @generated * @ordered @@ -36,8 +35,8 @@ public enum ParameterPassing implements Enumerator BY_VALUE(0, "ByValue", "ByValue"), /** - * The 'By Reference' literal object. - * + * The 'By Reference' literal object. + * * @see #BY_REFERENCE_VALUE * @generated * @ordered @@ -45,13 +44,13 @@ public enum ParameterPassing implements Enumerator BY_REFERENCE(1, "ByReference", "ByReference"); /** - * The 'By Value' literal value. + * The 'By Value' literal value. + * *

    * If the meaning of 'By Value' literal object isn't clear, there really should be more of a * description here... *

    * - * * @see #BY_VALUE * @model name="ByValue" * @generated @@ -60,13 +59,13 @@ public enum ParameterPassing implements Enumerator public static final int BY_VALUE_VALUE = 0; /** - * The 'By Reference' literal value. + * The 'By Reference' literal value. + * *

    * If the meaning of 'By Reference' literal object isn't clear, there really should be more of a * description here... *

    * - * * @see #BY_REFERENCE * @model name="ByReference" * @generated @@ -75,24 +74,24 @@ public enum ParameterPassing implements Enumerator public static final int BY_REFERENCE_VALUE = 1; /** - * An array of all the 'Parameter Passing' enumerators. - * + * An array of all the 'Parameter Passing' enumerators. + * * @generated */ private static final ParameterPassing[] VALUES_ARRAY = new ParameterPassing[] { BY_VALUE, BY_REFERENCE, }; /** - * A public read-only list of all the 'Parameter Passing' enumerators. - * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** - * Returns the 'Parameter Passing' literal with the specified literal value. + * Returns the 'Parameter Passing' literal with the specified literal value. + * * - * * @generated */ public static ParameterPassing get(String literal) @@ -109,9 +108,9 @@ public enum ParameterPassing implements Enumerator } /** - * Returns the 'Parameter Passing' literal with the specified name. - * * @generated */ public static ParameterPassing getByName(String name) @@ -128,9 +127,9 @@ public enum ParameterPassing implements Enumerator } /** - * Returns the 'Parameter Passing' literal with the specified integer value. + * Returns the 'Parameter Passing' literal with the specified integer value. + * * - * * @generated */ public static ParameterPassing get(int value) @@ -147,28 +146,25 @@ public enum ParameterPassing implements Enumerator /** * - * * @generated */ private final int value; /** * - * * @generated */ private final String name; /** * - * * @generated */ private final String literal; /** - * Only this class can construct instances. - * + * Only this class can construct instances. + * * @generated */ private ParameterPassing(int value, String name, String literal) @@ -180,7 +176,6 @@ public enum ParameterPassing implements Enumerator /** * - * * @generated */ public int getValue() @@ -190,7 +185,6 @@ public enum ParameterPassing implements Enumerator /** * - * * @generated */ public String getName() @@ -200,7 +194,6 @@ public enum ParameterPassing implements Enumerator /** * - * * @generated */ public String getLiteral() @@ -209,9 +202,9 @@ public enum ParameterPassing implements Enumerator } /** - * Returns the literal value of the enumerator, which is its string representation. - * * @generated */ @Override 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 538881a8fb..2d8de16a9a 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 @@ -4,12 +4,13 @@ * 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.mango.impl; +//import org.eclipse.emf.cdo.tests.mango.*; import org.eclipse.emf.cdo.tests.mango.MangoFactory; import org.eclipse.emf.cdo.tests.mango.MangoPackage; import org.eclipse.emf.cdo.tests.mango.MangoParameter; @@ -26,14 +27,13 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * An implementation of the model Factory. - * * @generated */ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory { /** - * Creates the default factory implementation. - * + * Creates the default factory implementation. + * * @generated */ public static MangoFactory init() @@ -55,8 +55,8 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory } /** - * Creates an instance of the factory. - * + * Creates an instance of the factory. + * * @generated */ public MangoFactoryImpl() @@ -66,7 +66,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ @Override @@ -87,7 +86,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ @Override @@ -104,7 +102,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ @Override @@ -121,7 +118,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ public MangoValueList createMangoValueList() @@ -132,7 +128,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ public MangoValue createMangoValue() @@ -143,7 +138,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ public MangoParameter createMangoParameter() @@ -154,21 +148,21 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ public ParameterPassing createParameterPassingFromString(EDataType eDataType, String initialValue) { ParameterPassing result = ParameterPassing.get(initialValue); if (result == null) + { throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } return result; } /** * - * * @generated */ public String convertParameterPassingToString(EDataType eDataType, Object instanceValue) @@ -178,7 +172,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @generated */ public MangoPackage getMangoPackage() @@ -188,7 +181,6 @@ public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory /** * - * * @deprecated * @generated */ 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 0c3004447a..989b54386c 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 @@ -26,35 +26,30 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; /** * An implementation of the model Package. - * * @generated */ public class MangoPackageImpl extends EPackageImpl implements MangoPackage { /** * - * * @generated */ private EClass mangoValueListEClass = null; /** * - * * @generated */ private EClass mangoValueEClass = null; /** * - * * @generated */ private EClass mangoParameterEClass = null; /** * - * * @generated */ private EEnum parameterPassingEEnum = null; @@ -79,18 +74,17 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

    - * This method is used to initialize {@link MangoPackage#eINSTANCE} when that field is accessed. Clients should not - * invoke it directly. Instead, they should simply access that field to obtain the package. - * * + *

    This method is used to initialize {@link MangoPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() @@ -123,7 +117,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EClass getMangoValueList() @@ -133,7 +126,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EAttribute getMangoValueList_Name() @@ -143,7 +135,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EReference getMangoValueList_Values() @@ -153,7 +144,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EClass getMangoValue() @@ -163,7 +153,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EAttribute getMangoValue_Name() @@ -173,7 +162,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EClass getMangoParameter() @@ -183,7 +171,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EAttribute getMangoParameter_Name() @@ -193,7 +180,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EAttribute getMangoParameter_Passing() @@ -203,7 +189,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public EEnum getParameterPassing() @@ -213,7 +198,6 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @generated */ public MangoFactory getMangoFactory() @@ -223,15 +207,14 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @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. - * + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * * @generated */ public void createPackageContents() @@ -258,15 +241,14 @@ public class MangoPackageImpl extends EPackageImpl implements MangoPackage /** * - * * @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. - * + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * * @generated */ public void initializePackageContents() 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 747a8b1ed5..c9d064a718 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 @@ -23,18 +23,17 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl#getPassing Passing}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoParameterImpl#getPassing Passing}
    • *
    *

    - * + * * @generated */ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter { /** * - * * @generated */ protected MangoParameterImpl() @@ -44,7 +43,6 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter /** * - * * @generated */ @Override @@ -55,7 +53,6 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter /** * - * * @generated */ @Override @@ -66,7 +63,6 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter /** * - * * @generated */ public String getName() @@ -76,7 +72,6 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter /** * - * * @generated */ public void setName(String newName) @@ -86,7 +81,6 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter /** * - * * @generated */ public ParameterPassing getPassing() @@ -96,7 +90,6 @@ public class MangoParameterImpl extends CDOObjectImpl implements MangoParameter /** * - * * @generated */ public void setPassing(ParameterPassing newPassing) 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 e7fc5b8f7e..afd321a108 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 @@ -22,17 +22,16 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueImpl#getName Name}
    • *
    *

    - * + * * @generated */ public class MangoValueImpl extends CDOObjectImpl implements MangoValue { /** * - * * @generated */ protected MangoValueImpl() @@ -42,7 +41,6 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue /** * - * * @generated */ @Override @@ -53,7 +51,6 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue /** * - * * @generated */ @Override @@ -64,7 +61,6 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue /** * - * * @generated */ public String getName() @@ -74,7 +70,6 @@ public class MangoValueImpl extends CDOObjectImpl implements MangoValue /** * - * * @generated */ public void setName(String newName) 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 c66d50bb62..14157f1374 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 @@ -24,18 +24,17 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl#getValues Values}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.impl.MangoValueListImpl#getValues Values}
    • *
    *

    - * + * * @generated */ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList { /** * - * * @generated */ protected MangoValueListImpl() @@ -45,7 +44,6 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList /** * - * * @generated */ @Override @@ -56,7 +54,6 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList /** * - * * @generated */ @Override @@ -67,7 +64,6 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList /** * - * * @generated */ public String getName() @@ -77,7 +73,6 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList /** * - * * @generated */ public void setName(String newName) @@ -87,7 +82,6 @@ public class MangoValueListImpl extends CDOObjectImpl implements MangoValueList /** * - * * @generated */ @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoFactory.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoFactory.java new file mode 100644 index 0000000000..5c1aea174e --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoFactory.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy; + +import org.eclipse.emf.cdo.tests.mango.MangoParameter; +import org.eclipse.emf.cdo.tests.mango.MangoValue; +import org.eclipse.emf.cdo.tests.mango.MangoValueList; +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. It provides a create method for each non-abstract class of the model. + * @extends org.eclipse.emf.cdo.tests.mango.MangoFactory + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage + * @generated + */ +public interface MangoFactory extends EFactory, org.eclipse.emf.cdo.tests.mango.MangoFactory +{ + /** + * The singleton instance of the factory. + * + * @generated + */ + MangoFactory eINSTANCE = org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoFactoryImpl.init(); + + /** + * Returns a new object of class 'Value List'. + * + * @return a new object of class 'Value List'. + * @generated + */ + MangoValueList createMangoValueList(); + + /** + * Returns a new object of class 'Value'. + * + * @return a new object of class 'Value'. + * @generated + */ + MangoValue createMangoValue(); + + /** + * Returns a new object of class 'Parameter'. + * + * @return a new object of class 'Parameter'. + * @generated + */ + MangoParameter createMangoParameter(); + + /** + * Returns the package supported by this factory. + * + * @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/mango/legacy/MangoPackage.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoPackage.java new file mode 100644 index 0000000000..b3c91c0c08 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/MangoPackage.java @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * The Package for the model. It contains accessors for the meta objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * @extends org.eclipse.emf.cdo.tests.mango.MangoPackage + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoFactory + * @model kind="package" + * @generated + */ +public interface MangoPackage extends EPackage, org.eclipse.emf.cdo.tests.mango.MangoPackage +{ + /** + * The package name. + * + * @generated + */ + String eNAME = "mango"; + + /** + * The package namespace URI. + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/mango"; + + /** + * The package namespace name. + * + * @generated + */ + String eNS_PREFIX = "mango"; + + /** + * The singleton instance of the package. + * + * @generated + */ + MangoPackage eINSTANCE = org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueListImpl Value List}' class. + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueListImpl + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoPackageImpl#getMangoValueList() + * @generated + */ + int MANGO_VALUE_LIST = 0; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int MANGO_VALUE_LIST__NAME = 0; + + /** + * The feature id for the 'Values' reference list. + * + * @generated + * @ordered + */ + int MANGO_VALUE_LIST__VALUES = 1; + + /** + * The number of structural features of the 'Value List' class. + * + * @generated + * @ordered + */ + int MANGO_VALUE_LIST_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueImpl Value}' class. + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueImpl + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoPackageImpl#getMangoValue() + * @generated + */ + int MANGO_VALUE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int MANGO_VALUE__NAME = 0; + + /** + * The number of structural features of the 'Value' class. + * + * @generated + * @ordered + */ + int MANGO_VALUE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoParameterImpl Parameter}' class. + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoParameterImpl + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoPackageImpl#getMangoParameter() + * @generated + */ + int MANGO_PARAMETER = 2; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int MANGO_PARAMETER__NAME = 0; + + /** + * The feature id for the 'Passing' attribute. + * + * @generated + * @ordered + */ + int MANGO_PARAMETER__PASSING = 1; + + /** + * The number of structural features of the 'Parameter' class. + * + * @generated + * @ordered + */ + int MANGO_PARAMETER_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing Parameter Passing}' enum. + * + * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing + * @see org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoPackageImpl#getParameterPassing() + * @generated + */ + int PARAMETER_PASSING = 3; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList Value List}'. + * + * @return the meta object for class 'Value List'. + * @see org.eclipse.emf.cdo.tests.mango.MangoValueList + * @generated + */ + EClass getMangoValueList(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.mango.MangoValueList#getName() + * @see #getMangoValueList() + * @generated + */ + EAttribute getMangoValueList_Name(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues Values}'. + * + * + * @return the meta object for the reference list 'Values'. + * @see org.eclipse.emf.cdo.tests.mango.MangoValueList#getValues() + * @see #getMangoValueList() + * @generated + */ + EReference getMangoValueList_Values(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.mango.MangoValue Value}'. + * + * @return the meta object for class 'Value'. + * @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.mango.MangoValue#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.mango.MangoValue#getName() + * @see #getMangoValue() + * @generated + */ + EAttribute getMangoValue_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter Parameter}'. + * + * @return the meta object for class 'Parameter'. + * @see org.eclipse.emf.cdo.tests.mango.MangoParameter + * @generated + */ + EClass getMangoParameter(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.mango.MangoParameter#getName() + * @see #getMangoParameter() + * @generated + */ + EAttribute getMangoParameter_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing Passing}'. + * + * @return the meta object for the attribute 'Passing'. + * @see org.eclipse.emf.cdo.tests.mango.MangoParameter#getPassing() + * @see #getMangoParameter() + * @generated + */ + EAttribute getMangoParameter_Passing(); + + /** + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.mango.ParameterPassing Parameter Passing}'. + * + * @return the meta object for enum 'Parameter Passing'. + * @see org.eclipse.emf.cdo.tests.mango.ParameterPassing + * @generated + */ + EEnum getParameterPassing(); + + /** + * Returns the factory that creates the instances of the model. + * + * @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/mango/legacy/impl/MangoFactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoFactoryImpl.java new file mode 100644 index 0000000000..b7b3340c1b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoFactoryImpl.java @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy.impl; + +//import org.eclipse.emf.cdo.tests.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; +import org.eclipse.emf.cdo.tests.mango.ParameterPassing; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoFactory; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +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; + +/** + * An implementation of the model Factory. + * @generated + */ +public class MangoFactoryImpl extends EFactoryImpl implements MangoFactory +{ + /** + * @ADDED + */ + public static final MangoFactory eINSTANCE = org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoFactoryImpl.init(); + + /** + * Creates the default factory implementation. + * + * @generated NOT + */ + public static MangoFactory init() + { + try + { + MangoFactory theMangoFactory = (MangoFactory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/emf/CDO/tests/legacy/mango"); + if (theMangoFactory instanceof MangoFactoryImpl) + { + return theMangoFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + + MangoFactoryImpl factory = new MangoFactoryImpl(); + // EPackage.Registry.INSTANCE.put(factory.getEPackage().getNsURI(), factory); + EPackage.Registry.INSTANCE.put("http://www.eclipse.org/emf/CDO/tests/legacy/mango", factory); + return factory; + } + + /** + * Creates an instance of the factory. + * + * @generated + */ + public MangoFactoryImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case MangoPackage.MANGO_VALUE_LIST: + return createMangoValueList(); + case MangoPackage.MANGO_VALUE: + return createMangoValue(); + case MangoPackage.MANGO_PARAMETER: + return createMangoParameter(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case MangoPackage.PARAMETER_PASSING: + return createParameterPassingFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case MangoPackage.PARAMETER_PASSING: + return convertParameterPassingToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + public MangoValueList createMangoValueList() + { + MangoValueListImpl mangoValueList = new MangoValueListImpl(); + return mangoValueList; + } + + /** + * + * @generated + */ + public MangoValue createMangoValue() + { + MangoValueImpl mangoValue = new MangoValueImpl(); + return mangoValue; + } + + /** + * + * @generated + */ + public MangoParameter createMangoParameter() + { + MangoParameterImpl mangoParameter = new MangoParameterImpl(); + return mangoParameter; + } + + /** + * + * @generated + */ + public ParameterPassing createParameterPassingFromString(EDataType eDataType, String initialValue) + { + ParameterPassing result = ParameterPassing.get(initialValue); + if (result == null) + { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + + eDataType.getName() + "'"); + } + return result; + } + + /** + * + * @generated + */ + public String convertParameterPassingToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * @generated + */ + public MangoPackage getMangoPackage() + { + return (MangoPackage)getEPackage(); + } + + /** + * + * @deprecated + * @generated + */ + @Deprecated + public static MangoPackage getPackage() + { + return MangoPackage.eINSTANCE; + } + +} // MangoFactoryImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoPackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoPackageImpl.java new file mode 100644 index 0000000000..648719ff8c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoPackageImpl.java @@ -0,0 +1,307 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy.impl; + +import org.eclipse.emf.cdo.tests.mango.MangoParameter; +import org.eclipse.emf.cdo.tests.mango.MangoValue; +import org.eclipse.emf.cdo.tests.mango.MangoValueList; +import org.eclipse.emf.cdo.tests.mango.ParameterPassing; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoFactory; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * An implementation of the model Package. + * @generated + */ +public class MangoPackageImpl extends EPackageImpl implements MangoPackage +{ + /** + * @ADDED + */ + public static final MangoPackage eINSTANCE = org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoPackageImpl.init(); + + /** + * + * @generated + */ + private EClass mangoValueListEClass = null; + + /** + * + * @generated + */ + private EClass mangoValueEClass = null; + + /** + * + * @generated + */ + private EClass mangoParameterEClass = null; + + /** + * + * @generated + */ + private EEnum parameterPassingEEnum = null; + + /** + * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry + * EPackage.Registry} by the package package URI value. + *

    + * 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. + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.cdo.tests.legacy.mango.MangoPackage#eNS_URI + * @see #init() + * @generated + */ + private MangoPackageImpl() + { + super(eNS_URI, MangoFactory.eINSTANCE); + } + + /** + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

    This method is used to initialize {@link MangoPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + 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 + .get(eNS_URI) : new MangoPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theMangoPackage.createPackageContents(); + + // Initialize created meta-data + theMangoPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theMangoPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(MangoPackage.eNS_URI, theMangoPackage); + return theMangoPackage; + } + + /** + * + * @generated + */ + public EClass getMangoValueList() + { + return mangoValueListEClass; + } + + /** + * + * @generated + */ + public EAttribute getMangoValueList_Name() + { + return (EAttribute)mangoValueListEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getMangoValueList_Values() + { + return (EReference)mangoValueListEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getMangoValue() + { + return mangoValueEClass; + } + + /** + * + * @generated + */ + public EAttribute getMangoValue_Name() + { + return (EAttribute)mangoValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EClass getMangoParameter() + { + return mangoParameterEClass; + } + + /** + * + * @generated + */ + public EAttribute getMangoParameter_Name() + { + return (EAttribute)mangoParameterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getMangoParameter_Passing() + { + return (EAttribute)mangoParameterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EEnum getParameterPassing() + { + return parameterPassingEEnum; + } + + /** + * + * @generated + */ + public MangoFactory getMangoFactory() + { + return (MangoFactory)getEFactoryInstance(); + } + + /** + * + * @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. + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + mangoValueListEClass = createEClass(MANGO_VALUE_LIST); + createEAttribute(mangoValueListEClass, MANGO_VALUE_LIST__NAME); + createEReference(mangoValueListEClass, MANGO_VALUE_LIST__VALUES); + + mangoValueEClass = createEClass(MANGO_VALUE); + createEAttribute(mangoValueEClass, MANGO_VALUE__NAME); + + mangoParameterEClass = createEClass(MANGO_PARAMETER); + createEAttribute(mangoParameterEClass, MANGO_PARAMETER__NAME); + createEAttribute(mangoParameterEClass, MANGO_PARAMETER__PASSING); + + // Create enums + parameterPassingEEnum = createEEnum(PARAMETER_PASSING); + } + + /** + * + * @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. + * + * @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 + + // Initialize classes and features; add operations and parameters + initEClass(mangoValueListEClass, MangoValueList.class, "MangoValueList", !IS_ABSTRACT, !IS_INTERFACE, + 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, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(mangoValueEClass, MangoValue.class, "MangoValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMangoValue_Name(), ecorePackage.getEString(), "name", null, 0, 1, MangoValue.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(mangoParameterEClass, MangoParameter.class, "MangoParameter", !IS_ABSTRACT, !IS_INTERFACE, + 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); + + // Initialize enums and add enum literals + initEEnum(parameterPassingEEnum, ParameterPassing.class, "ParameterPassing"); + addEEnumLiteral(parameterPassingEEnum, ParameterPassing.BY_VALUE); + addEEnumLiteral(parameterPassingEEnum, ParameterPassing.BY_REFERENCE); + + // Create resource + createResource(eNS_URI); + } + +} // MangoPackageImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoParameterImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoParameterImpl.java new file mode 100644 index 0000000000..176fc78bd4 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoParameterImpl.java @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy.impl; + +import org.eclipse.emf.cdo.tests.mango.MangoParameter; +import org.eclipse.emf.cdo.tests.mango.ParameterPassing; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * An implementation of the model object 'Parameter'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoParameterImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoParameterImpl#getPassing Passing}
    • + *
    + *

    + * + * @generated + */ +public class MangoParameterImpl extends EObjectImpl implements MangoParameter +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPassing() Passing}' attribute. + * + * @see #getPassing() + * @generated + * @ordered + */ + protected static final ParameterPassing PASSING_EDEFAULT = ParameterPassing.BY_VALUE; + + /** + * The cached value of the '{@link #getPassing() Passing}' attribute. + * + * @see #getPassing() + * @generated + * @ordered + */ + protected ParameterPassing passing = PASSING_EDEFAULT; + + /** + * + * @generated + */ + protected MangoParameterImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return MangoPackage.eINSTANCE.getMangoParameter(); + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_PARAMETER__NAME, oldName, name)); + } + + /** + * + * @generated + */ + public ParameterPassing getPassing() + { + return passing; + } + + /** + * + * @generated + */ + public void setPassing(ParameterPassing newPassing) + { + ParameterPassing oldPassing = passing; + passing = newPassing == null ? PASSING_EDEFAULT : newPassing; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_PARAMETER__PASSING, oldPassing, passing)); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case MangoPackage.MANGO_PARAMETER__NAME: + return getName(); + case MangoPackage.MANGO_PARAMETER__PASSING: + return getPassing(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case MangoPackage.MANGO_PARAMETER__NAME: + setName((String)newValue); + return; + case MangoPackage.MANGO_PARAMETER__PASSING: + setPassing((ParameterPassing)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case MangoPackage.MANGO_PARAMETER__NAME: + setName(NAME_EDEFAULT); + return; + case MangoPackage.MANGO_PARAMETER__PASSING: + setPassing(PASSING_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case MangoPackage.MANGO_PARAMETER__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case MangoPackage.MANGO_PARAMETER__PASSING: + return passing != PASSING_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", passing: "); + result.append(passing); + result.append(')'); + return result.toString(); + } + +} // ParameterImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueImpl.java new file mode 100644 index 0000000000..61911ad406 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueImpl.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy.impl; + +import org.eclipse.emf.cdo.tests.mango.MangoValue; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * An implementation of the model object 'Value'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueImpl#getName Name}
    • + *
    + *

    + * + * @generated + */ +public class MangoValueImpl extends EObjectImpl implements MangoValue +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * @generated + */ + protected MangoValueImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return MangoPackage.eINSTANCE.getMangoValue(); + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_VALUE__NAME, oldName, name)); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // ValueImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueListImpl.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueListImpl.java new file mode 100644 index 0000000000..5926cd96a5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/impl/MangoValueListImpl.java @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2004 - 2012 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.mango.legacy.impl; + +import org.eclipse.emf.cdo.tests.mango.MangoValue; +import org.eclipse.emf.cdo.tests.mango.MangoValueList; +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Value List'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueListImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.mango.legacy.impl.MangoValueListImpl#getValues Values}
    • + *
    + *

    + * + * @generated + */ +public class MangoValueListImpl extends EObjectImpl implements MangoValueList +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getValues() Values}' reference list. + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * @generated + */ + protected MangoValueListImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return MangoPackage.eINSTANCE.getMangoValueList(); + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MangoPackage.MANGO_VALUE_LIST__NAME, oldName, name)); + } + + /** + * + * @generated + */ + public EList getValues() + { + if (values == null) + { + values = new EObjectResolvingEList(MangoValue.class, this, MangoPackage.MANGO_VALUE_LIST__VALUES); + } + return values; + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE_LIST__NAME: + return getName(); + case MangoPackage.MANGO_VALUE_LIST__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE_LIST__NAME: + setName((String)newValue); + return; + case MangoPackage.MANGO_VALUE_LIST__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE_LIST__NAME: + setName(NAME_EDEFAULT); + return; + case MangoPackage.MANGO_VALUE_LIST__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case MangoPackage.MANGO_VALUE_LIST__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case MangoPackage.MANGO_VALUE_LIST__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // ValueListImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoAdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoAdapterFactory.java new file mode 100644 index 0000000000..bc90131356 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoAdapterFactory.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2004 - 2012 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.mango.legacy.util; + +import org.eclipse.emf.cdo.tests.mango.*; + +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage + * @generated + */ +public class MangoAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * + * @generated + */ + protected static MangoPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public MangoAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = MangoPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @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 createXXX methods. + * + * + * @generated + */ + protected MangoSwitch modelSwitch = new MangoSwitch() + { + @Override + public Adapter caseMangoValueList(MangoValueList object) + { + return createMangoValueListAdapter(); + } + + @Override + public Adapter caseMangoValue(MangoValue object) + { + return createMangoValueAdapter(); + } + + @Override + public Adapter caseMangoParameter(MangoParameter object) + { + return createMangoParameterAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList Value List}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.mango.MangoValueList + * @generated + */ + public Adapter createMangoValueListAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoValue Value}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.mango.MangoValue + * @generated + */ + public Adapter createMangoValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter Parameter}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.mango.MangoParameter + * @generated + */ + public Adapter createMangoParameterAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} //MangoAdapterFactory diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoSwitch.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoSwitch.java new file mode 100644 index 0000000000..7508f4e30d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/legacy/util/MangoSwitch.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) 2004 - 2012 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.mango.legacy.util; + +import java.util.List; + +import org.eclipse.emf.cdo.tests.mango.*; + +import org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX 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. + * + * @see org.eclipse.emf.cdo.tests.mango.legacy.MangoPackage + * @generated + */ +public class MangoSwitch +{ + /** + * The cached model package + * + * + * @generated + */ + protected static MangoPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public MangoSwitch() + { + if (modelPackage == null) + { + modelPackage = MangoPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public T doSwitch(EObject theEObject) + { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected T doSwitch(EClass theEClass, EObject theEObject) + { + if (theEClass.eContainer() == modelPackage) + { + return doSwitch(theEClass.getClassifierID(), theEObject); + } + else + { + List eSuperTypes = theEClass.getESuperTypes(); + return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case MangoPackage.MANGO_VALUE_LIST: + { + MangoValueList mangoValueList = (MangoValueList)theEObject; + T result = caseMangoValueList(mangoValueList); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case MangoPackage.MANGO_VALUE: + { + MangoValue mangoValue = (MangoValue)theEObject; + T result = caseMangoValue(mangoValue); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case MangoPackage.MANGO_PARAMETER: + { + MangoParameter mangoParameter = (MangoParameter)theEObject; + T result = caseMangoParameter(mangoParameter); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Value List'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Value List'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMangoValueList(MangoValueList object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMangoValue(MangoValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parameter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMangoParameter(MangoParameter object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public T defaultCase(EObject object) + { + return null; + } + +} //MangoSwitch diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoAdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoAdapterFactory.java index 7b6a53682e..6127e29f46 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoAdapterFactory.java @@ -4,12 +4,13 @@ * 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.mango.util; +//import org.eclipse.emf.cdo.tests.mango.*; import org.eclipse.emf.cdo.tests.mango.MangoPackage; import org.eclipse.emf.cdo.tests.mango.MangoParameter; import org.eclipse.emf.cdo.tests.mango.MangoValue; @@ -23,22 +24,21 @@ import org.eclipse.emf.ecore.EObject; /** * The Adapter Factory for the model. It provides an adapter createXXX * method for each class of the model. - * * @see org.eclipse.emf.cdo.tests.mango.MangoPackage * @generated */ public class MangoAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * + * The cached model package. + * * @generated */ protected static MangoPackage modelPackage; /** - * Creates an instance of the adapter factory. - * + * Creates an instance of the adapter factory. + * * @generated */ public MangoAdapterFactory() @@ -50,10 +50,10 @@ public class MangoAdapterFactory extends AdapterFactoryImpl } /** - * Returns whether this factory is applicable for the type of the object. This implementation + * Returns whether this factory is applicable for the type of the object. + * This implementation * returns true if the object is either the model's package or is an instance object of the model. - * * @return whether this factory is applicable for the type of the object. * @generated */ @@ -72,8 +72,8 @@ public class MangoAdapterFactory extends AdapterFactoryImpl } /** - * The switch that delegates to the createXXX methods. - * + * The switch that delegates to the createXXX methods. + * * @generated */ protected MangoSwitch modelSwitch = new MangoSwitch() @@ -104,10 +104,9 @@ public class MangoAdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the target. - * - * @param target - * the object to adapt. + * Creates an adapter for the target. + * + * @param target the object to adapt. * @return the adapter for the target. * @generated */ @@ -118,10 +117,9 @@ public class MangoAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList - * Value List}'. This default implementation returns null so that we can easily + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoValueList Value List}'. + * 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. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.mango.MangoValueList * @generated @@ -135,7 +133,6 @@ public class MangoAdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoValue Value}'. * 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. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.mango.MangoValue * @generated @@ -146,10 +143,9 @@ public class MangoAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter - * Parameter}'. This default implementation returns null so that we can easily ignore + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.mango.MangoParameter Parameter}'. + * 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. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.mango.MangoParameter * @generated @@ -160,9 +156,9 @@ public class MangoAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. This default implementation returns null. This default implementation returns null. - * * @return the new adapter. * @generated */ 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 ff33a2b529..003b46aafe 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 @@ -4,7 +4,7 @@ * 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 */ @@ -20,27 +20,28 @@ import org.eclipse.emf.ecore.EObject; import java.util.List; +//import org.eclipse.emf.cdo.tests.mango.*; + /** * The Switch for the model's inheritance hierarchy. It supports the call * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX 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. - * * @see org.eclipse.emf.cdo.tests.mango.MangoPackage * @generated */ public class MangoSwitch { /** - * The cached model package - * + * The cached model package + * * @generated */ protected static MangoPackage modelPackage; /** - * Creates an instance of the switch. - * + * Creates an instance of the switch. + * * @generated */ public MangoSwitch() @@ -54,7 +55,6 @@ public class MangoSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -66,7 +66,6 @@ public class MangoSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -86,7 +85,6 @@ public class MangoSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -130,11 +128,10 @@ public class MangoSwitch } /** - * Returns the result of interpreting the object as an instance of 'Value List'. This + * Returns the result of interpreting the object as an instance of 'Value List'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Value List'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -145,11 +142,10 @@ public class MangoSwitch } /** - * Returns the result of interpreting the object as an instance of 'Value'. This + * Returns the result of interpreting the object as an instance of 'Value'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Value'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -160,11 +156,10 @@ public class MangoSwitch } /** - * Returns the result of interpreting the object as an instance of 'Parameter'. This + * Returns the result of interpreting the object as an instance of 'Parameter'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Parameter'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -175,12 +170,11 @@ public class MangoSwitch } /** - * Returns the result of interpreting the object as an instance of 'EObject'. This + * Returns the result of interpreting the object as an instance of 'EObject'. + * This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case * anyway. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated -- cgit v1.2.3