From 76740257c3ff42ceb30b49968473ba6449ba4be0 Mon Sep 17 00:00:00 2001
From: cbrun
Date: Mon, 25 Jun 2007 16:05:19 +0000
Subject: [PATCH] FIX :regression on "isSimilar" CLEANUP : checkstyle
---
.../org.eclipse.emf.compare.diff/model/diff.ecore | 16 +-
.../model/diff.genmodel | 6 +-
.../emf/compare/diff/generic/DiffMaker.java | 83 +++++++----
.../compare/diff/metamodel/AddReferenceValue.java | 2 +-
.../emf/compare/diff/metamodel/DiffFactory.java | 9 ++
.../emf/compare/diff/metamodel/DiffPackage.java | 143 +++++++++++++++++-
...eValue.java => UpdateUniqueReferenceValue.java} | 32 ++--
.../diff/metamodel/impl/AddReferenceValueImpl.java | 24 +--
.../diff/metamodel/impl/DiffFactoryImpl.java | 14 ++
.../compare/diff/metamodel/impl/DiffGroupImpl.java | 2 -
.../diff/metamodel/impl/DiffPackageImpl.java | 66 +++++++-
.../impl/UpdateUniqueReferenceValueImpl.java | 166 +++++++++++++++++++++
.../diff/metamodel/util/DiffAdapterFactory.java | 20 +++
.../compare/diff/metamodel/util/DiffSwitch.java | 30 ++++
14 files changed, 539 insertions(+), 74 deletions(-)
copy plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/{AddReferenceValue.java => UpdateUniqueReferenceValue.java} (52%)
create mode 100644 plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateUniqueReferenceValueImpl.java
diff --git a/plugins/org.eclipse.emf.compare.diff/model/diff.ecore b/plugins/org.eclipse.emf.compare.diff/model/diff.ecore
index 53fb2e33a..088484d3f 100644
--- a/plugins/org.eclipse.emf.compare.diff/model/diff.ecore
+++ b/plugins/org.eclipse.emf.compare.diff/model/diff.ecore
@@ -19,12 +19,12 @@
transient="true" unsettable="true" derived="true"/>
-
+
-
+
@@ -49,10 +49,10 @@
-
+
+
+
+
+
-
diff --git a/plugins/org.eclipse.emf.compare.diff/model/diff.genmodel b/plugins/org.eclipse.emf.compare.diff/model/diff.genmodel
index 12310c3c7..a656952e9 100644
--- a/plugins/org.eclipse.emf.compare.diff/model/diff.genmodel
+++ b/plugins/org.eclipse.emf.compare.diff/model/diff.genmodel
@@ -51,14 +51,18 @@
-
+
+
+
+
+
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/generic/DiffMaker.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/generic/DiffMaker.java
index fa83cef14..1516921f6 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/generic/DiffMaker.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/generic/DiffMaker.java
@@ -29,6 +29,7 @@ import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
import org.eclipse.emf.compare.diff.metamodel.RemoveModelElement;
import org.eclipse.emf.compare.diff.metamodel.RemoveReferenceValue;
import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
+import org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue;
import org.eclipse.emf.compare.match.metamodel.Match2Elements;
import org.eclipse.emf.compare.match.metamodel.MatchModel;
import org.eclipse.emf.compare.match.metamodel.UnMatchElement;
@@ -286,15 +287,15 @@ public class DiffMaker implements DiffEngine {
deletedReferences.addAll(leftElementReferences);
if (rightElementReferences != null)
addedReferences.addAll(rightElementReferences);
-
+
final List matchedOldReferences = getMatchedReferences(deletedReferences);
final List matchedNewReferences = getMatchedReferences(addedReferences);
-
+
// "Added" references are the references from the left element that can't be mapped
addedReferences.removeAll(matchedOldReferences);
// "deleted" references are the references from the right element that can't be mapped
deletedReferences.removeAll(matchedNewReferences);
-
+
// Double check for objects defined in a different model and thus not matched
// We'll use a new list to keep track of theses elements !avoid concurrent modification!
final List remoteMatchedElements = new ArrayList();
@@ -305,45 +306,77 @@ public class DiffMaker implements DiffEngine {
}
addedReferences.removeAll(remoteMatchedElements);
deletedReferences.removeAll(remoteMatchedElements);
-
- //TODO changedReference
- if (addedReferences.size() > 0) {
- root.getSubDiffElements().add(createNewReferencesOperation(mapping, next, addedReferences));
- }
- if (deletedReferences.size() > 0) {
- root.getSubDiffElements().add(createRemovedReferencesOperation(mapping, next, deletedReferences));
+
+ if (!next.isMany() && addedReferences.size() > 0 && deletedReferences.size() > 0) {
+ root.getSubDiffElements().add(
+ createUpdatedReferencesOperation(mapping, next, addedReferences,
+ deletedReferences));
+ } else {
+ if (addedReferences.size() > 0) {
+ root.getSubDiffElements().add(
+ createNewReferencesOperation(mapping, next, addedReferences));
+ }
+ if (deletedReferences.size() > 0) {
+ root.getSubDiffElements().add(
+ createRemovedReferencesOperation(mapping, next, deletedReferences));
+ }
}
}
}
}
-
+
+ @SuppressWarnings("unchecked")
+ private UpdateUniqueReferenceValue createUpdatedReferencesOperation(Match2Elements mapping,
+ EReference newReference, List deletedReferences, List addedReferences) {
+ final UpdateUniqueReferenceValue operation = DiffFactory.eINSTANCE.createUpdateUniqueReferenceValue();
+ operation.setLeftElement(mapping.getLeftElement());
+ operation.setRightElement(mapping.getRightElement());
+ operation.setReference(newReference);
+
+ EObject leftTarget = getMatchedEObject(addedReferences.get(0));
+ EObject rightTarget = getMatchedEObject(deletedReferences.get(0));
+ // checks if target are defined remotely
+ if (leftTarget == null)
+ leftTarget = addedReferences.get(0);
+ if (rightTarget == null)
+ rightTarget = deletedReferences.get(0);
+
+ operation.getLeftTarget().add(leftTarget);
+ operation.getRightTarget().add(rightTarget);
+
+ return operation;
+ }
+
@SuppressWarnings("unchecked")
- private AddReferenceValue createNewReferencesOperation(Match2Elements mapping, EReference newReference, List addedReferences) {
+ private AddReferenceValue createNewReferencesOperation(Match2Elements mapping, EReference newReference,
+ List addedReferences) {
final AddReferenceValue operation = DiffFactory.eINSTANCE.createAddReferenceValue();
operation.setLeftElement(mapping.getLeftElement());
operation.setRightElement(mapping.getRightElement());
operation.setReference(newReference);
- for (final Iterator addedReferenceIterator = addedReferences.iterator(); addedReferenceIterator.hasNext(); ) {
- final Object eobj = addedReferenceIterator.next();
+ for (final Iterator addedReferenceIterator = addedReferences.iterator(); addedReferenceIterator
+ .hasNext(); ) {
+ final EObject eobj = addedReferenceIterator.next();
operation.getRightAddedTarget().add(eobj);
- if (getMatchedEObject((EObject)eobj) != null)
- operation.getLeftAddedTarget().add(getMatchedEObject((EObject)eobj));
+ if (getMatchedEObject(eobj) != null)
+ operation.getLeftAddedTarget().add(getMatchedEObject(eobj));
}
return operation;
}
-
+
@SuppressWarnings("unchecked")
- private RemoveReferenceValue createRemovedReferencesOperation(Match2Elements mapping, EReference removedReference, List deletedReferences) {
- final RemoveReferenceValue deloperation = DiffFactory.eINSTANCE
- .createRemoveReferenceValue();
+ private RemoveReferenceValue createRemovedReferencesOperation(Match2Elements mapping,
+ EReference removedReference, List deletedReferences) {
+ final RemoveReferenceValue deloperation = DiffFactory.eINSTANCE.createRemoveReferenceValue();
deloperation.setRightElement(mapping.getRightElement());
deloperation.setLeftElement(mapping.getLeftElement());
deloperation.setReference(removedReference);
- for (final Iterator deletedReferenceIterator = deletedReferences.iterator(); deletedReferenceIterator.hasNext(); ) {
- final Object eobj = deletedReferenceIterator.next();
+ for (final Iterator deletedReferenceIterator = deletedReferences.iterator(); deletedReferenceIterator
+ .hasNext(); ) {
+ final EObject eobj = deletedReferenceIterator.next();
deloperation.getLeftRemovedTarget().add(eobj);
- if ((getMatchedEObject((EObject)eobj)) != null)
- deloperation.getRightRemovedTarget().add(getMatchedEObject((EObject)eobj));
+ if ((getMatchedEObject(eobj)) != null)
+ deloperation.getRightRemovedTarget().add(getMatchedEObject(eobj));
}
return deloperation;
}
@@ -352,7 +385,7 @@ public class DiffMaker implements DiffEngine {
* Returns the list of references from the given list that can be matched.
*
* @param references
- * {@link List} of the references to match.
+ * {@link List} of the references to match.
* @return The list of references from the given list that can be matched.
*/
private List getMatchedReferences(List references) {
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java
index 51607909e..1c30bcc9d 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java
@@ -20,8 +20,8 @@ import org.eclipse.emf.common.util.EList;
*
* The following features are supported:
*
- * - {@link org.eclipse.emf.compare.diff.metamodel.AddReferenceValue#getLeftAddedTarget Left Added Target}
* - {@link org.eclipse.emf.compare.diff.metamodel.AddReferenceValue#getRightAddedTarget Right Added Target}
+ * - {@link org.eclipse.emf.compare.diff.metamodel.AddReferenceValue#getLeftAddedTarget Left Added Target}
*
*
*
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffFactory.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffFactory.java
index f4286b712..0d8b90897 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffFactory.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffFactory.java
@@ -165,6 +165,15 @@ public interface DiffFactory extends EFactory {
UpdateReference createUpdateReference();
/**
+ * Returns a new object of class 'Update Unique Reference Value'.
+ *
+ *
+ * @return a new object of class 'Update Unique Reference Value'.
+ * @generated
+ */
+ UpdateUniqueReferenceValue createUpdateUniqueReferenceValue();
+
+ /**
* Returns a new object of class 'Model Input Snapshot'.
*
*
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffPackage.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffPackage.java
index 5d1613273..2ff69ac51 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffPackage.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffPackage.java
@@ -735,22 +735,22 @@ public interface DiffPackage extends EPackage {
int ADD_REFERENCE_VALUE__LEFT_ELEMENT = REFERENCE_CHANGE__LEFT_ELEMENT;
/**
- * The feature id for the 'Left Added Target' reference list.
+ * The feature id for the 'Right Added Target' reference list.
*
*
* @generated
* @ordered
*/
- int ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 0;
+ int ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 0;
/**
- * The feature id for the 'Right Added Target' reference list.
+ * The feature id for the 'Left Added Target' reference list.
*
*
* @generated
* @ordered
*/
- int ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 1;
+ int ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 1;
/**
* The number of structural features of the 'Add Reference Value' class.
@@ -890,6 +890,79 @@ public interface DiffPackage extends EPackage {
int UPDATE_REFERENCE_FEATURE_COUNT = REFERENCE_CHANGE_FEATURE_COUNT + 0;
/**
+ * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateUniqueReferenceValueImpl Update Unique Reference Value}' class.
+ *
+ *
+ * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateUniqueReferenceValueImpl
+ * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateUniqueReferenceValue()
+ * @generated
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE = 16;
+
+ /**
+ * The feature id for the 'Sub Diff Elements' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE__SUB_DIFF_ELEMENTS = UPDATE_REFERENCE__SUB_DIFF_ELEMENTS;
+
+ /**
+ * The feature id for the 'Reference' reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE__REFERENCE = UPDATE_REFERENCE__REFERENCE;
+
+ /**
+ * The feature id for the 'Right Element' reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_ELEMENT = UPDATE_REFERENCE__RIGHT_ELEMENT;
+
+ /**
+ * The feature id for the 'Left Element' reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_ELEMENT = UPDATE_REFERENCE__LEFT_ELEMENT;
+
+ /**
+ * The feature id for the 'Left Target' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET = UPDATE_REFERENCE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the 'Right Target' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET = UPDATE_REFERENCE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the 'Update Unique Reference Value' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int UPDATE_UNIQUE_REFERENCE_VALUE_FEATURE_COUNT = UPDATE_REFERENCE_FEATURE_COUNT + 2;
+
+ /**
* The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelInputSnapshotImpl Model Input Snapshot}' class.
*
*
@@ -897,7 +970,7 @@ public interface DiffPackage extends EPackage {
* @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelInputSnapshot()
* @generated
*/
- int MODEL_INPUT_SNAPSHOT = 16;
+ int MODEL_INPUT_SNAPSHOT = 17;
/**
* The feature id for the 'Date' attribute.
@@ -1360,6 +1433,38 @@ public interface DiffPackage extends EPackage {
EClass getUpdateReference();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue Update Unique Reference Value}'.
+ *
+ *
+ * @return the meta object for class 'Update Unique Reference Value'.
+ * @see org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue
+ * @generated
+ */
+ EClass getUpdateUniqueReferenceValue();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue#getLeftTarget Left Target}'.
+ *
+ *
+ * @return the meta object for the reference list 'Left Target'.
+ * @see org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue#getLeftTarget()
+ * @see #getUpdateUniqueReferenceValue()
+ * @generated
+ */
+ EReference getUpdateUniqueReferenceValue_LeftTarget();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue#getRightTarget Right Target}'.
+ *
+ *
+ * @return the meta object for the reference list 'Right Target'.
+ * @see org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue#getRightTarget()
+ * @see #getUpdateUniqueReferenceValue()
+ * @generated
+ */
+ EReference getUpdateUniqueReferenceValue_RightTarget();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ModelInputSnapshot Model Input Snapshot}'.
*
*
@@ -1780,6 +1885,34 @@ public interface DiffPackage extends EPackage {
EClass UPDATE_REFERENCE = eINSTANCE.getUpdateReference();
/**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateUniqueReferenceValueImpl Update Unique Reference Value}' class.
+ *
+ *
+ * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateUniqueReferenceValueImpl
+ * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateUniqueReferenceValue()
+ * @generated
+ */
+ EClass UPDATE_UNIQUE_REFERENCE_VALUE = eINSTANCE.getUpdateUniqueReferenceValue();
+
+ /**
+ * The meta object literal for the 'Left Target' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET = eINSTANCE
+ .getUpdateUniqueReferenceValue_LeftTarget();
+
+ /**
+ * The meta object literal for the 'Right Target' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET = eINSTANCE
+ .getUpdateUniqueReferenceValue_RightTarget();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelInputSnapshotImpl Model Input Snapshot}' class.
*
*
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateUniqueReferenceValue.java
similarity index 52%
copy from plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java
copy to plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateUniqueReferenceValue.java
index 51607909e..ed780f502 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AddReferenceValue.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateUniqueReferenceValue.java
@@ -14,52 +14,52 @@ import org.eclipse.emf.common.util.EList;
/**
*
- * A representation of the model object 'Add Reference Value'.
+ * A representation of the model object 'Update Unique Reference Value'.
*
*
*
* The following features are supported:
*
- * - {@link org.eclipse.emf.compare.diff.metamodel.AddReferenceValue#getLeftAddedTarget Left Added Target}
- * - {@link org.eclipse.emf.compare.diff.metamodel.AddReferenceValue#getRightAddedTarget Right Added Target}
+ * - {@link org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue#getLeftTarget Left Target}
+ * - {@link org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue#getRightTarget Right Target}
*
*
*
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAddReferenceValue()
+ * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateUniqueReferenceValue()
* @model
* @generated
*/
-public interface AddReferenceValue extends ReferenceChange {
+public interface UpdateUniqueReferenceValue extends UpdateReference {
/**
- * Returns the value of the 'Left Added Target' reference list.
+ * Returns the value of the 'Left Target' reference list.
* The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
*
*
- * If the meaning of the 'Left Added Target' reference list isn't clear,
+ * If the meaning of the 'Left Target' reference list isn't clear,
* there really should be more of a description here...
*
*
- * @return the value of the 'Left Added Target' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAddReferenceValue_LeftAddedTarget()
+ * @return the value of the 'Left Target' reference list.
+ * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateUniqueReferenceValue_LeftTarget()
* @model type="org.eclipse.emf.ecore.EObject"
* @generated
*/
- EList getLeftAddedTarget();
+ EList getLeftTarget();
/**
- * Returns the value of the 'Right Added Target' reference list.
+ * Returns the value of the 'Right Target' reference list.
* The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
*
*
- * If the meaning of the 'Right Added Target' reference list isn't clear,
+ * If the meaning of the 'Right Target' reference list isn't clear,
* there really should be more of a description here...
*
*
- * @return the value of the 'Right Added Target' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAddReferenceValue_RightAddedTarget()
+ * @return the value of the 'Right Target' reference list.
+ * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateUniqueReferenceValue_RightTarget()
* @model type="org.eclipse.emf.ecore.EObject"
* @generated
*/
- EList getRightAddedTarget();
+ EList getRightTarget();
-} // AddReferenceValue
\ No newline at end of file
+} // UpdateUniqueReferenceValue
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AddReferenceValueImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AddReferenceValueImpl.java
index c36d22a92..5e875cc98 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AddReferenceValueImpl.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AddReferenceValueImpl.java
@@ -26,8 +26,8 @@ import org.eclipse.emf.ecore.util.EObjectResolvingEList;
*
* The following features are implemented:
*
- * - {@link org.eclipse.emf.compare.diff.metamodel.impl.AddReferenceValueImpl#getLeftAddedTarget Left Added Target}
* - {@link org.eclipse.emf.compare.diff.metamodel.impl.AddReferenceValueImpl#getRightAddedTarget Right Added Target}
+ * - {@link org.eclipse.emf.compare.diff.metamodel.impl.AddReferenceValueImpl#getLeftAddedTarget Left Added Target}
*
*
*
@@ -105,10 +105,10 @@ public class AddReferenceValueImpl extends ReferenceChangeImpl implements AddRef
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
- return getLeftAddedTarget();
case DiffPackage.ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET:
return getRightAddedTarget();
+ case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
+ return getLeftAddedTarget();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -120,14 +120,14 @@ public class AddReferenceValueImpl extends ReferenceChangeImpl implements AddRef
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
- getLeftAddedTarget().clear();
- getLeftAddedTarget().addAll((Collection)newValue);
- return;
case DiffPackage.ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET:
getRightAddedTarget().clear();
getRightAddedTarget().addAll((Collection)newValue);
return;
+ case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
+ getLeftAddedTarget().clear();
+ getLeftAddedTarget().addAll((Collection)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -139,12 +139,12 @@ public class AddReferenceValueImpl extends ReferenceChangeImpl implements AddRef
*/
public void eUnset(int featureID) {
switch (featureID) {
- case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
- getLeftAddedTarget().clear();
- return;
case DiffPackage.ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET:
getRightAddedTarget().clear();
return;
+ case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
+ getLeftAddedTarget().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -156,10 +156,10 @@ public class AddReferenceValueImpl extends ReferenceChangeImpl implements AddRef
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
- return leftAddedTarget != null && !leftAddedTarget.isEmpty();
case DiffPackage.ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET:
return rightAddedTarget != null && !rightAddedTarget.isEmpty();
+ case DiffPackage.ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET:
+ return leftAddedTarget != null && !leftAddedTarget.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffFactoryImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffFactoryImpl.java
index 608550987..f36aa96dd 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffFactoryImpl.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffFactoryImpl.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.emf.compare.diff.metamodel.impl;
+import org.eclipse.emf.compare.diff.metamodel.*;
+
import org.eclipse.emf.compare.diff.metamodel.AddAttribute;
import org.eclipse.emf.compare.diff.metamodel.AddModelElement;
import org.eclipse.emf.compare.diff.metamodel.AddReferenceValue;
@@ -107,6 +109,8 @@ public class DiffFactoryImpl extends EFactoryImpl implements DiffFactory {
return createRemoveReferenceValue();
case DiffPackage.UPDATE_REFERENCE:
return createUpdateReference();
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE:
+ return createUpdateUniqueReferenceValue();
case DiffPackage.MODEL_INPUT_SNAPSHOT:
return createModelInputSnapshot();
default:
@@ -270,6 +274,16 @@ public class DiffFactoryImpl extends EFactoryImpl implements DiffFactory {
*
* @generated
*/
+ public UpdateUniqueReferenceValue createUpdateUniqueReferenceValue() {
+ UpdateUniqueReferenceValueImpl updateUniqueReferenceValue = new UpdateUniqueReferenceValueImpl();
+ return updateUniqueReferenceValue;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
public ModelInputSnapshot createModelInputSnapshot() {
ModelInputSnapshotImpl modelInputSnapshot = new ModelInputSnapshotImpl();
return modelInputSnapshot;
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffGroupImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffGroupImpl.java
index f1e731670..12fe7ec9f 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffGroupImpl.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffGroupImpl.java
@@ -132,7 +132,6 @@ public class DiffGroupImpl extends DiffElementImpl implements DiffGroup {
oldLeftParent, leftParent));
}
-
/**
*
*
@@ -153,7 +152,6 @@ public class DiffGroupImpl extends DiffElementImpl implements DiffGroup {
return result;
}
-
/**
*
*
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffPackageImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffPackageImpl.java
index 18ba20244..c93f88d21 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffPackageImpl.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffPackageImpl.java
@@ -29,6 +29,8 @@ import org.eclipse.emf.compare.diff.metamodel.RemoveReferenceValue;
import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
+import org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue;
+
import org.eclipse.emf.compare.match.metamodel.MatchPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
@@ -161,6 +163,13 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
*
* @generated
*/
+ private EClass updateUniqueReferenceValueEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
private EClass modelInputSnapshotEClass = null;
/**
@@ -550,7 +559,7 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
* @generated
*/
public EReference getAddReferenceValue_LeftAddedTarget() {
- return (EReference)addReferenceValueEClass.getEStructuralFeatures().get(0);
+ return (EReference)addReferenceValueEClass.getEStructuralFeatures().get(1);
}
/**
@@ -559,7 +568,7 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
* @generated
*/
public EReference getAddReferenceValue_RightAddedTarget() {
- return (EReference)addReferenceValueEClass.getEStructuralFeatures().get(1);
+ return (EReference)addReferenceValueEClass.getEStructuralFeatures().get(0);
}
/**
@@ -603,6 +612,33 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
*
* @generated
*/
+ public EClass getUpdateUniqueReferenceValue() {
+ return updateUniqueReferenceValueEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getUpdateUniqueReferenceValue_LeftTarget() {
+ return (EReference)updateUniqueReferenceValueEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getUpdateUniqueReferenceValue_RightTarget() {
+ return (EReference)updateUniqueReferenceValueEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
public EClass getModelInputSnapshot() {
return modelInputSnapshotEClass;
}
@@ -710,8 +746,8 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
updateAttributeEClass = createEClass(UPDATE_ATTRIBUTE);
addReferenceValueEClass = createEClass(ADD_REFERENCE_VALUE);
- createEReference(addReferenceValueEClass, ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET);
createEReference(addReferenceValueEClass, ADD_REFERENCE_VALUE__RIGHT_ADDED_TARGET);
+ createEReference(addReferenceValueEClass, ADD_REFERENCE_VALUE__LEFT_ADDED_TARGET);
removeReferenceValueEClass = createEClass(REMOVE_REFERENCE_VALUE);
createEReference(removeReferenceValueEClass, REMOVE_REFERENCE_VALUE__LEFT_REMOVED_TARGET);
@@ -719,6 +755,10 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
updateReferenceEClass = createEClass(UPDATE_REFERENCE);
+ updateUniqueReferenceValueEClass = createEClass(UPDATE_UNIQUE_REFERENCE_VALUE);
+ createEReference(updateUniqueReferenceValueEClass, UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET);
+ createEReference(updateUniqueReferenceValueEClass, UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET);
+
modelInputSnapshotEClass = createEClass(MODEL_INPUT_SNAPSHOT);
createEAttribute(modelInputSnapshotEClass, MODEL_INPUT_SNAPSHOT__DATE);
createEReference(modelInputSnapshotEClass, MODEL_INPUT_SNAPSHOT__DIFF);
@@ -770,6 +810,7 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
addReferenceValueEClass.getESuperTypes().add(this.getReferenceChange());
removeReferenceValueEClass.getESuperTypes().add(this.getReferenceChange());
updateReferenceEClass.getESuperTypes().add(this.getReferenceChange());
+ updateUniqueReferenceValueEClass.getESuperTypes().add(this.getUpdateReference());
// Initialize classes and features; add operations and parameters
initEClass(diffModelEClass, DiffModel.class, "DiffModel", !IS_ABSTRACT, !IS_INTERFACE,
@@ -873,14 +914,14 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
initEClass(addReferenceValueEClass, AddReferenceValue.class, "AddReferenceValue", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getAddReferenceValue_LeftAddedTarget(), ecorePackage.getEObject(), null,
- "leftAddedTarget", null, 0, -1, AddReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE,
- IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
initEReference(getAddReferenceValue_RightAddedTarget(), ecorePackage.getEObject(), null,
"rightAddedTarget", null, 0, -1, AddReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
+ initEReference(getAddReferenceValue_LeftAddedTarget(), ecorePackage.getEObject(), null,
+ "leftAddedTarget", null, 0, -1, AddReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEClass(removeReferenceValueEClass, RemoveReferenceValue.class, "RemoveReferenceValue",
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -896,6 +937,17 @@ public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
initEClass(updateReferenceEClass, UpdateReference.class, "UpdateReference", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(updateUniqueReferenceValueEClass, UpdateUniqueReferenceValue.class,
+ "UpdateUniqueReferenceValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getUpdateUniqueReferenceValue_LeftTarget(), ecorePackage.getEObject(), null,
+ "leftTarget", null, 0, -1, UpdateUniqueReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEReference(getUpdateUniqueReferenceValue_RightTarget(), ecorePackage.getEObject(), null,
+ "rightTarget", null, 0, -1, UpdateUniqueReferenceValue.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
initEClass(modelInputSnapshotEClass, ModelInputSnapshot.class, "ModelInputSnapshot", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getModelInputSnapshot_Date(), ecorePackage.getEDate(), "date", null, 0, 1,
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateUniqueReferenceValueImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateUniqueReferenceValueImpl.java
new file mode 100644
index 000000000..0999dbbad
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateUniqueReferenceValueImpl.java
@@ -0,0 +1,166 @@
+/**
+ *
+ *
+ *
+ * $Id: UpdateUniqueReferenceValueImpl.java,v 1.1 2007/06/25 16:05:20 cbrun Exp $
+ */
+package org.eclipse.emf.compare.diff.metamodel.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
+import org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+/**
+ *
+ * An implementation of the model object 'Update Unique Reference Value'.
+ *
+ *
+ * The following features are implemented:
+ *
+ * - {@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateUniqueReferenceValueImpl#getLeftTarget Left Target}
+ * - {@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateUniqueReferenceValueImpl#getRightTarget Right Target}
+ *
+ *
+ *
+ * @generated
+ */
+public class UpdateUniqueReferenceValueImpl extends UpdateReferenceImpl implements UpdateUniqueReferenceValue {
+ /**
+ * The cached value of the '{@link #getLeftTarget() Left Target}' reference list.
+ *
+ *
+ * @see #getLeftTarget()
+ * @generated
+ * @ordered
+ */
+ protected EList leftTarget = null;
+
+ /**
+ * The cached value of the '{@link #getRightTarget() Right Target}' reference list.
+ *
+ *
+ * @see #getRightTarget()
+ * @generated
+ * @ordered
+ */
+ protected EList rightTarget = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected UpdateUniqueReferenceValueImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return DiffPackage.Literals.UPDATE_UNIQUE_REFERENCE_VALUE;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EList getLeftTarget() {
+ if (leftTarget == null) {
+ leftTarget = new EObjectResolvingEList(EObject.class, this,
+ DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET);
+ }
+ return leftTarget;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EList getRightTarget() {
+ if (rightTarget == null) {
+ rightTarget = new EObjectResolvingEList(EObject.class, this,
+ DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET);
+ }
+ return rightTarget;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET:
+ return getLeftTarget();
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET:
+ return getRightTarget();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET:
+ getLeftTarget().clear();
+ getLeftTarget().addAll((Collection)newValue);
+ return;
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET:
+ getRightTarget().clear();
+ getRightTarget().addAll((Collection)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET:
+ getLeftTarget().clear();
+ return;
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET:
+ getRightTarget().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__LEFT_TARGET:
+ return leftTarget != null && !leftTarget.isEmpty();
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE__RIGHT_TARGET:
+ return rightTarget != null && !rightTarget.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //UpdateUniqueReferenceValueImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffAdapterFactory.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffAdapterFactory.java
index dedd18c29..d01618fe0 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffAdapterFactory.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffAdapterFactory.java
@@ -13,6 +13,8 @@ package org.eclipse.emf.compare.diff.metamodel.util;
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.compare.diff.metamodel.*;
+
import org.eclipse.emf.compare.diff.metamodel.AddAttribute;
import org.eclipse.emf.compare.diff.metamodel.AddModelElement;
import org.eclipse.emf.compare.diff.metamodel.AddReferenceValue;
@@ -151,6 +153,10 @@ public class DiffAdapterFactory extends AdapterFactoryImpl {
return createUpdateReferenceAdapter();
}
+ public Object caseUpdateUniqueReferenceValue(UpdateUniqueReferenceValue object) {
+ return createUpdateUniqueReferenceValueAdapter();
+ }
+
public Object caseModelInputSnapshot(ModelInputSnapshot object) {
return createModelInputSnapshotAdapter();
}
@@ -397,6 +403,20 @@ public class DiffAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateUniqueReferenceValue Update Unique Reference 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.compare.diff.metamodel.UpdateUniqueReferenceValue
+ * @generated
+ */
+ public Adapter createUpdateUniqueReferenceValueAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ModelInputSnapshot Model Input Snapshot}'.
*
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffSwitch.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffSwitch.java
index 60b71b6d4..ee45ee2ee 100644
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffSwitch.java
+++ b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffSwitch.java
@@ -12,6 +12,8 @@ package org.eclipse.emf.compare.diff.metamodel.util;
import java.util.List;
+import org.eclipse.emf.compare.diff.metamodel.*;
+
import org.eclipse.emf.compare.diff.metamodel.AddAttribute;
import org.eclipse.emf.compare.diff.metamodel.AddModelElement;
import org.eclipse.emf.compare.diff.metamodel.AddReferenceValue;
@@ -266,6 +268,19 @@ public class DiffSwitch {
result = defaultCase(theEObject);
return result;
}
+ case DiffPackage.UPDATE_UNIQUE_REFERENCE_VALUE: {
+ UpdateUniqueReferenceValue updateUniqueReferenceValue = (UpdateUniqueReferenceValue)theEObject;
+ Object result = caseUpdateUniqueReferenceValue(updateUniqueReferenceValue);
+ if (result == null)
+ result = caseUpdateReference(updateUniqueReferenceValue);
+ if (result == null)
+ result = caseReferenceChange(updateUniqueReferenceValue);
+ if (result == null)
+ result = caseDiffElement(updateUniqueReferenceValue);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
case DiffPackage.MODEL_INPUT_SNAPSHOT: {
ModelInputSnapshot modelInputSnapshot = (ModelInputSnapshot)theEObject;
Object result = caseModelInputSnapshot(modelInputSnapshot);
@@ -519,6 +534,21 @@ public class DiffSwitch {
}
/**
+ * Returns the result of interpretting the object as an instance of 'Update Unique Reference 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 interpretting the object as an instance of 'Update Unique Reference Value'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseUpdateUniqueReferenceValue(UpdateUniqueReferenceValue object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpretting the object as an instance of 'Model Input Snapshot'.
*
* This implementation returns null;
--
2.11.4.GIT