+ * The following features are supported: + *
+ *+ * If the meaning of the 'Length' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Length' attribute. + * @see #setLength(long) + * @see com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage#getDocument_Length() + * @model + * @generated + */ + long getLength(); + + /** + * Sets the value of the '{@link com.specmate.migration.test.objectadded.testmodel.artefact.Document#getLength Length}' attribute. + * + * + * @param value the new value of the 'Length' attribute. + * @see #getLength() + * @generated + */ + void setLength(long value); + + /** + * Returns the value of the 'Owner' attribute. + * + *+ * If the meaning of the 'Owner' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Owner' attribute. + * @see #setOwner(String) + * @see com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage#getDocument_Owner() + * @model + * @generated + */ + String getOwner(); + + /** + * Sets the value of the '{@link com.specmate.migration.test.objectadded.testmodel.artefact.Document#getOwner Owner}' attribute. + * + * + * @param value the new value of the 'Owner' attribute. + * @see #getOwner() + * @generated + */ + void setOwner(String value); + +} // Document diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/ArtefactFactoryImpl.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/ArtefactFactoryImpl.java new file mode 100644 index 000000000..fd46d62cd --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/ArtefactFactoryImpl.java @@ -0,0 +1,106 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.artefact.impl; + +import com.specmate.migration.test.objectadded.testmodel.artefact.*; + +import org.eclipse.emf.ecore.EClass; +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 ArtefactFactoryImpl extends EFactoryImpl implements ArtefactFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ArtefactFactory init() { + try { + ArtefactFactory theArtefactFactory = (ArtefactFactory)EPackage.Registry.INSTANCE.getEFactory(ArtefactPackage.eNS_URI); + if (theArtefactFactory != null) { + return theArtefactFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ArtefactFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ArtefactFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ArtefactPackage.DIAGRAM: return createDiagram(); + case ArtefactPackage.DOCUMENT: return createDocument(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Diagram createDiagram() { + DiagramImpl diagram = new DiagramImpl(); + return diagram; + } + + /** + * + * + * @generated + */ + public Document createDocument() { + DocumentImpl document = new DocumentImpl(); + return document; + } + + /** + * + * + * @generated + */ + public ArtefactPackage getArtefactPackage() { + return (ArtefactPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ArtefactPackage getPackage() { + return ArtefactPackage.eINSTANCE; + } + +} //ArtefactFactoryImpl diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/ArtefactPackageImpl.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/ArtefactPackageImpl.java new file mode 100644 index 000000000..72d0d9931 --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/ArtefactPackageImpl.java @@ -0,0 +1,225 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.artefact.impl; + +import com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactFactory; +import com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage; +import com.specmate.migration.test.objectadded.testmodel.artefact.Diagram; +import com.specmate.migration.test.objectadded.testmodel.artefact.Document; + +import com.specmate.migration.test.objectadded.testmodel.base.BasePackage; + +import com.specmate.migration.test.objectadded.testmodel.base.impl.BasePackageImpl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ArtefactPackageImpl extends EPackageImpl implements ArtefactPackage { + /** + * + * + * @generated + */ + private EClass diagramEClass = null; + + /** + * + * + * @generated + */ + private EClass documentEClass = 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 com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage#eNS_URI + * @see #init() + * @generated + */ + private ArtefactPackageImpl() { + super(eNS_URI, ArtefactFactory.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 ArtefactPackage#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 ArtefactPackage init() { + if (isInited) return (ArtefactPackage)EPackage.Registry.INSTANCE.getEPackage(ArtefactPackage.eNS_URI); + + // Obtain or create and register package + ArtefactPackageImpl theArtefactPackage = (ArtefactPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ArtefactPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ArtefactPackageImpl()); + + isInited = true; + + // Obtain or create and register interdependencies + BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) : BasePackage.eINSTANCE); + + // Create package meta-data objects + theArtefactPackage.createPackageContents(); + theBasePackage.createPackageContents(); + + // Initialize created meta-data + theArtefactPackage.initializePackageContents(); + theBasePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theArtefactPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ArtefactPackage.eNS_URI, theArtefactPackage); + return theArtefactPackage; + } + + /** + * + * + * @generated + */ + public EClass getDiagram() { + return diagramEClass; + } + + /** + * + * + * @generated + */ + public EClass getDocument() { + return documentEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDocument_Length() { + return (EAttribute)documentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDocument_Owner() { + return (EAttribute)documentEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public ArtefactFactory getArtefactFactory() { + return (ArtefactFactory)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 + diagramEClass = createEClass(DIAGRAM); + + documentEClass = createEClass(DOCUMENT); + createEAttribute(documentEClass, DOCUMENT__LENGTH); + createEAttribute(documentEClass, DOCUMENT__OWNER); + } + + /** + * + * + * @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); + + // Obtain other dependent packages + BasePackage theBasePackage = (BasePackage)EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + diagramEClass.getESuperTypes().add(theBasePackage.getIModifiable()); + diagramEClass.getESuperTypes().add(theBasePackage.getIContainer()); + documentEClass.getESuperTypes().add(theBasePackage.getIModifiable()); + documentEClass.getESuperTypes().add(theBasePackage.getIContainer()); + + // Initialize classes, features, and operations; add parameters + initEClass(diagramEClass, Diagram.class, "Diagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(documentEClass, Document.class, "Document", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDocument_Length(), ecorePackage.getELong(), "length", null, 0, 1, Document.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDocument_Owner(), ecorePackage.getEString(), "owner", null, 0, 1, Document.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ArtefactPackageImpl diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/DiagramImpl.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/DiagramImpl.java new file mode 100644 index 000000000..66759d7fd --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/impl/DiagramImpl.java @@ -0,0 +1,285 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.artefact.impl; + +import com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage; +import com.specmate.migration.test.objectadded.testmodel.artefact.Diagram; + +import com.specmate.migration.test.objectadded.testmodel.base.BasePackage; +import com.specmate.migration.test.objectadded.testmodel.base.IContainer; +import com.specmate.migration.test.objectadded.testmodel.base.IContentElement; +import com.specmate.migration.test.objectadded.testmodel.base.IID; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Diagram'. + * + *
+ * The following features are implemented: + *
+ *+ * The following features are implemented: + *
+ *createXXX
method for each class of the model.
+ *
+ * @see com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage
+ * @generated
+ */
+public class ArtefactAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static ArtefactPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public ArtefactAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ArtefactPackage.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 ArtefactSwitchtarget
.
+ *
+ *
+ * @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 com.specmate.migration.test.objectadded.testmodel.artefact.Diagram Diagram}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.artefact.Diagram
+ * @generated
+ */
+ public Adapter createDiagramAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.artefact.Document Document}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.artefact.Document
+ * @generated
+ */
+ public Adapter createDocumentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.ITestable ITestable}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.ITestable
+ * @generated
+ */
+ public Adapter createITestableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IModifiable IModifiable}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IModifiable
+ * @generated
+ */
+ public Adapter createIModifiableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IID IID}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IID
+ * @generated
+ */
+ public Adapter createIIDAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IContentElement IContent Element}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IContentElement
+ * @generated
+ */
+ public Adapter createIContentElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IContainer IContainer}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IContainer
+ * @generated
+ */
+ public Adapter createIContainerAdapter() {
+ 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;
+ }
+
+} //ArtefactAdapterFactory
diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/util/ArtefactSwitch.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/util/ArtefactSwitch.java
new file mode 100644
index 000000000..d07479677
--- /dev/null
+++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/artefact/util/ArtefactSwitch.java
@@ -0,0 +1,222 @@
+/**
+ */
+package com.specmate.migration.test.objectadded.testmodel.artefact.util;
+
+import com.specmate.migration.test.objectadded.testmodel.artefact.*;
+
+import com.specmate.migration.test.objectadded.testmodel.base.IContainer;
+import com.specmate.migration.test.objectadded.testmodel.base.IContentElement;
+import com.specmate.migration.test.objectadded.testmodel.base.IID;
+import com.specmate.migration.test.objectadded.testmodel.base.IModifiable;
+import com.specmate.migration.test.objectadded.testmodel.base.ITestable;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+/**
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage
+ * @generated
+ */
+public class ArtefactSwitchcaseXXX
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
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ArtefactPackage.DIAGRAM: {
+ Diagram diagram = (Diagram)theEObject;
+ T result = caseDiagram(diagram);
+ if (result == null) result = caseIModifiable(diagram);
+ if (result == null) result = caseIContainer(diagram);
+ if (result == null) result = caseITestable(diagram);
+ if (result == null) result = caseIContentElement(diagram);
+ if (result == null) result = caseIID(diagram);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArtefactPackage.DOCUMENT: {
+ Document document = (Document)theEObject;
+ T result = caseDocument(document);
+ if (result == null) result = caseIModifiable(document);
+ if (result == null) result = caseIContainer(document);
+ if (result == null) result = caseITestable(document);
+ if (result == null) result = caseIContentElement(document);
+ if (result == null) result = caseIID(document);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Diagram'.
+ *
+ * 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 'Diagram'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDiagram(Diagram object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Document'.
+ *
+ * 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 'Document'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDocument(Document object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'ITestable'.
+ *
+ * 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 'ITestable'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseITestable(ITestable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IModifiable'.
+ *
+ * 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 'IModifiable'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIModifiable(IModifiable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IID'.
+ *
+ * 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 'IID'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIID(IID object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IContent Element'.
+ *
+ * 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 'IContent Element'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIContentElement(IContentElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IContainer'.
+ *
+ * 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 'IContainer'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIContainer(IContainer 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
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //ArtefactSwitch
diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/BaseFactory.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/BaseFactory.java
new file mode 100644
index 000000000..0f93f63ed
--- /dev/null
+++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/BaseFactory.java
@@ -0,0 +1,42 @@
+/**
+ */
+package com.specmate.migration.test.objectadded.testmodel.base;
+
+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 com.specmate.migration.test.objectadded.testmodel.base.BasePackage
+ * @generated
+ */
+public interface BaseFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ *
+ *
+ * @generated
+ */
+ BaseFactory eINSTANCE = com.specmate.migration.test.objectadded.testmodel.base.impl.BaseFactoryImpl.init();
+
+ /**
+ * Returns a new object of class 'Folder'.
+ *
+ *
+ * @return a new object of class 'Folder'.
+ * @generated
+ */
+ Folder createFolder();
+
+ /**
+ * Returns the package supported by this factory.
+ *
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ BasePackage getBasePackage();
+
+} //BaseFactory
diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/BasePackage.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/BasePackage.java
new file mode 100644
index 000000000..abe7f9a04
--- /dev/null
+++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/BasePackage.java
@@ -0,0 +1,502 @@
+/**
+ */
+package com.specmate.migration.test.objectadded.testmodel.base;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+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
+ * + * The following features are supported: + *
+ *+ * If the meaning of the 'Contents' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Contents' containment reference list. + * @see com.specmate.migration.test.objectadded.testmodel.base.BasePackage#getIContainer_Contents() + * @model containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ *+ * If the meaning of the 'Id' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see com.specmate.migration.test.objectadded.testmodel.base.BasePackage#getIID_Id() + * @model + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link com.specmate.migration.test.objectadded.testmodel.base.IID#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + +} // IID diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/IModifiable.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/IModifiable.java new file mode 100644 index 000000000..a779ffe8c --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/IModifiable.java @@ -0,0 +1,17 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.base; + + +/** + * + * A representation of the model object 'IModifiable'. + * + * + * + * @see com.specmate.migration.test.objectadded.testmodel.base.BasePackage#getIModifiable() + * @model interface="true" abstract="true" + * @generated + */ +public interface IModifiable extends ITestable { +} // IModifiable diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/ITestable.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/ITestable.java new file mode 100644 index 000000000..0ff891a44 --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/ITestable.java @@ -0,0 +1,50 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.base; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'ITestable'. + * + * + *+ * The following features are supported: + *
+ *+ * If the meaning of the 'Tested' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Tested' attribute. + * @see #setTested(boolean) + * @see com.specmate.migration.test.objectadded.testmodel.base.BasePackage#getITestable_Tested() + * @model + * @generated + */ + boolean isTested(); + + /** + * Sets the value of the '{@link com.specmate.migration.test.objectadded.testmodel.base.ITestable#isTested Tested}' attribute. + * + * + * @param value the new value of the 'Tested' attribute. + * @see #isTested() + * @generated + */ + void setTested(boolean value); + +} // ITestable diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/BaseFactoryImpl.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/BaseFactoryImpl.java new file mode 100644 index 000000000..c8c44db32 --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/BaseFactoryImpl.java @@ -0,0 +1,95 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.base.impl; + +import com.specmate.migration.test.objectadded.testmodel.base.*; + +import org.eclipse.emf.ecore.EClass; +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 BaseFactoryImpl extends EFactoryImpl implements BaseFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static BaseFactory init() { + try { + BaseFactory theBaseFactory = (BaseFactory)EPackage.Registry.INSTANCE.getEFactory(BasePackage.eNS_URI); + if (theBaseFactory != null) { + return theBaseFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new BaseFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public BaseFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case BasePackage.FOLDER: return createFolder(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Folder createFolder() { + FolderImpl folder = new FolderImpl(); + return folder; + } + + /** + * + * + * @generated + */ + public BasePackage getBasePackage() { + return (BasePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static BasePackage getPackage() { + return BasePackage.eINSTANCE; + } + +} //BaseFactoryImpl diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/BasePackageImpl.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/BasePackageImpl.java new file mode 100644 index 000000000..c71fe0c79 --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/BasePackageImpl.java @@ -0,0 +1,317 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.base.impl; + +import com.specmate.migration.test.objectadded.testmodel.artefact.ArtefactPackage; + +import com.specmate.migration.test.objectadded.testmodel.artefact.impl.ArtefactPackageImpl; + +import com.specmate.migration.test.objectadded.testmodel.base.BaseFactory; +import com.specmate.migration.test.objectadded.testmodel.base.BasePackage; +import com.specmate.migration.test.objectadded.testmodel.base.Folder; +import com.specmate.migration.test.objectadded.testmodel.base.IContainer; +import com.specmate.migration.test.objectadded.testmodel.base.IContentElement; +import com.specmate.migration.test.objectadded.testmodel.base.IModifiable; +import com.specmate.migration.test.objectadded.testmodel.base.ITestable; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +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 BasePackageImpl extends EPackageImpl implements BasePackage { + /** + * + * + * @generated + */ + private EClass iidEClass = null; + + /** + * + * + * @generated + */ + private EClass iContentElementEClass = null; + + /** + * + * + * @generated + */ + private EClass iContainerEClass = null; + + /** + * + * + * @generated + */ + private EClass folderEClass = null; + + /** + * + * + * @generated + */ + private EClass iTestableEClass = null; + + /** + * + * + * @generated + */ + private EClass iModifiableEClass = 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 com.specmate.migration.test.objectadded.testmodel.base.BasePackage#eNS_URI + * @see #init() + * @generated + */ + private BasePackageImpl() { + super(eNS_URI, BaseFactory.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 BasePackage#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 BasePackage init() { + if (isInited) return (BasePackage)EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI); + + // Obtain or create and register package + BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new BasePackageImpl()); + + isInited = true; + + // Obtain or create and register interdependencies + ArtefactPackageImpl theArtefactPackage = (ArtefactPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ArtefactPackage.eNS_URI) instanceof ArtefactPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ArtefactPackage.eNS_URI) : ArtefactPackage.eINSTANCE); + + // Create package meta-data objects + theBasePackage.createPackageContents(); + theArtefactPackage.createPackageContents(); + + // Initialize created meta-data + theBasePackage.initializePackageContents(); + theArtefactPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theBasePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(BasePackage.eNS_URI, theBasePackage); + return theBasePackage; + } + + /** + * + * + * @generated + */ + public EClass getIID() { + return iidEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getIID_Id() { + return (EAttribute)iidEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getIContentElement() { + return iContentElementEClass; + } + + /** + * + * + * @generated + */ + public EClass getIContainer() { + return iContainerEClass; + } + + /** + * + * + * @generated + */ + public EReference getIContainer_Contents() { + return (EReference)iContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFolder() { + return folderEClass; + } + + /** + * + * + * @generated + */ + public EClass getITestable() { + return iTestableEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getITestable_Tested() { + return (EAttribute)iTestableEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getIModifiable() { + return iModifiableEClass; + } + + /** + * + * + * @generated + */ + public BaseFactory getBaseFactory() { + return (BaseFactory)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 + iidEClass = createEClass(IID); + createEAttribute(iidEClass, IID__ID); + + iContentElementEClass = createEClass(ICONTENT_ELEMENT); + + iContainerEClass = createEClass(ICONTAINER); + createEReference(iContainerEClass, ICONTAINER__CONTENTS); + + folderEClass = createEClass(FOLDER); + + iTestableEClass = createEClass(ITESTABLE); + createEAttribute(iTestableEClass, ITESTABLE__TESTED); + + iModifiableEClass = createEClass(IMODIFIABLE); + } + + /** + * + * + * @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 + iContentElementEClass.getESuperTypes().add(this.getIID()); + iContainerEClass.getESuperTypes().add(this.getIContentElement()); + folderEClass.getESuperTypes().add(this.getIContainer()); + iModifiableEClass.getESuperTypes().add(this.getITestable()); + + // Initialize classes, features, and operations; add parameters + initEClass(iidEClass, com.specmate.migration.test.objectadded.testmodel.base.IID.class, "IID", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIID_Id(), ecorePackage.getEString(), "id", null, 0, 1, com.specmate.migration.test.objectadded.testmodel.base.IID.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(iContentElementEClass, IContentElement.class, "IContentElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(iContainerEClass, IContainer.class, "IContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getIContainer_Contents(), this.getIContentElement(), null, "contents", null, 0, -1, IContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(folderEClass, Folder.class, "Folder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(iTestableEClass, ITestable.class, "ITestable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getITestable_Tested(), ecorePackage.getEBoolean(), "tested", null, 0, 1, ITestable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(iModifiableEClass, IModifiable.class, "IModifiable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //BasePackageImpl diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/FolderImpl.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/FolderImpl.java new file mode 100644 index 000000000..25a4cbfa6 --- /dev/null +++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/impl/FolderImpl.java @@ -0,0 +1,188 @@ +/** + */ +package com.specmate.migration.test.objectadded.testmodel.base.impl; + +import com.specmate.migration.test.objectadded.testmodel.base.BasePackage; +import com.specmate.migration.test.objectadded.testmodel.base.Folder; +import com.specmate.migration.test.objectadded.testmodel.base.IContentElement; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Folder'. + * + *
+ * The following features are implemented: + *
+ *createXXX
method for each class of the model.
+ *
+ * @see com.specmate.migration.test.objectadded.testmodel.base.BasePackage
+ * @generated
+ */
+public class BaseAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static BasePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public BaseAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = BasePackage.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 BaseSwitchtarget
.
+ *
+ *
+ * @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 com.specmate.migration.test.objectadded.testmodel.base.IID IID}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IID
+ * @generated
+ */
+ public Adapter createIIDAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IContentElement IContent Element}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IContentElement
+ * @generated
+ */
+ public Adapter createIContentElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IContainer IContainer}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IContainer
+ * @generated
+ */
+ public Adapter createIContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.Folder Folder}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.Folder
+ * @generated
+ */
+ public Adapter createFolderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.ITestable ITestable}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.ITestable
+ * @generated
+ */
+ public Adapter createITestableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.specmate.migration.test.objectadded.testmodel.base.IModifiable IModifiable}'.
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.IModifiable
+ * @generated
+ */
+ public Adapter createIModifiableAdapter() {
+ 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;
+ }
+
+} //BaseAdapterFactory
diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/util/BaseSwitch.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/util/BaseSwitch.java
new file mode 100644
index 000000000..abc51f760
--- /dev/null
+++ b/bundles/specmate-migration-test/src/com/specmate/migration/test/objectadded/testmodel/base/util/BaseSwitch.java
@@ -0,0 +1,222 @@
+/**
+ */
+package com.specmate.migration.test.objectadded.testmodel.base.util;
+
+import com.specmate.migration.test.objectadded.testmodel.base.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+/**
+ *
+ * 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 com.specmate.migration.test.objectadded.testmodel.base.BasePackage
+ * @generated
+ */
+public class BaseSwitchcaseXXX
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
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case BasePackage.IID: {
+ IID iid = (IID)theEObject;
+ T result = caseIID(iid);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BasePackage.ICONTENT_ELEMENT: {
+ IContentElement iContentElement = (IContentElement)theEObject;
+ T result = caseIContentElement(iContentElement);
+ if (result == null) result = caseIID(iContentElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BasePackage.ICONTAINER: {
+ IContainer iContainer = (IContainer)theEObject;
+ T result = caseIContainer(iContainer);
+ if (result == null) result = caseIContentElement(iContainer);
+ if (result == null) result = caseIID(iContainer);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BasePackage.FOLDER: {
+ Folder folder = (Folder)theEObject;
+ T result = caseFolder(folder);
+ if (result == null) result = caseIContainer(folder);
+ if (result == null) result = caseIContentElement(folder);
+ if (result == null) result = caseIID(folder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BasePackage.ITESTABLE: {
+ ITestable iTestable = (ITestable)theEObject;
+ T result = caseITestable(iTestable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BasePackage.IMODIFIABLE: {
+ IModifiable iModifiable = (IModifiable)theEObject;
+ T result = caseIModifiable(iModifiable);
+ if (result == null) result = caseITestable(iModifiable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IID'.
+ *
+ * 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 'IID'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIID(IID object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IContent Element'.
+ *
+ * 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 'IContent Element'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIContentElement(IContentElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IContainer'.
+ *
+ * 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 'IContainer'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIContainer(IContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Folder'.
+ *
+ * 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 'Folder'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFolder(Folder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'ITestable'.
+ *
+ * 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 'ITestable'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseITestable(ITestable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'IModifiable'.
+ *
+ * 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 'IModifiable'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIModifiable(IModifiable 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
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //BaseSwitch
diff --git a/bundles/specmate-migration-test/src/com/specmate/migration/test/support/AttributeAddedMigrator.java b/bundles/specmate-migration-test/src/com/specmate/migration/test/support/AttributeAddedMigrator.java
deleted file mode 100644
index e002cc0cb..000000000
--- a/bundles/specmate-migration-test/src/com/specmate/migration/test/support/AttributeAddedMigrator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.specmate.migration.test.support;
-
-import java.io.IOException;
-import java.sql.Connection;
-import java.util.Dictionary;
-
-import org.junit.Assert;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.util.tracker.ServiceTracker;
-
-import com.specmate.common.SpecmateException;
-import com.specmate.migration.api.IMigrator;
-import com.specmate.migration.basemigrators.AttributeAddedBaseMigrator;
-import com.specmate.migration.test.AddAttributeTest;
-import com.specmate.migration.test.AddSeveralAttributesTest;
-
-@Component(property = "sourceVersion=0")
-public class AttributeAddedMigrator extends AttributeAddedBaseMigrator implements IMigrator {
- public static final String PID = "com.specmate.migration.text.support.AttributeAddedMigrator";
- public static final String KEY_MIGRATOR_TEST = "testcase";
-
- @Override
- public String getSourceVersion() {
- return "0";
- }
-
- @Override
- public String getTargetVersion() {
- return "1";
- }
-
- @Override
- public void migrate(Connection connection) throws SpecmateException {
- this.connection = connection;
- BundleContext context = FrameworkUtil.getBundle(AttributeAddedMigrator.class).getBundleContext();
- try {
- ConfigurationAdmin ca = getConfigurationAdmin(context);
- Dictionary