From 1359508d8707786a063b6618767ee2772989c752 Mon Sep 17 00:00:00 2001
From: Christian W. Damus
Date: Wed, 11 Nov 2015 16:13:06 -0500
Subject: Bug 476683: [AOF Sync] Diagram-to-diagram synchronization on AOF
https://bugs.eclipse.org/bugs/show_bug.cgi?id=476683
Update model of synchronization mappings to match the refactoring of the
mapping-instance interface and regenerate.
---
.../model/syncmapping.ecore | 9 +-
.../model/syncmapping.genmodel | 1 +
.../model/syncmapping.notation | 215 ++++++++++++++++-----
.../model/syncmapping.uml | 113 ++++++-----
.../operations/MappingInstanceOperations.java | 9 +-
.../aof/sync/emf/syncmapping/MappingInstance.java | 45 +++--
.../aof/sync/emf/syncmapping/MappingModel.java | 3 +-
.../sync/emf/syncmapping/SyncMappingFactory.java | 11 +-
.../sync/emf/syncmapping/SyncMappingPackage.java | 115 +++++++++--
.../emf/syncmapping/impl/MappingInstanceImpl.java | 39 +++-
.../emf/syncmapping/impl/MappingModelImpl.java | 13 +-
.../syncmapping/impl/SyncMappingFactoryImpl.java | 45 ++++-
.../syncmapping/impl/SyncMappingPackageImpl.java | 78 +++++++-
.../util/SyncMappingAdapterFactory.java | 17 +-
.../emf/syncmapping/util/SyncMappingResource.java | 10 +-
.../util/SyncMappingResourceFactoryImpl.java | 9 +-
.../syncmapping/util/SyncMappingResourceImpl.java | 13 +-
.../emf/syncmapping/util/SyncMappingSwitch.java | 34 +++-
18 files changed, 605 insertions(+), 174 deletions(-)
diff --git a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/model/syncmapping.ecore b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/model/syncmapping.ecore
index df35cbc28b1..da5d89fae2f 100644
--- a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/model/syncmapping.ecore
+++ b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/model/syncmapping.ecore
@@ -66,16 +66,20 @@
Note: the correct way to create the package is via the static + *
+ * 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.papyrus.aof.sync.emf.syncmapping.SyncMappingPackage#eNS_URI * @see #init() @@ -129,6 +150,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP /** * * + * * @generated */ private static boolean isInited = false; @@ -136,10 +158,12 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. * - *
This method is used to initialize {@link SyncMappingPackage#eINSTANCE} when that field is accessed. + *
+ * This method is used to initialize {@link SyncMappingPackage#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()
@@ -173,6 +197,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -183,6 +208,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -193,6 +219,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -203,6 +230,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -213,6 +241,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -223,6 +252,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -233,6 +263,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -243,6 +274,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -253,6 +285,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -263,6 +296,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -273,6 +307,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -283,6 +318,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -293,6 +329,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -303,6 +340,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -313,6 +351,7 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
@Override
@@ -323,6 +362,18 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getMappingContext() {
+ return mappingContextEDataType;
+ }
+
+ /**
+ *
+ *
+ *
* @generated
*/
@Override
@@ -333,15 +384,17 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
/**
*
*
+ *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is
+ * 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() {
@@ -372,20 +425,23 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
mappingEDataType = createEDataType(MAPPING);
observerTrackerEDataType = createEDataType(OBSERVER_TRACKER);
iteratorEDataType = createEDataType(ITERATOR);
+ mappingContextEDataType = createEDataType(MAPPING_CONTEXT);
}
/**
*
*
+ *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This
+ * 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() {
@@ -404,8 +460,8 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
ETypeParameter mappingInstanceEClass_T = addETypeParameter(mappingInstanceEClass, "T"); //$NON-NLS-1$
addETypeParameter(iMappingInstanceEClass, "F"); //$NON-NLS-1$
addETypeParameter(iMappingInstanceEClass, "T"); //$NON-NLS-1$
- addETypeParameter(internalInstanceEClass, "F"); //$NON-NLS-1$
- addETypeParameter(internalInstanceEClass, "T"); //$NON-NLS-1$
+ ETypeParameter internalInstanceEClass_F = addETypeParameter(internalInstanceEClass, "F"); //$NON-NLS-1$
+ ETypeParameter internalInstanceEClass_T = addETypeParameter(internalInstanceEClass, "T"); //$NON-NLS-1$
addETypeParameter(oneEDataType, "E"); //$NON-NLS-1$
addETypeParameter(mappingEDataType, "F"); //$NON-NLS-1$
addETypeParameter(mappingEDataType, "T"); //$NON-NLS-1$
@@ -420,7 +476,12 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
g2 = createEGenericType(mappingInstanceEClass_T);
g1.getETypeArguments().add(g2);
mappingInstanceEClass.getEGenericSuperTypes().add(g1);
- internalInstanceEClass.getESuperTypes().add(this.getIMappingInstance());
+ g1 = createEGenericType(this.getIMappingInstance());
+ g2 = createEGenericType(internalInstanceEClass_F);
+ g1.getETypeArguments().add(g2);
+ g2 = createEGenericType(internalInstanceEClass_T);
+ g1.getETypeArguments().add(g2);
+ internalInstanceEClass.getEGenericSuperTypes().add(g1);
// Initialize classes and features; add operations and parameters
initEClass(mappingInstanceEClass, MappingInstance.class, "MappingInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -488,9 +549,10 @@ public class SyncMappingPackageImpl extends EPackageImpl implements SyncMappingP
initEDataType(mappingEDataType, IMapping.class, "Mapping", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(observerTrackerEDataType, ObserverTracker.class, "ObserverTracker", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(iteratorEDataType, Iterator.class, "Iterator", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(mappingContextEDataType, IMappingContext.class, "MappingContext", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
// Create resource
createResource(eNS_URI);
}
-} //SyncMappingPackageImpl
+} // SyncMappingPackageImpl
diff --git a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingAdapterFactory.java b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingAdapterFactory.java
index 8122143bfd3..92a0f7ac490 100644
--- a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingAdapterFactory.java
+++ b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingAdapterFactory.java
@@ -28,6 +28,7 @@ import org.eclipse.papyrus.aof.sync.emf.syncmapping.*;
* The Adapter Factory for the model.
* It provides an adapter createXXX
method for each class of the model.
*
+ *
* @see org.eclipse.papyrus.aof.sync.emf.syncmapping.SyncMappingPackage
* @generated
*/
@@ -36,6 +37,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* The cached model package.
*
*
+ *
* @generated
*/
protected static SyncMappingPackage modelPackage;
@@ -44,6 +46,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* Creates an instance of the adapter factory.
*
*
+ *
* @generated
*/
public SyncMappingAdapterFactory() {
@@ -57,6 +60,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
*
* 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
*/
@@ -75,6 +79,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* The switch that delegates to the createXXX
methods.
*
*
+ *
* @generated
*/
protected SyncMappingSwitchtarget
.
*
*
- * @param target the object to adapt.
+ *
+ * @param target
+ * the object to adapt.
* @return the adapter for the target
.
* @generated
*/
@@ -129,6 +136,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* 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.papyrus.aof.sync.emf.syncmapping.MappingInstance
* @generated
@@ -143,6 +151,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* 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.papyrus.aof.sync.IMappingInstance
* @generated
@@ -157,6 +166,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* 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.papyrus.aof.sync.AbstractMapping.InternalInstance
* @generated
@@ -171,6 +181,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* 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.ecore.InternalEObject
* @generated
@@ -185,6 +196,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
* 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.papyrus.aof.sync.emf.syncmapping.MappingModel
* @generated
@@ -198,6 +210,7 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
*
* This default implementation returns null.
*
+ *
* @return the new adapter.
* @generated
*/
@@ -205,4 +218,4 @@ public class SyncMappingAdapterFactory extends AdapterFactoryImpl {
return null;
}
-} //SyncMappingAdapterFactory
+} // SyncMappingAdapterFactory
diff --git a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResource.java b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResource.java
index 2bb5dfe2297..c83e7a75837 100644
--- a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResource.java
+++ b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResource.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2015 Christian W. Damus 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:
* Christian W. Damus - Initial API and implementation
*/
@@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.resource.Resource;
*
* The resource associated with the 'syncmapping' package.
*
+ *
* @generated
*/
public interface SyncMappingResource extends Resource {
@@ -24,6 +25,7 @@ public interface SyncMappingResource extends Resource {
*
* The factory for 'syncmapping' resources.
*
+ *
* @generated
*/
public interface Factory
@@ -32,6 +34,7 @@ public interface SyncMappingResource extends Resource {
/**
*
*
+ *
* @generated
*/
public static final Factory INSTANCE = new SyncMappingResourceFactoryImpl();
@@ -42,8 +45,9 @@ public interface SyncMappingResource extends Resource {
*
* The file extension for 'syncmapping' resources.
*
+ *
* @generated
*/
public static final String FILE_EXTENSION = "syncmapping"; //$NON-NLS-1$
-} //SyncMappingResource
+} // SyncMappingResource
diff --git a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceFactoryImpl.java b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceFactoryImpl.java
index 1d64bc07a63..000752a64c9 100644
--- a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceFactoryImpl.java
+++ b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceFactoryImpl.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2015 Christian W. Damus 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:
* Christian W. Damus - Initial API and implementation
*/
@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
*
* The Resource Factory associated with the package.
*
+ *
* @see org.eclipse.papyrus.aof.sync.emf.syncmapping.util.SyncMappingResourceImpl
* @generated
*/
@@ -29,6 +30,7 @@ public class SyncMappingResourceFactoryImpl extends ResourceFactoryImpl implemen
* Creates an instance of the resource factory.
*
*
+ *
* @generated
*/
public SyncMappingResourceFactoryImpl() {
@@ -39,6 +41,7 @@ public class SyncMappingResourceFactoryImpl extends ResourceFactoryImpl implemen
* Creates an instance of the resource.
*
*
+ *
* @generated
*/
@Override
@@ -47,4 +50,4 @@ public class SyncMappingResourceFactoryImpl extends ResourceFactoryImpl implemen
return result;
}
-} //SyncMappingResourceFactoryImpl
+} // SyncMappingResourceFactoryImpl
diff --git a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceImpl.java b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceImpl.java
index d8a37ec7329..04cf76229c5 100644
--- a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceImpl.java
+++ b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingResourceImpl.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2015 Christian W. Damus 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:
* Christian W. Damus - Initial API and implementation
*/
@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
*
* The Resource associated with the package.
*
+ *
* @see org.eclipse.papyrus.aof.sync.emf.syncmapping.util.SyncMappingResourceFactoryImpl
* @generated
*/
@@ -30,7 +31,9 @@ public class SyncMappingResourceImpl extends ResourceImpl implements SyncMapping
* Creates an instance of the resource.
*
*
- * @param uri the URI of the new resource.
+ *
+ * @param uri
+ * the URI of the new resource.
* @generated
*/
public SyncMappingResourceImpl(URI uri) {
@@ -45,7 +48,7 @@ public class SyncMappingResourceImpl extends ResourceImpl implements SyncMapping
public void load(Map, ?> options) throws IOException {
setLoaded(true);
}
-
+
/**
* Persistence is not supported; save requests are just ignored (except that
* I become {@linkplain Resource#isModified() unmodified}.
@@ -54,4 +57,4 @@ public class SyncMappingResourceImpl extends ResourceImpl implements SyncMapping
public void save(Map, ?> options) throws IOException {
setModified(false);
}
-} //SyncMappingResourceImpl
+} // SyncMappingResourceImpl
diff --git a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingSwitch.java b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingSwitch.java
index ef41cc8818d..45c1b0f1026 100644
--- a/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingSwitch.java
+++ b/extraplugins/aof/sync/org.eclipse.papyrus.aof.sync.emf/src-gen/org/eclipse/papyrus/aof/sync/emf/syncmapping/util/SyncMappingSwitch.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.aof.sync.emf.syncmapping.*;
* until a non-null result is returned,
* which is the result of the switch.
*
+ *
* @see org.eclipse.papyrus.aof.sync.emf.syncmapping.SyncMappingPackage
* @generated
*/
@@ -39,6 +40,7 @@ public class SyncMappingSwitchcaseXXX
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
*/
@@ -138,7 +144,9 @@ public class SyncMappingSwitch