Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare')
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/DiffPlugin.java62
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/EMFCompareDiffMessages.java66
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/emfcomparediffmessages.properties60
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/GenericDiffEngine.java1025
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine.java65
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine2.java53
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager.java87
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager2.java33
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AbstractCheck.java214
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AttributesCheck.java890
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/ReferencesCheck.java1240
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/package-info.java23
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffCollectionsHelper.java151
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffReferenceUtil.java150
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/CrossReferencerMatchManager.java152
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/MatchCrossReferencer.java73
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/DefaultMergerProvider.java79
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeLeftTargetMerger.java80
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeRightTargetMerger.java80
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeOrderChangeMerger.java227
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffExtensionMerger.java69
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffGroupMerger.java49
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeLeftTargetMerger.java135
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeRightTargetMerger.java146
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/MoveModelElementMerger.java103
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeLeftTargetMerger.java149
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeRightTargetMerger.java150
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceOrderChangeMerger.java82
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateAttributeMerger.java63
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateReferenceMerger.java93
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/package-info.java20
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/package-info.java20
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DefaultDiffEngineSelector.java40
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DiffExtensionDescriptor.java145
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/AbstractMergeListener.java56
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultExtensionMerger.java73
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultMerger.java552
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/EMFCompareEObjectCopier.java870
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergeListener.java54
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMerger.java56
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergerProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/MergeEvent.java58
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/package-info.java24
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeFactory.java261
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeService.java248
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergerProviderDescriptor.java220
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/package-info.java22
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AbstractDiffExtension.java109
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChange.java113
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeLeftTarget.java58
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeRightTarget.java58
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeOrderChange.java26
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSetSnapshot.java88
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSnapshot.java86
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonSnapshot.java62
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ConflictingDiffElement.java112
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffElement.java174
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffFactory.java270
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffGroup.java87
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffModel.java128
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffPackage.java4359
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffResourceSet.java77
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DifferenceKind.java261
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChange.java28
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeLeftTarget.java86
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeRightTarget.java86
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/MoveModelElement.java86
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChange.java113
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeLeftTarget.java88
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeRightTarget.java88
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceOrderChange.java66
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChange.java52
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeLeftTarget.java25
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeRightTarget.java26
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDiff.java28
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateAttribute.java29
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateContainmentFeature.java28
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateModelElement.java87
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateReference.java90
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AbstractDiffExtensionImpl.java274
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeImpl.java276
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeLeftTargetImpl.java175
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeRightTargetImpl.java175
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeOrderChangeImpl.java58
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSetSnapshotImpl.java321
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSnapshotImpl.java317
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ConflictingDiffElementImpl.java298
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffElementImpl.java466
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffFactoryImpl.java452
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffGroupImpl.java243
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffModelImpl.java435
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffPackageImpl.java1551
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffResourceSetImpl.java197
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeImpl.java44
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeLeftTargetImpl.java231
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeRightTargetImpl.java232
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/MoveModelElementImpl.java248
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeImpl.java276
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeLeftTargetImpl.java249
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeRightTargetImpl.java251
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceOrderChangeImpl.java180
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeImpl.java130
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeLeftTargetImpl.java58
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeRightTargetImpl.java58
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDiffImpl.java43
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateAttributeImpl.java81
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateContainmentFeatureImpl.java43
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateModelElementImpl.java215
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateReferenceImpl.java255
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffAdapterFactory.java690
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffSwitch.java846
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/package-info.java22
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineDescriptor.java349
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineRegistry.java324
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffService.java571
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/IDiffEngineSelector.java31
-rw-r--r--plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/package-info.java21
117 files changed, 0 insertions, 26365 deletions
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/DiffPlugin.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/DiffPlugin.java
deleted file mode 100644
index 5164f4d5a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/DiffPlugin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator for EMF Compare's diff plugin.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-public class DiffPlugin extends Plugin {
- /** This plugin's ID. */
- public static final String PLUGIN_ID = "org.eclipse.emf.compare.diff"; //$NON-NLS-1$
-
- /** This plugin's shared instance. */
- private static DiffPlugin plugin;
-
- /** Default Constructor. */
- public DiffPlugin() {
- plugin = this;
- }
-
- /**
- * Returns the plugin's shared instance.
- *
- * @return The plugin's shared instance.
- */
- public static DiffPlugin getDefault() {
- return plugin;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see AbstractUIPlugin#stop(BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/EMFCompareDiffMessages.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/EMFCompareDiffMessages.java
deleted file mode 100644
index 22d0bef8f..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/EMFCompareDiffMessages.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Utility class to access externalized Strings for EMF Compare's diff.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public final class EMFCompareDiffMessages {
- /** Full qualified path to the properties file in which to seek the keys. */
- private static final String BUNDLE_NAME = "org.eclipse.emf.compare.diff.emfcomparediffmessages"; //$NON-NLS-1$
-
- /** Contains the locale specific {@link String}s needed by this plug-in. */
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private EMFCompareDiffMessages() {
- // prevents instantiation
- }
-
- /**
- * Returns a specified {@link String} from the resource bundle.
- *
- * @param key
- * Key of the String we seek.
- * @return The String from the resource bundle associated with <code>key</code>.
- */
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-
- /**
- * Returns a String from the resource bundle bound with the given arguments.
- *
- * @param key
- * Key of the String we seek.
- * @param arguments
- * Arguments for the String formatting.
- * @return formatted {@link String}.
- * @see MessageFormat#format(String, Object[])
- */
- public static String getString(String key, Object... arguments) {
- if (arguments == null)
- return getString(key);
- return MessageFormat.format(getString(key), arguments);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/emfcomparediffmessages.properties b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/emfcomparediffmessages.properties
deleted file mode 100644
index 499278ea8..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/emfcomparediffmessages.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2012 Obeo.
-# 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:
-# Obeo - initial API and implementation
-################################################################################
-# General keys
-Descriptor.IllegalPriority = Priority cannot be null.
-Descriptor.MissingAttribute = Missing attribute "{0}"
-
-# org.eclipse.emf.compare.diff.generic
-GenericDiffEngine.IllegalSide = Illegal side value for object retrieval.
-
-# org.eclipse.emf.compare.diff.merge.api
-EMFCompareEObjectCopier.MergeFailure = Couldn''t copy value {0} of reference {1}
-
-# org.eclipse.emf.compare.diff.service
-DiffEngineRegistry.IllegalEngine = Cannot add value of type {0} in the Diff engines registry.
-
-## METAMODEL KEYS
-## These will be used for the purpose of toString() implementations
-DiffGroupImpl.ToString = {0} change(s) in {1} {2}
-ConflictingDiffElementImpl.ToString = Conflicting changes between {0} and {1}
-
-AddModelElementImpl.ToString = {0} has been added
-RemoteAddModelElementImpl.ToString = {0} has been remotely added
-RemoveModelElementImpl.ToString = {0} has been removed
-RemoteRemoveModelElementImpl.ToString = {0} has been remotely removed
-
-UpdateAttributeImpl.ToString = Attribute {0} in {1} has changed from {2} to {3}
-RemoteUpdateAttributeImpl.ToString = Attribute {0} in {1} has been remotely changed from {2} to {3}
-
-AddAttributeValueImpl.ToString = {0} has been added to attribute {1} in {2}
-RemoteAddAttributeValueImpl.ToString = {0} has been remotely added to attribute {1} in {2}
-RemoveAttributeValueImpl.ToString = {0} has been removed from attribute {1} in {2}
-RemoteRemoveAttributeValueImpl.ToString = {0} has been remotely removed from attribute {1} in {2}
-
-AttributeOrderChange.ToString = The order of the values of attribute {0} has been changed
-
-UpdateReferenceImpl.ToString = Reference {0} in {1} changed from {2} to {3}
-RemoteUpdateReferenceImpl.ToString = Reference {0} in {1} remotely changed from {2} to {3}
-
-ReferenceOrderChange.ToString = The order of the values of reference {0} has been changed
-
-AddReferenceValueImpl.ToString = {0} has been added to reference {1} in {2}
-RemoteAddReferenceValueImpl.ToString = {0} has been remotely added to reference {1} in {2}
-RemoveReferenceValueImpl.ToString = {0} has been removed from reference {1} in {2}
-RemoteRemoveReferenceValueImpl.ToString = {0} has been remotely removed from reference {1} in {2}
-
-MoveModelElementImpl.ToString = {0} has been moved from {1} to {2}
-RemoteMoveModelElementImpl.ToString = {0} has been remotely moved from {1} to {2}
-
-AddResourceDependency.ToString = Dependency towards resource {0} has been added.
-RemoteAddResourceDependency.ToString = Dependency towards resource {0} has been remotely added.
-RemoveResourceDependency.ToString = Dependency towards resource {0} has been removed.
-RemoteRemoveResourceDependency.ToString = Dependency towards resource {0} has been remotely removed.
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/GenericDiffEngine.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/GenericDiffEngine.java
deleted file mode 100644
index a2ee46297..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/GenericDiffEngine.java
+++ /dev/null
@@ -1,1025 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.engine.IMatchManager.MatchSide;
-import org.eclipse.emf.compare.diff.engine.check.AttributesCheck;
-import org.eclipse.emf.compare.diff.engine.check.ReferencesCheck;
-import org.eclipse.emf.compare.diff.internal.engine.CrossReferencerMatchManager;
-import org.eclipse.emf.compare.diff.internal.engine.MatchCrossReferencer;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.Match3Elements;
-import org.eclipse.emf.compare.match.metamodel.MatchElement;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.compare.match.metamodel.Side;
-import org.eclipse.emf.compare.match.metamodel.UnmatchElement;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EGenericType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * This class is useful when one wants to determine a diff from a matching model.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-// FIXME this engine must be refactored (e.g create checkers for 'checkxxDiff')
-public class GenericDiffEngine implements IDiffEngine2 {
- /**
- * Allows retrieval of the ancestor matched object.
- *
- * @deprecated this is now available as a formal enum at {@link IMatchManager.MatchSide}.
- */
- @Deprecated
- protected static final int ANCESTOR_OBJECT = 0;
-
- /**
- * Allows retrieval of the left matched object.
- *
- * @deprecated this is now available as a formal enum at {@link IMatchManager.MatchSide}.
- */
- @Deprecated
- protected static final int LEFT_OBJECT = 1;
-
- /**
- * Allows retrieval of the right matched object.
- *
- * @deprecated this is now available as a formal enum at {@link IMatchManager.MatchSide}.
- */
- @Deprecated
- protected static final int RIGHT_OBJECT = 2;
-
- /**
- * If we're currently doing a resourceSet differencing, this will have been initialized with the whole
- * MatchResourceSet.
- *
- * @deprecated this field should no longer be used, use {@link #getMatchManager()} instead.
- */
- @Deprecated
- protected EcoreUtil.CrossReferencer matchCrossReferencer;
-
- /** IMatchManager instance used to determine the match for an arbitrary EObject. */
- private IMatchManager matchManager;
-
- /** This will keep track of the diff groups created for this comparison. */
- private Map<EObject, DiffGroup> diffGroups = new HashMap<EObject, DiffGroup>();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IDiffEngine#doDiff(org.eclipse.emf.compare.match.metamodel.MatchModel)
- */
- public DiffModel doDiff(MatchModel match) {
- return doDiff(match, false);
- }
-
- /**
- * {@inheritDoc}.
- *
- * @see org.eclipse.emf.compare.diff.engine.IDiffEngine#doDiff(org.eclipse.emf.compare.match.metamodel.MatchModel,
- * boolean)
- */
- public DiffModel doDiff(MatchModel match, boolean threeWay) {
- matchCrossReferencer = new MatchCrossReferencer(match);
- return doDiff(match, threeWay, new CrossReferencerMatchManager(matchCrossReferencer));
- }
-
- /**
- * {@inheritDoc}.
- *
- * @see org.eclipse.emf.compare.diff.engine.IDiffEngine2#doDiff(org.eclipse.emf.compare.match.metamodel.MatchModel,
- * boolean, org.eclipse.emf.compare.diff.engine.IMatchManager)
- * @since 1.3
- */
- public DiffModel doDiff(MatchModel match, boolean threeWay, IMatchManager manager) {
- matchManager = manager;
- return doDiffResourceSet(match, threeWay, matchManager);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IDiffEngine#doDiffResourceSet(org.eclipse.emf.compare.match.metamodel.MatchModel,
- * boolean, org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer)
- */
- public DiffModel doDiffResourceSet(MatchModel match, boolean threeWay,
- EcoreUtil.CrossReferencer crossReferencer) {
- matchCrossReferencer = crossReferencer;
- return doDiffResourceSet(match, threeWay, new CrossReferencerMatchManager(matchCrossReferencer));
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IDiffEngine2#doDiffResourceSet(org.eclipse.emf.compare.match.metamodel.MatchModel,
- * boolean, org.eclipse.emf.compare.diff.engine.IMatchManager)
- * @since 1.3
- */
- public DiffModel doDiffResourceSet(MatchModel match, boolean threeWay, IMatchManager manager) {
- matchManager = manager;
- final DiffModel result = DiffFactory.eINSTANCE.createDiffModel();
- result.getLeftRoots().addAll(match.getLeftRoots());
- result.getRightRoots().addAll(match.getRightRoots());
- result.getAncestorRoots().addAll(match.getAncestorRoots());
- DiffGroup diffRoot = null;
-
- if (threeWay) {
- diffRoot = doDiffThreeWay(match);
- } else {
- diffRoot = doDiffTwoWay(match);
- }
- result.getOwnedElements().add(diffRoot);
-
- return result;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IDiffEngine#reset()
- */
- public void reset() {
- diffGroups.clear();
- matchCrossReferencer = null;
- matchManager = null;
- }
-
- /**
- * Looks for an already created {@link DiffGroup diff group} in order to add the operation, if none
- * exists, create one where the operation belongs to.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffModel}.
- * @param operation
- * Operation to add to the {@link DiffModel}.
- * @param targetParent
- * Parent {@link EObject} for the operation.
- */
- protected void addInContainerPackage(DiffGroup root, DiffElement operation, EObject targetParent) {
- if (targetParent == null) {
- root.getSubDiffElements().add(operation);
- return;
- }
- DiffGroup targetGroup = findExistingGroup(root, targetParent);
- if (targetGroup == null) {
- // Searches for a DiffGroup with the matched parent
- targetGroup = findExistingGroup(root, getMatchManager().getMatchedEObject(targetParent));
- if (targetGroup == null) {
- // we have to create the group
- targetGroup = buildHierarchyGroup(targetParent, root);
- }
- }
- targetGroup.getSubDiffElements().add(operation);
- }
-
- /**
- * Returns the implementation of a {@link org.eclipse.emf.compare.diff.engine.check.AbstractCheck}
- * responsible for the verification of updates on attribute values.
- *
- * @return The implementation of a {@link org.eclipse.emf.compare.diff.engine.check.AbstractCheck}
- * responsible for the verification of updates on attribute values.
- * @since 1.0
- */
- protected AttributesCheck getAttributesChecker() {
- return new AttributesCheck(getMatchManager());
- }
-
- /**
- * Returns the implementation of a {@link org.eclipse.emf.compare.diff.engine.check.AbstractCheck}
- * responsible for the verification of updates on reference values.
- *
- * @return The implementation of a {@link org.eclipse.emf.compare.diff.engine.check.AbstractCheck}
- * responsible for the verification of updates on reference values.
- * @since 1.0
- */
- protected ReferencesCheck getReferencesChecker() {
- return new ReferencesCheck(getMatchManager());
- }
-
- /**
- * This will iterate through all the attributes of the <code>mapping</code>'s two elements to check if any
- * of them has been modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if one of the attributes has
- * actually been changed.
- * @param mapping
- * This contains the mapping information about the elements we need to check.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- * @deprecated Override {@link AttributesCheck#checkAttributesUpdates(DiffGroup, Match2Elements)} and
- * return your overriden implementation through {@link #getAttributesChecker()}.
- */
- @Deprecated
- protected void checkAttributesUpdates(DiffGroup root, Match2Elements mapping) throws FactoryException {
- getAttributesChecker().checkAttributesUpdates(root, mapping);
- }
-
- /**
- * This will iterate through all the attributes of the <code>mapping</code>'s three elements to check if
- * any of them has been modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if one of the attribute has
- * actually been changed.
- * @param mapping
- * This contains the mapping information about the elements we need to check for a move.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- * @deprecated Override {@link AttributesCheck#checkAttributesUpdates(DiffGroup, Match3Elements)} and
- * return your overriden implementation through {@link #getAttributesChecker()}.
- */
- @Deprecated
- protected void checkAttributesUpdates(DiffGroup root, Match3Elements mapping) throws FactoryException {
- getAttributesChecker().checkAttributesUpdates(root, mapping);
- }
-
- /**
- * This will check whether the left and right element are contained in the same containment reference and
- * create a difference if need be.
- *
- * @param current
- * {@link DiffGroup} under which the new differences will be added.
- * @param matchElement
- * This contains the mapping information about the elements we need to check for a containment
- * reference update.
- */
- protected void checkContainmentUpdate(DiffGroup current, Match2Elements matchElement) {
- final EObject leftElement = matchElement.getLeftElement();
- final EObject rightElement = matchElement.getRightElement();
- if (leftElement.eContainmentFeature() != null && rightElement.eContainmentFeature() != null) {
- if (!leftElement.eContainmentFeature().getName()
- .equals(rightElement.eContainmentFeature().getName())
- && getMatchManager().getMatchedEObject(leftElement.eContainer()).equals(
- rightElement.eContainer())) {
- createUpdateContainmentOperation(current, leftElement, rightElement);
- }
- }
- }
-
- /**
- * This will check whether the left and right element are contained in the same containment reference and
- * create a difference if need be.
- *
- * @param root
- * {@link DiffGroup} under which the new differences will be added.
- * @param matchElement
- * This contains the mapping information about the elements we need to check for a containment
- * reference update.
- */
- protected void checkContainmentUpdate(DiffGroup root, Match3Elements matchElement) {
- final EObject leftElement = matchElement.getLeftElement();
- final EObject rightElement = matchElement.getRightElement();
- final EObject originElement = matchElement.getOriginElement();
- if (originElement == null || leftElement.eContainer() == null && rightElement.eContainer() == null
- && originElement.eContainer() == null)
- return;
-
- final boolean leftChangedContainment = originElement.eContainmentFeature() != null
- && leftElement.eContainmentFeature() != null
- && !leftElement.eContainmentFeature().getName()
- .equals(originElement.eContainmentFeature().getName())
- && getMatchManager().getMatchedEObject(leftElement.eContainer(), MatchSide.ANCESTOR).equals(
- originElement.eContainer());
- final boolean rightChangedContainment = originElement.eContainmentFeature() != null
- && rightElement.eContainmentFeature() != null
- && !rightElement.eContainmentFeature().getName()
- .equals(originElement.eContainmentFeature().getName())
- && getMatchManager().getMatchedEObject(rightElement.eContainer(), MatchSide.ANCESTOR).equals(
- originElement.eContainer());
-
- // effective change
- if (getMatchManager().getMatchedEObject(leftElement.eContainer()).equals(rightElement.eContainer())
- && !leftElement.eContainmentFeature().getName()
- .equals(rightElement.eContainmentFeature().getName())) {
- // conflicting change
- if (leftChangedContainment && rightChangedContainment) {
- final UpdateContainmentFeature updateContainment = DiffFactory.eINSTANCE
- .createUpdateContainmentFeature();
- updateContainment.setLeftElement(leftElement);
- updateContainment.setRightElement(rightElement);
- if (getMatchManager().getMatchedEObject(leftElement.eContainer()) == null) {
- System.out.println();
- }
- updateContainment.setRightTarget(getMatchManager()
- .getMatchedEObject(leftElement.eContainer()));
- updateContainment.setLeftTarget(getMatchManager()
- .getMatchedEObject(rightElement.eContainer()));
-
- final ConflictingDiffElement conflictingDiff = DiffFactory.eINSTANCE
- .createConflictingDiffElement();
- conflictingDiff.setLeftParent(leftElement);
- conflictingDiff.setRightParent(rightElement);
- conflictingDiff.setOriginElement(originElement);
- conflictingDiff.getSubDiffElements().add(updateContainment);
- root.getSubDiffElements().add(conflictingDiff);
- } else if (leftChangedContainment) {
- createUpdateContainmentOperation(root, leftElement, rightElement);
- } else if (rightChangedContainment) {
- createRemoteUpdateContainmentOperation(root, leftElement, rightElement);
- }
- }
- }
-
- /**
- * This will call all the different checks we need to call for when computing the diff. Clients can
- * override this to alter the checks or add others.
- *
- * @param current
- * current {@link DiffGroup} under which the new differences will be added.
- * @param match
- * This contains the mapping information about the elements we need to check for a move.
- * @throws FactoryException
- * Thrown if one of the checks fails somehow.
- */
- protected void checkForDiffs(DiffGroup current, Match2Elements match) throws FactoryException {
- getAttributesChecker().checkAttributesUpdates(current, match);
- getReferencesChecker().checkReferencesUpdates(current, match);
- checkMoves(current, match);
- checkContainmentUpdate(current, match);
- }
-
- /**
- * This will call all the different checks we need to call for when computing the diff. Clients can
- * override this to alter the checks or add others.
- *
- * @param current
- * current {@link DiffGroup} under which the new differences will be added.
- * @param match
- * This contains the mapping information about the elements we need to check for a move.
- * @throws FactoryException
- * Thrown if one of the checks fails somehow.
- */
- protected void checkForDiffs(DiffGroup current, Match3Elements match) throws FactoryException {
- getAttributesChecker().checkAttributesUpdates(current, match);
- getReferencesChecker().checkReferencesUpdates(current, match);
- checkMoves(current, match);
- checkContainmentUpdate(current, match);
- }
-
- /**
- * This will check if the elements matched by a given {@link Match2Elements} have been moved.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if the elements have actually
- * been moved.
- * @param matchElement
- * This contains the mapping information about the elements we need to check for a move.
- */
- protected void checkMoves(DiffGroup root, Match2Elements matchElement) {
- final EObject left = matchElement.getLeftElement();
- final EObject right = matchElement.getRightElement();
-
- if (left instanceof EGenericType || right instanceof EGenericType)
- return;
- if (left.eContainer() != null && right.eContainer() != null
- && getMatchManager().getMatchedEObject(left.eContainer()) != right.eContainer()) {
- createMoveOperation(root, left, right);
- }
- }
-
- /**
- * This will check if the elements matched by a given {@link Match3Element} have been moved since the
- * models common ancestor.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if the elements have actually
- * been moved.
- * @param matchElement
- * This contains the mapping information about the elements we need to check for a move.
- */
- protected void checkMoves(DiffGroup root, Match3Elements matchElement) {
- final EObject leftElement = matchElement.getLeftElement();
- final EObject rightElement = matchElement.getRightElement();
- final EObject originElement = matchElement.getOriginElement();
- if (leftElement.eContainer() == null && rightElement.eContainer() == null
- && originElement.eContainer() == null)
- return;
- if (leftElement instanceof EGenericType || rightElement instanceof EGenericType
- || originElement instanceof EGenericType)
- return;
-
- final boolean leftMoved = originElement != null
- && leftElement.eContainer() != null
- && !getMatchManager().getMatchedEObject(leftElement.eContainer(), MatchSide.ANCESTOR).equals(
- originElement.eContainer());
- final boolean rightMoved = originElement != null
- && rightElement.eContainer() != null
- && !getMatchManager().getMatchedEObject(rightElement.eContainer(), MatchSide.ANCESTOR)
- .equals(originElement.eContainer());
-
- // effective change
- if (!getMatchManager().getMatchedEObject(leftElement.eContainer()).equals(rightElement.eContainer())) {
- // conflicting change
- if (leftMoved && rightMoved) {
- final MoveModelElement operation = DiffFactory.eINSTANCE.createMoveModelElement();
- operation.setRightElement(rightElement);
- operation.setLeftElement(leftElement);
- if (getMatchManager().getMatchedEObject(leftElement.eContainer()) == null) {
- System.out.println();
- }
- operation.setRightTarget(getMatchManager().getMatchedEObject(leftElement.eContainer()));
- operation.setLeftTarget(getMatchManager().getMatchedEObject(rightElement.eContainer()));
-
- final ConflictingDiffElement conflictingDiff = DiffFactory.eINSTANCE
- .createConflictingDiffElement();
- conflictingDiff.setLeftParent(leftElement);
- conflictingDiff.setRightParent(rightElement);
- conflictingDiff.setOriginElement(originElement);
- conflictingDiff.getSubDiffElements().add(operation);
- root.getSubDiffElements().add(conflictingDiff);
- // non conflicting change
- } else if (rightMoved) {
- createRemoteMoveOperation(root, leftElement, rightElement);
- } else if (leftMoved) {
- createMoveOperation(root, leftElement, rightElement);
- }
- }
- }
-
- /**
- * This will be called to check for changes on a given reference values. Note that we know
- * <code>reference.isMany()</code> and <code>reference.isOrdered()</code> always return true here for the
- * generic diff engine and the tests won't be made.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param reference
- * {@link EReference} to check for modifications.
- * @param leftElement
- * Element corresponding to the final value for the given reference.
- * @param rightElement
- * Element corresponding to the initial value for the given reference.
- * @param addedReferences
- * Contains the created differences for added reference values.
- * @param removedReferences
- * Contains the created differences for removed reference values.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- * @deprecated Replaced by {@link ReferencesCheck}.
- */
- @Deprecated
- @SuppressWarnings("unused")
- protected void checkReferenceOrderChange(DiffGroup root, EReference reference, EObject leftElement,
- EObject rightElement, List<ReferenceChangeLeftTarget> addedReferences,
- List<ReferenceChangeRightTarget> removedReferences) throws FactoryException {
- // Deprecated, see ReferencesCheck#checkReferenceOrderChange
- }
-
- /**
- * Checks if there's been references updates in the model.<br/>
- * <p>
- * A reference is considered updated if its value(s) has been changed (either removal or addition of an
- * element if the reference is multi-valued or update of a single-valued reference) between the left and
- * the right model.
- * </p>
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param mapping
- * Contains informations about the left and right model elements we have to compare.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- * @deprecated Override {@link ReferencesCheck#checkReferencesUpdates(DiffGroup, Match2Elements)} and
- * return your overriden implementation through {@link #getReferencesChecker()}.
- */
- @Deprecated
- protected void checkReferencesUpdates(DiffGroup root, Match2Elements mapping) throws FactoryException {
- getReferencesChecker().checkReferencesUpdates(root, mapping);
- }
-
- /**
- * Checks if there's been references updates in the model.<br/>
- * <p>
- * A reference is considered updated if its value(s) has been changed (either removal or addition of an
- * element if the reference is multi-valued or update of a single-valued reference) between the left and
- * the ancestor model, the right and the ancestor or between the left and the right model.
- * </p>
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param mapping
- * Contains informations about the left, right and origin model elements we have to compare.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- * @deprecated Override {@link ReferencesCheck#checkReferencesUpdates(DiffGroup, Match3Elements)} and
- * return your overriden implementation through {@link #getReferencesChecker()}.
- */
- @Deprecated
- protected void checkReferencesUpdates(DiffGroup root, Match3Elements mapping) throws FactoryException {
- getReferencesChecker().checkReferencesUpdates(root, mapping);
- }
-
- /**
- * The diff computing for three way comparisons is handled here. We'll compute the diff model from the
- * given match model.
- *
- * @param match
- * {@link MatchModel match model} we'll be using to compute the differences.
- * @return {@link DiffGroup root} of the {@link DiffModel} computed from the given {@link MatchModel}.
- */
- protected DiffGroup doDiffThreeWay(MatchModel match) {
- final DiffGroup diffRoot = DiffFactory.eINSTANCE.createDiffGroup();
-
- // It is a possibility that no elements were matched
- if (match.getMatchedElements().size() > 0) {
- // we have to browse the model and create the corresponding operations
- final Match3Elements matchRoot = (Match3Elements)match.getMatchedElements().get(0);
- doDiffDelegate(diffRoot, matchRoot);
- }
-
- final List<UnmatchElement> filteredUnmatched = new ArrayList<UnmatchElement>(match
- .getUnmatchedElements().size());
- final Iterator<UnmatchElement> unmatched = match.getUnmatchedElements().iterator();
- while (unmatched.hasNext()) {
- final UnmatchElement unmatchElement = unmatched.next();
- // We'll consider both conflicting elements and root of an unmatched hierarchy
- if (unmatchElement.isConflicting()) {
- filteredUnmatched.add(unmatchElement);
- continue;
- }
-
- boolean isChild = false;
- for (final UnmatchElement elem : match.getUnmatchedElements()) {
- if (elem != unmatchElement
- && EcoreUtil.isAncestor(elem.getElement(), unmatchElement.getElement())) {
- isChild = true;
- break;
- }
- }
- if (!isChild) {
- filteredUnmatched.add(unmatchElement);
- }
- }
- if (filteredUnmatched.size() > 0) {
- processUnmatchedElements(diffRoot, filteredUnmatched);
- }
- return diffRoot;
- }
-
- /**
- * The diff computing for two way comparisons is handled here. We'll compute the diff model from the given
- * match model.
- *
- * @param match
- * {@link MatchModel match model} we'll be using to compute the differences.
- * @return {@link DiffGroup root} of the {@link DiffModel} computed from the given {@link MatchModel}.
- */
- protected DiffGroup doDiffTwoWay(MatchModel match) {
- final DiffGroup diffRoot = DiffFactory.eINSTANCE.createDiffGroup();
-
- // It is a possibility that no elements were matched
- if (match.getMatchedElements().size() > 0) {
- // we have to browse the model and create the corresponding operations
- final Match2Elements matchRoot = (Match2Elements)match.getMatchedElements().get(0);
- // browsing the match model
- doDiffDelegate(diffRoot, matchRoot);
- }
- // iterate over the unmatched elements end determine if they have been
- // added or removed.
- processUnmatchedElements(diffRoot, match.getUnmatchedElements());
- return diffRoot;
- }
-
- /**
- * Return the left or right matched EObject from the one given. More specifically, this will return the
- * left matched element if the given {@link EObject} is the right one, or the right matched element if the
- * given {@link EObject} is either the left or the origin one.
- *
- * @param from
- * The original {@link EObject}.
- * @return The matched {@link EObject}.
- * @deprecated this functionality has been encapsulated in the new {@link IMatchManager} interface.
- */
- @Deprecated
- protected final EObject getMatchedEObject(EObject from) {
- return getMatchManager().getMatchedEObject(from);
- }
-
- /**
- * Return the specified matched {@link EObject} from the one given.
- *
- * @param from
- * The original {@link EObject}.
- * @param side
- * side of the object we seek. Must be one of
- * <ul>
- * <li>{@link #ANCESTOR_OBJECT}</li>
- * <li>{@link #LEFT_OBJECT}</li>
- * <li>{@link #RIGHT_OBJECT}</li>
- * </ul>
- * .
- * @return The matched EObject.
- * @throws IllegalArgumentException
- * Thrown if <code>side</code> is invalid.
- * @deprecated this functionality has been encapsulated in the new {@link IMatchManager} interface.
- */
- @Deprecated
- protected final EObject getMatchedEObject(EObject from, int side) throws IllegalArgumentException {
- IMatchManager.MatchSide matchSide;
- if (side == LEFT_OBJECT) {
- matchSide = MatchSide.LEFT;
- } else if (side == RIGHT_OBJECT) {
- matchSide = MatchSide.RIGHT;
- } else if (side == ANCESTOR_OBJECT) {
- matchSide = MatchSide.ANCESTOR;
- } else {
- throw new IllegalArgumentException(
- EMFCompareDiffMessages.getString("GenericDiffEngine.IllegalSide")); //$NON-NLS-1$
- }
- return getMatchManager().getMatchedEObject(from, matchSide);
- }
-
- /**
- * Returns the match manager used by this engine.
- *
- * @return The match manager used by this engine.
- * @since 1.3
- */
- protected IMatchManager getMatchManager() {
- return matchManager;
- }
-
- /**
- * This will process the {@link #unmatchedElements unmatched elements} list and create the appropriate
- * {@link DiffElement}s.
- *
- * @param diffRoot
- * {@link DiffGroup} under which to create the {@link DiffElement}s.
- * @param unmatched
- * The MatchModel's {@link UnmatchElement}s.
- */
- protected void processUnmatchedElements(DiffGroup diffRoot, List<UnmatchElement> unmatched) {
- final List<UnmatchElement> filteredUnmatched = new ArrayList<UnmatchElement>(unmatched.size());
- for (final UnmatchElement element : unmatched) {
- if (!(element.getElement() instanceof EGenericType)) {
- filteredUnmatched.add(element);
- }
- }
- for (final UnmatchElement unmatchElement : filteredUnmatched) {
- final EObject element = unmatchElement.getElement();
- final EObject leftParent = getMatchManager().getMatchedEObject(element.eContainer());
-
- final ConflictingDiffElement container;
- if (unmatchElement.isConflicting()) {
- container = DiffFactory.eINSTANCE.createConflictingDiffElement();
- container.setLeftParent(leftParent);
- container.setRightParent(element.eContainer());
- container.setOriginElement(getMatchManager().getMatchedEObject(element, MatchSide.ANCESTOR));
- } else {
- container = null;
- }
-
- if (unmatchElement.getSide() == Side.RIGHT) {
- // add RemoveModelElement
- final ModelElementChangeRightTarget operation = DiffFactory.eINSTANCE
- .createModelElementChangeRightTarget();
- operation.setRightElement(element);
- operation.setRemote(unmatchElement.isRemote());
- operation.setLeftParent(leftParent);
- if (container != null) {
- container.getSubDiffElements().add(operation);
- addInContainerPackage(diffRoot, container, leftParent);
- } else {
- addInContainerPackage(diffRoot, operation, leftParent);
- }
- } else {
- // add AddModelElement
- final ModelElementChangeLeftTarget operation = DiffFactory.eINSTANCE
- .createModelElementChangeLeftTarget();
- operation.setLeftElement(element);
- operation.setRemote(unmatchElement.isRemote());
- operation.setRightParent(leftParent);
- if (container != null) {
- container.getSubDiffElements().add(operation);
- addInContainerPackage(diffRoot, container, leftParent);
- } else {
- addInContainerPackage(diffRoot, operation, leftParent);
- }
- }
- }
- }
-
- /**
- * Determines if we should ignore an attribute for diff detection.
- * <p>
- * Default is to ignore attributes marked either
- * <ul>
- * <li>Transient</li>
- * <li>Derived</li>
- * </ul>
- * </p>
- * <p>
- * Clients should override this if they wish to ignore other attributes.
- * </p>
- *
- * @param attribute
- * Attribute to determine whether it should be ignored.
- * @return <code>True</code> if attribute has to be ignored, <code>False</code> otherwise.
- * @deprecated Replaced by {@link AttributesCheck}.
- */
- @Deprecated
- protected boolean shouldBeIgnored(EAttribute attribute) {
- boolean ignore = attribute.isTransient();
- ignore = ignore || attribute.isDerived();
- return ignore;
- }
-
- /**
- * Determines if we should ignore a reference for diff detection.
- * <p>
- * Default is to ignore references marked either
- * <ul>
- * <li>Containment</li>
- * <li>Container</li>
- * <li>Transient</li>
- * <li>Derived</li>
- * </ul>
- * </p>
- * <p>
- * Clients should override this if they wish to ignore other references.
- * </p>
- *
- * @param reference
- * Reference to determine whether it should be ignored.
- * @return <code>True</code> if reference has to be ignored, <code>False</code> otherwise.
- * @deprecated Replaced by {@link ReferencesCheck}.
- */
- @Deprecated
- protected boolean shouldBeIgnored(EReference reference) {
- boolean ignore = reference.isContainment();
- ignore = ignore || reference.isDerived();
- ignore = ignore || reference.isTransient();
- ignore = ignore || reference.isContainer();
- ignore = ignore || reference.eContainer() == EcorePackage.eINSTANCE.getEGenericType();
- return ignore;
- }
-
- /**
- * Builds a {@link DiffGroup} for the <code>targetParent</code> with its full hierarchy.
- *
- * @param targetParent
- * Parent of the operation we're building a {@link DiffGroup} for.
- * @param root
- * {@link DiffGroup Root} of the {@link DiffModel}.
- * @return {@link DiffGroup} containing the full hierarchy needed for the <code>targetParent</code>.
- */
- private DiffGroup buildHierarchyGroup(EObject targetParent, DiffGroup root) {
- // if targetElement has a parent, we call buildgroup on it, else we add
- // the current group to the root
- DiffGroup curGroup = findExistingGroup(root, targetParent);
- if (curGroup == null) {
- curGroup = DiffFactory.eINSTANCE.createDiffGroup();
- curGroup.setRightParent(targetParent);
- diffGroups.put(targetParent, curGroup);
- }
- if (targetParent.eContainer() == null) {
- root.getSubDiffElements().add(curGroup);
- return curGroup;
- }
- // if targetElement is the root of a fragment resource, do not walk the hierarchy up,
- // instead report changes to fragments in their own resource's context
- if (targetParent.eResource() == targetParent.eContainer().eResource()) {
- buildHierarchyGroup(targetParent.eContainer(), root).getSubDiffElements().add(curGroup);
- } else {
- root.getSubDiffElements().add(curGroup);
- }
- return curGroup;
- }
-
- /**
- * This will create the {@link MoveModelElement} under the given {@link DiffGroup root}.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param left
- * Element that has been moved in the left model.
- * @param right
- * Corresponding element that has been moved in the right model.
- */
- private void createMoveOperation(DiffGroup root, EObject left, EObject right) {
- final MoveModelElement operation = DiffFactory.eINSTANCE.createMoveModelElement();
- operation.setRightElement(right);
- operation.setLeftElement(left);
- if (getMatchManager().getMatchedEObject(left.eContainer()) == null) {
- System.out.println();
- }
- operation.setRightTarget(getMatchManager().getMatchedEObject(left.eContainer()));
- operation.setLeftTarget(getMatchManager().getMatchedEObject(right.eContainer()));
- root.getSubDiffElements().add(operation);
- }
-
- /**
- * This will create the {@link RemoteMoveModelElement} under the given {@link DiffGroup root}.<br/>
- * A {@link RemoteMoveModelElement} represents the fact that an element has been remotely moved since the
- * ancestor model, but the right model has kept the element in its former place.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param left
- * Element that has been moved in the left model.
- * @param right
- * Element of the right model corresponding to the left one.
- */
- private void createRemoteMoveOperation(DiffGroup root, EObject left, EObject right) {
- final MoveModelElement operation = DiffFactory.eINSTANCE.createMoveModelElement();
- operation.setRemote(true);
- operation.setRightElement(right);
- operation.setLeftElement(left);
- if (getMatchManager().getMatchedEObject(left.eContainer()) == null) {
- System.out.println();
- }
- operation.setRightTarget(getMatchManager().getMatchedEObject(left.eContainer()));
- operation.setLeftTarget(getMatchManager().getMatchedEObject(right.eContainer()));
- root.getSubDiffElements().add(operation);
- }
-
- /**
- * This will create a {@link UpdateContainmentFeature} under the given {@link DiffGroup root}.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param left
- * Element of the left model corresponding to the right one.
- * @param right
- * Element that has been moved since the last (ancestor for three-way comparison, left for
- * two-way comparison) version.
- */
- private void createRemoteUpdateContainmentOperation(DiffGroup root, EObject left, EObject right) {
- final UpdateContainmentFeature updateContainment = DiffFactory.eINSTANCE
- .createUpdateContainmentFeature();
- updateContainment.setRemote(true);
- updateContainment.setLeftElement(left);
- updateContainment.setRightElement(right);
- if (getMatchManager().getMatchedEObject(left.eContainer()) == null) {
- System.out.println();
- }
- updateContainment.setRightTarget(getMatchManager().getMatchedEObject(left.eContainer()));
- updateContainment.setLeftTarget(getMatchManager().getMatchedEObject(right.eContainer()));
- root.getSubDiffElements().add(updateContainment);
- }
-
- /**
- * This will create a {@link UpdateContainmentFeature} under the given {@link DiffGroup root}.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param left
- * Element of the left model corresponding to the right one.
- * @param right
- * Element that has been moved since the last (ancestor for three-way comparison, right for
- * two-way comparison) version.
- */
- private void createUpdateContainmentOperation(DiffGroup root, EObject left, EObject right) {
- final UpdateContainmentFeature updateContainment = DiffFactory.eINSTANCE
- .createUpdateContainmentFeature();
- updateContainment.setLeftElement(left);
- updateContainment.setRightElement(right);
- if (getMatchManager().getMatchedEObject(left.eContainer()) == null) {
- System.out.println();
- }
- updateContainment.setRightTarget(getMatchManager().getMatchedEObject(left.eContainer()));
- updateContainment.setLeftTarget(getMatchManager().getMatchedEObject(right.eContainer()));
- root.getSubDiffElements().add(updateContainment);
- }
-
- /**
- * This is the core of the diff computing for two way comparison. This will call for checks on attributes,
- * references and model elements to check for updates/changes.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffModel} to create.
- * @param match
- * {@link Match2Elements root} of the {@link MatchModel} to analyze.
- */
- private void doDiffDelegate(DiffGroup root, Match2Elements match) {
- final DiffGroup current = DiffFactory.eINSTANCE.createDiffGroup();
- current.setRightParent(match.getRightElement());
- try {
- checkForDiffs(current, match);
- } catch (final FactoryException e) {
- log(e);
- }
- // we need to build this list to avoid concurrent modifications
- final List<DiffElement> shouldAddToList = new ArrayList<DiffElement>();
- // we really have changes
- if (current.getSubDiffElements().size() > 0) {
- final Iterator<DiffElement> it2 = current.getSubDiffElements().iterator();
- while (it2.hasNext()) {
- final DiffElement diff = it2.next();
- if (!(diff instanceof DiffGroup)) {
- shouldAddToList.add(diff);
- }
- }
- for (final DiffElement diff : shouldAddToList) {
- addInContainerPackage(root, diff, current.getRightParent());
- }
- }
- // taking care of our children
- final Iterator<MatchElement> it = match.getSubMatchElements().iterator();
- while (it.hasNext()) {
- final Match2Elements element = (Match2Elements)it.next();
- doDiffDelegate(root, element);
- }
- }
-
- /**
- * Log an error. Clients may override this to perform custom logging.
- *
- * @since 1.1
- * @param e
- * any Exception.
- */
- protected void log(final Exception e) {
- EMFComparePlugin.log(e, false);
- }
-
- /**
- * This is the core of the diff computing for three way comparison. This will call for checks on
- * attributes, references and model elements to check for updates/changes.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffModel} to create.
- * @param match
- * {@link Match3Elements root} of the {@link MatchModel} to analyze.
- */
- private void doDiffDelegate(DiffGroup root, Match3Elements match) {
- final DiffGroup current = DiffFactory.eINSTANCE.createDiffGroup();
- current.setRightParent(match.getRightElement());
- try {
- checkForDiffs(current, match);
- } catch (final FactoryException e) {
- log(e);
- }
- // we need to build this list to avoid concurrent modifications
- final List<DiffElement> shouldAddToList = new ArrayList<DiffElement>();
- // we really have changes
- if (current.getSubDiffElements().size() > 0) {
- final Iterator<DiffElement> it2 = current.getSubDiffElements().iterator();
- while (it2.hasNext()) {
- final DiffElement diff = it2.next();
- if (!(diff instanceof DiffGroup)) {
- shouldAddToList.add(diff);
- }
- }
- for (final DiffElement diff : shouldAddToList) {
- addInContainerPackage(root, diff, current.getRightParent());
- }
- }
- // taking care of our children
- final Iterator<MatchElement> it = match.getSubMatchElements().iterator();
- while (it.hasNext()) {
- final MatchElement element = it.next();
- if (element instanceof Match3Elements) {
- doDiffDelegate(root, (Match3Elements)element);
- } else {
- doDiffDelegate(root, (Match2Elements)element);
- }
- }
- }
-
- /**
- * Searches for an existing {@link DiffGroup} under <code>root</code> to add the operation which parent is
- * <code>targetParent</code>.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffModel}.
- * @param targetParent
- * Parent of the operation we're seeking a {@link DiffGroup} for.
- * @return {@link DiffGroup} for the <code>targetParent</code>.
- */
- private DiffGroup findExistingGroup(DiffGroup root, EObject targetParent) {
- return diffGroups.get(targetParent);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine.java
deleted file mode 100644
index 6b8c48b84..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer;
-
-/**
- * A Diff engine has the responsability to provide a diff (or delta) model from a matching model.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-public interface IDiffEngine {
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * The matching model.
- * @return The corresponding diff model.
- */
- DiffModel doDiff(MatchModel match);
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @return the corresponding diff model
- */
- DiffModel doDiff(MatchModel match, boolean threeWay);
-
- // FIXME 2.0 : the CrossReferencer is unnecessary as a parameter; we could have initialized it later on.
- /**
- * Return a diffmodel created using the given match model. <code>crossReferencer</code> has been
- * initialized on the whole MatchResourceSet.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @param crossReferencer
- * This cross referencer has been initialized with the whole MatchResourceSet and can be used
- * to retrieve matched EObjects towards other resources.
- * @return the corresponding diff model
- */
- DiffModel doDiffResourceSet(MatchModel match, boolean threeWay, CrossReferencer crossReferencer);
-
- /**
- * This will be called with each access from the service to the singleton instance of this engine. Clients
- * should dispose of all caches and recorded information within this method's implementation.
- */
- void reset();
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine2.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine2.java
deleted file mode 100644
index e85f52fbc..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IDiffEngine2.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Open Canarias 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:
- * Victor Roldan Betancort - [352002] initial API and implementation
- * Obeo
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-
-/**
- * Interface added to avoid breaking clients due to the introduction of the <code>IMatchManager</code>
- * concept.
- *
- * @author Victor Roldan Betancort
- * @see org.eclipse.emf.compare.diff.engine.IMatchManager
- * @since 1.3
- */
-public interface IDiffEngine2 extends IDiffEngine {
- /**
- * Return a diffmodel created using the given match model. <code>IMatchManager</code> instance is provides
- * the necessary matching info to the underlying IMatchEngine
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @param manager
- * the IMatchManager instance offers information on which EObjects have been matched or not
- * @return the corresponding diff model
- */
- DiffModel doDiff(MatchModel match, boolean threeWay, IMatchManager manager);
-
- /**
- * Return a diffmodel created using the given match model. <code>IMatchManager</code> instance provides
- * the necessary matching info to the underlying IMatchEngine
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @param manager
- * the IMatchManager instance offers information on which EObjects have been matched or not
- * @return the corresponding diff model
- */
- DiffModel doDiffResourceSet(MatchModel match, boolean threeWay, IMatchManager manager);
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager.java
deleted file mode 100644
index a93aff161..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Open Canarias 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:
- * Victor Roldan Betancort - [352002] initial API and implementation
- * Obeo
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * An utility interface to encapsulate general purpose operations over the match MatchModel.
- *
- * @author Victor Roldan Betancort
- * @since 1.3
- */
-public interface IMatchManager {
- /**
- * Return the left or right matched EObject from the one given. More specifically, this will return the
- * left matched element if the given {@link EObject} is the right one, or the right matched element if the
- * given {@link EObject} is either the left or the origin one.
- *
- * @param from
- * The original {@link EObject}.
- * @return The matched {@link EObject}.
- */
- EObject getMatchedEObject(EObject from);
-
- /**
- * Return the specified matched {@link EObject} from the one given.
- *
- * @param from
- * The original {@link EObject}.
- * @param side
- * side of the object we seek.
- * @return The matched EObject.
- */
- EObject getMatchedEObject(EObject from, MatchSide side);
-
- /**
- * This will check whether the given EObject was part of this comparison's scope.
- *
- * @param eObj
- * EObject to check.
- * @return <code>true</code> if that EObject is in the scope, <code>false</code> otherwise.
- */
- boolean isInScope(EObject eObj);
-
- /**
- * Returns <code>true</code> if the given element corresponds to an UnmatchedElement, <code>false</code>
- * otherwise.
- *
- * @param element
- * The element for which we need to know whether it is unmatched.
- * @return <code>true</code> if the given element corresponds to an UnmatchedElement, <code>false</code>
- * otherwise.
- */
- boolean isUnmatched(EObject element);
-
- /**
- * Indicates the actual side of a matched <code>EObject</code>, where it is always placed either at the
- * LEFT side or at the RIGHT side. Additionally, the ANCESTOR value is included for three-way delta
- *
- * @author vroldan
- */
- public enum MatchSide {
- /**
- * Indicates the left side of a matched element.
- */
- LEFT,
-
- /**
- * Indicates the right side of a matched element.
- */
- RIGHT,
-
- /**
- * Indicates the ancestor side of a three-way matched element.
- */
- ANCESTOR
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager2.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager2.java
deleted file mode 100644
index 9aca241f3..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/IMatchManager2.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Sometimes, relying on the MatchedElement is not enough. This will allow us to check whether a given EObject
- * is a remote or local Unmatched.
- *
- * @author Laurent Goubet <a href="mailto:laurent.goubet@obeo.fr">laurent.goubet@obeo.fr</a>
- * @since 1.3
- */
-public interface IMatchManager2 {
- /**
- * Returns <code>true</code> if the given element corresponds to a remote UnmatchedElement,
- * <code>false</code> otherwise.
- *
- * @param element
- * The element for which we need to know whether it is a remote unmatched.
- * @return <code>true</code> if the given element corresponds to a remote UnmatchedElement,
- * <code>false</code> otherwise.
- */
- boolean isRemoteUnmatched(EObject element);
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AbstractCheck.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AbstractCheck.java
deleted file mode 100644
index d72cd840a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AbstractCheck.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine.check;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.engine.IMatchManager;
-import org.eclipse.emf.compare.diff.engine.IMatchManager.MatchSide;
-import org.eclipse.emf.compare.diff.internal.DiffCollectionsHelper;
-import org.eclipse.emf.compare.diff.internal.engine.CrossReferencerMatchManager;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * This provides a base implementation for the different checks that clients can need to call in specific
- * differencing engines implementations.
- *
- * @author Laurent Goubet <a href="mailto:laurent.goubet@obeo.fr">laurent.goubet@obeo.fr</a>
- * @since 1.0
- */
-public abstract class AbstractCheck {
- /**
- * Allows retrieval of the ancestor matched object.
- *
- * @deprecated this is now available as a formal enum at {@link IMatchManager.MatchSide}.
- */
- @Deprecated
- protected static final int ANCESTOR_OBJECT = 0;
-
- /**
- * Allows retrieval of the left matched object.
- *
- * @deprecated this is now available as a formal enum at {@link IMatchManager.MatchSide}.
- */
- @Deprecated
- protected static final int LEFT_OBJECT = 1;
-
- /**
- * Allows retrieval of the right matched object.
- *
- * @deprecated this is now available as a formal enum at {@link IMatchManager.MatchSide}.
- */
- @Deprecated
- protected static final int RIGHT_OBJECT = 2;
-
- /**
- * If we're currently doing a resourceSet differencing, this will have been initialized with the whole
- * MatchResourceSet.
- *
- * @deprecated this field should no longer be used, use {@link #getMatchManager()} instead.
- */
- @Deprecated
- protected final EcoreUtil.CrossReferencer crossReferencer;
-
- /**
- * utility class to easily matches lists.
- *
- * @since 1.2
- */
- protected DiffCollectionsHelper matcherHelper;
-
- /**
- * IMatchManager instance used to determine the match for an arbitrary EObject.
- *
- * @see IMatchManager
- */
- private IMatchManager matchManager;
-
- /**
- * Instantiates the checker given the current crossreferencing members of the diff engine.
- *
- * @param referencer
- * This cross referencer has been initialized with the whole MatchResourceSet and can be used
- * to retrieve matched EObjects towards other resources.
- * @deprecated The CrossReferencer mechanism is now hidden behind the IMatchManager interface, use the
- * {@link #AbstractCheck(IMatchManager)} constructor instead.
- */
- @Deprecated
- public AbstractCheck(EcoreUtil.CrossReferencer referencer) {
- crossReferencer = referencer;
- matchManager = new CrossReferencerMatchManager(referencer);
- matcherHelper = new DiffCollectionsHelper(matchManager);
- }
-
- /**
- * Instantiates the checker given a certain IMatchManager instance.
- *
- * @param manager
- * the IMatchManager instance which should be used to determine matches between
- * <code>EObject</code>s.
- * @see IMatchManager
- * @since 1.3
- */
- public AbstractCheck(IMatchManager manager) {
- crossReferencer = null;
- matchManager = manager;
- matcherHelper = new DiffCollectionsHelper(manager);
- }
-
- /**
- * Returns the match manager used by this checker.
- *
- * @return The match manager used by this checker.
- * @since 1.3
- */
- protected IMatchManager getMatchManager() {
- return matchManager;
- }
-
- /**
- * This will return a list containing only EObjects. This is mainly aimed at FeatureMap.Entry values.
- *
- * @param input
- * List that is to be converted.
- * @return A list containing only EObjects.
- * @since 1.0
- */
- protected final List<Object> convertFeatureMapList(List<?> input) {
- final List<Object> result = new ArrayList<Object>();
- for (final Object inputValue : input) {
- result.add(internalFindActualEObject(inputValue));
- }
- return result;
- }
-
- /**
- * Return the left or right matched EObject from the one given. More specifically, this will return the
- * left matched element if the given {@link EObject} is the right one, or the right matched element if the
- * given {@link EObject} is either the left or the origin one.
- *
- * @param from
- * The original {@link EObject}.
- * @return The matched {@link EObject}.
- * @deprecated this functionality has been encapsulated in the new {@link IMatchManager} interface.
- */
- @Deprecated
- protected final EObject getMatchedEObject(EObject from) {
- return getMatchManager().getMatchedEObject(from);
- }
-
- /**
- * Return the specified matched {@link EObject} from the one given.
- *
- * @param from
- * The original {@link EObject}.
- * @param side
- * side of the object we seek. Must be one of
- * <ul>
- * <li>{@link #ANCESTOR_OBJECT}</li>
- * <li>{@link #LEFT_OBJECT}</li>
- * <li>{@link #RIGHT_OBJECT}</li>
- * </ul>
- * .
- * @return The matched EObject.
- * @throws IllegalArgumentException
- * Thrown if <code>side</code> is invalid.
- * @deprecated this functionality has been encapsulated in the new {@link IMatchManager} interface.
- */
- @Deprecated
- protected final EObject getMatchedEObject(EObject from, int side) throws IllegalArgumentException {
- IMatchManager.MatchSide matchSide;
- if (side == LEFT_OBJECT) {
- matchSide = MatchSide.LEFT;
- } else if (side == RIGHT_OBJECT) {
- matchSide = MatchSide.RIGHT;
- } else if (side == ANCESTOR_OBJECT) {
- matchSide = MatchSide.ANCESTOR;
- } else {
- throw new IllegalArgumentException(
- EMFCompareDiffMessages.getString("GenericDiffEngine.IllegalSide")); //$NON-NLS-1$
- }
- return getMatchManager().getMatchedEObject(from, matchSide);
- }
-
- /**
- * Returns <code>true</code> if the given element corresponds to an UnmatchedElement, <code>false</code>
- * otherwise.
- *
- * @param element
- * The element for which we need to know whether it is unmatched.
- * @return <code>true</code> if the given element corresponds to an UnmatchedElement, <code>false</code>
- * otherwise.
- * @deprecated this functionality has been encapsulated in the new {@link IMatchManager} interface.
- */
- @Deprecated
- protected final boolean isUnmatched(EObject element) {
- return getMatchManager().isUnmatched(element);
- }
-
- /**
- * This will return the first value of <tt>data</tt> that is not an instance of {@link Entry}.
- *
- * @param data
- * The object we need a valued of.
- * @return The first value of <tt>data</tt> that is not an instance of FeatureMapEntry.
- */
- private Object internalFindActualEObject(Object data) {
- if (data instanceof FeatureMap.Entry)
- return internalFindActualEObject(((FeatureMap.Entry)data).getValue());
- return data;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AttributesCheck.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AttributesCheck.java
deleted file mode 100644
index 97f38b8be..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/AttributesCheck.java
+++ /dev/null
@@ -1,890 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo 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:
- * Obeo - initial API and implementation
- * Martin Taal - [299641] Compare arrays by their content instead of instance equality - Note : moved to DiffCollectionsHelper
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine.check;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.engine.IMatchManager;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.Match3Elements;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * This will implement the attribute checks : order of attribute values, changes between two versions, ...
- *
- * @author Laurent Goubet <a href="mailto:laurent.goubet@obeo.fr">laurent.goubet@obeo.fr</a>
- * @since 1.0
- */
-public class AttributesCheck extends AbstractCheck {
- /**
- * Simply delegates to the super constructor.
- *
- * @param referencer
- * CrossReferencer instantiated with the match model or match resource set.
- * @see {@link AbstractCheck#DefaultCheck(org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer)}
- * @deprecated The CrossReferencer mechanism is now hidden behind the {@link IMatchManager} interface.
- */
- @Deprecated
- public AttributesCheck(EcoreUtil.CrossReferencer referencer) {
- super(referencer);
- }
-
- /**
- * Simply delegates to the super constructor.
- *
- * @see IMatchManager
- * @param manager
- * the IMatchManager instance to determine matches for certain <code>EObject</code>
- * @since 1.3
- */
- public AttributesCheck(IMatchManager manager) {
- super(manager);
- }
-
- /**
- * This will iterate through all the attributes of the <code>mapping</code>'s two elements to check if any
- * of them has been modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if one of the attributes has
- * actually been changed.
- * @param mapping
- * This contains the mapping information about the elements we need to check.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- */
- public void checkAttributesUpdates(DiffGroup root, Match2Elements mapping) throws FactoryException {
- final EClass eClass = mapping.getLeftElement().eClass();
-
- final List<EAttribute> eclassAttributes = eClass.getEAllAttributes();
- // for each feature, compare the value
- final Iterator<EAttribute> it = eclassAttributes.iterator();
- while (it.hasNext()) {
- final EAttribute next = it.next();
- if (!shouldBeIgnored(next)) {
- checkAttributeUpdates(root, mapping, next);
- }
- }
- }
-
- /**
- * This will iterate through all the attributes of the <code>mapping</code>'s three elements to check if
- * any of them has been modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if one of the attribute has
- * actually been changed.
- * @param mapping
- * This contains the mapping information about the elements we need to check for a move.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- */
- public void checkAttributesUpdates(DiffGroup root, Match3Elements mapping) throws FactoryException {
- // Ignores matchElements when they don't have origin (no updates on
- // these)
- if (mapping.getOriginElement() == null)
- return;
- final EClass eClass = mapping.getOriginElement().eClass();
-
- final List<EAttribute> eclassAttributes = eClass.getEAllAttributes();
- // for each feature, compare the value
- final Iterator<EAttribute> it = eclassAttributes.iterator();
- while (it.hasNext()) {
- final EAttribute next = it.next();
- if (!shouldBeIgnored(next)) {
- checkAttributeUpdates(root, mapping, next);
- }
- }
- }
-
- /**
- * This will be used internaly to check that an attribute's values have changed from one version to the
- * other.
- * <p>
- * Specifically, this will check for :
- * <ul>
- * <li>Enumeration literals : if they have the same literal and integer values.</li>
- * <li>Feature Map Entries : if their respective values have been matched.</li>
- * <li>Arrays : compare the content of the two arrays.</li>
- * <li>Other : if the left value is equal to the right value or both are <code>null</code>.</li>
- * </ul>
- * </p>
- *
- * @param left
- * The value of the attribute from the left compare resource.
- * @param right
- * The value of the attribute from the right compare resource.
- * @return <code>true</code> if the <code>left</code> value is distinct from the <code>right</code> value.
- */
- protected boolean areDistinctValues(Object left, Object right) {
- return matcherHelper.areDistinctValues(left, right);
- }
-
- /**
- * This will check that the values of the given attribute from the objects contained by mapping has been
- * modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if one of the attributes has
- * actually been changed.
- * @param mapping
- * This contains the mapping information about the elements we need to check.
- * @param attribute
- * The attribute we need to check for differences.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- * @since 1.0
- */
- protected void checkAttributeUpdates(DiffGroup root, Match2Elements mapping, EAttribute attribute)
- throws FactoryException {
- final String attributeName = attribute.getName();
-
- boolean distinct = false;
- if (attribute.isMany()) {
- final List<Object> leftValue = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getLeftElement(), attributeName));
- final List<Object> rightValue = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getRightElement(), attributeName));
-
- if (leftValue.size() != rightValue.size()) {
- distinct = true;
- } else {
- for (int i = 0; !distinct && i < leftValue.size(); i++) {
- distinct = areDistinctValues(leftValue.get(i), rightValue.get(i));
- }
- }
- } else {
- final Object leftValue = EFactory.eGet(mapping.getLeftElement(), attributeName);
- final Object rightValue = EFactory.eGet(mapping.getRightElement(), attributeName);
-
- distinct = areDistinctValues(leftValue, rightValue);
- }
-
- if (distinct) {
- createNonConflictingAttributeChange(root, attribute, mapping.getLeftElement(),
- mapping.getRightElement());
- }
- }
-
- /**
- * This will check that the values of the given attribute from the objects contained by mapping has been
- * modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if one of the attributes has
- * actually been changed.
- * @param mapping
- * This contains the mapping information about the elements we need to check.
- * @param attribute
- * The attribute we need to check for differences.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- * @since 1.0
- */
- protected void checkAttributeUpdates(DiffGroup root, Match3Elements mapping, EAttribute attribute)
- throws FactoryException {
- final String attributeName = attribute.getName();
-
- boolean rightDistinctFromOrigin = false;
- boolean rightDistinctFromLeft = false;
- boolean leftDistinctFromOrigin = false;
- if (attribute.isMany()) {
- final List<Object> leftValue = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getLeftElement(), attributeName));
- final List<Object> rightValue = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getRightElement(), attributeName));
- final List<Object> ancestorValue = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getOriginElement(), attributeName));
-
- if (rightValue.size() != ancestorValue.size()) {
- rightDistinctFromOrigin = true;
- } else {
- for (int i = 0; !rightDistinctFromOrigin && i < rightValue.size(); i++) {
- rightDistinctFromOrigin = areDistinctValues(rightValue.get(i), ancestorValue.get(i));
- }
- }
- if (leftValue.size() != ancestorValue.size()) {
- leftDistinctFromOrigin = true;
- } else {
- for (int i = 0; !leftDistinctFromOrigin && i < leftValue.size(); i++) {
- leftDistinctFromOrigin = areDistinctValues(leftValue.get(i), ancestorValue.get(i));
- }
- }
- if (leftValue.size() != rightValue.size()) {
- rightDistinctFromLeft = true;
- } else {
- for (int i = 0; !rightDistinctFromLeft && i < leftValue.size(); i++) {
- rightDistinctFromLeft = areDistinctValues(leftValue.get(i), rightValue.get(i));
- }
- }
- } else {
- final Object leftValue = EFactory.eGet(mapping.getLeftElement(), attributeName);
- final Object rightValue = EFactory.eGet(mapping.getRightElement(), attributeName);
- final Object ancestorValue = EFactory.eGet(mapping.getOriginElement(), attributeName);
-
- rightDistinctFromOrigin = areDistinctValues(rightValue, ancestorValue);
- rightDistinctFromLeft = areDistinctValues(rightValue, leftValue);
- leftDistinctFromOrigin = areDistinctValues(leftValue, ancestorValue);
- }
-
- // non conflicting change
- if (leftDistinctFromOrigin && !rightDistinctFromOrigin) {
- createNonConflictingAttributeChange(root, attribute, mapping.getLeftElement(),
- mapping.getRightElement());
- // only latest from head has changed
- } else if (rightDistinctFromOrigin && !leftDistinctFromOrigin) {
- createRemoteAttributeChange(root, attribute, mapping);
- // conflicting
- } else if (rightDistinctFromOrigin && leftDistinctFromOrigin && rightDistinctFromLeft) {
- checkConflictingAttributesUpdate(root, attribute, mapping);
- }
- }
-
- /**
- * Determines if we should ignore an attribute for diff detection.
- * <p>
- * Default is to ignore attributes marked either
- * <ul>
- * <li>Transient</li>
- * <li>Derived</li>
- * </ul>
- * </p>
- * <p>
- * Clients should override this if they wish to ignore other attributes.
- * </p>
- *
- * @param attribute
- * Attribute to determine whether it should be ignored.
- * @return <code>True</code> if attribute has to be ignored, <code>False</code> otherwise.
- */
- protected boolean shouldBeIgnored(EAttribute attribute) {
- boolean ignore = attribute.isTransient();
- ignore = ignore || attribute.isDerived();
- return ignore;
- }
-
- /**
- * Checks if there are conflictual changes between the values of the given {@link EAttribute}.<br/>
- * <p>
- * An attribute update is considered &quot;conflictual&quot; if it isn't multi-valued and its left value
- * differs from the right value.
- * </p>
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create if there actually are
- * conflictual changes in the mapped elements <code>attribute</code> values.
- * @param attribute
- * Target {@link EAttribute} to check.
- * @param mapping
- * Contains the three (ancestor, left, right) elements' mapping.
- * @throws FactoryException
- * Thrown if we cannot fetch <code>attribute</code>'s values for either one of the mapped
- * elements.
- */
- private void checkConflictingAttributesUpdate(DiffGroup root, EAttribute attribute, Match3Elements mapping)
- throws FactoryException {
- if (!attribute.isMany()) {
- createConflictingAttributeChange(root, attribute, mapping);
- } else {
- final List<Object> remoteDeletedValues = new ArrayList<Object>();
- final List<Object> remoteAddedValues = new ArrayList<Object>();
- final List<Object> deletedValues = new ArrayList<Object>();
- final List<Object> addedValues = new ArrayList<Object>();
-
- populateThreeWayAttributeChanges(mapping, attribute, addedValues, deletedValues,
- remoteAddedValues, remoteDeletedValues);
- createRemoteAttributeDiffs(root, attribute, mapping.getLeftElement(), mapping.getRightElement(),
- remoteAddedValues, remoteDeletedValues);
- createLocalAttributeDiffs(root, attribute, mapping.getLeftElement(), mapping.getRightElement(),
- addedValues, deletedValues);
- }
- }
-
- /**
- * Creates "local" Attribute diffs according to the given information.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param attribute
- * Attribute which value has been changed.
- * @param leftElement
- * Left element of the attribute change.
- * @param rightElement
- * Right element of the attribute change.
- * @param addedValues
- * Values that have been added to the left element.
- * @param deletedValues
- * Values that have been deleted from the left element.
- * @throws FactoryException
- * Thrown if we cannot compute the ordering diffs for this attribute.
- */
- private void createLocalAttributeDiffs(DiffGroup root, EAttribute attribute, EObject leftElement,
- EObject rightElement, List<Object> addedValues, List<Object> deletedValues)
- throws FactoryException {
- final List<AttributeChangeLeftTarget> addedValuesDiffs = new ArrayList<AttributeChangeLeftTarget>(
- addedValues.size());
- final List<AttributeChangeRightTarget> deletedValuesDiffs = new ArrayList<AttributeChangeRightTarget>(
- deletedValues.size());
-
- // ADD Attribute values
- for (final Object aValue : addedValues) {
- final AttributeChangeLeftTarget operation = DiffFactory.eINSTANCE
- .createAttributeChangeLeftTarget();
- operation.setAttribute(attribute);
- operation.setRightElement(rightElement);
- operation.setLeftElement(leftElement);
- operation.setLeftTarget(aValue);
- root.getSubDiffElements().add(operation);
-
- addedValuesDiffs.add(operation);
- }
-
- // REMOVE Attribute values
- for (final Object aValue : deletedValues) {
- final AttributeChangeRightTarget operation = DiffFactory.eINSTANCE
- .createAttributeChangeRightTarget();
- operation.setAttribute(attribute);
- operation.setRightElement(rightElement);
- operation.setLeftElement(leftElement);
- operation.setRightTarget(aValue);
- root.getSubDiffElements().add(operation);
-
- deletedValuesDiffs.add(operation);
- }
-
- // ORDER CHANGE
- if (attribute.isOrdered()) {
- checkAttributeOrderChange(root, attribute, leftElement, rightElement, addedValuesDiffs,
- deletedValuesDiffs);
- }
- }
-
- /**
- * Creates "remote" Attribute diffs according to the given information.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param attribute
- * Attribute which value has been changed.
- * @param leftElement
- * Left element of the attribute change.
- * @param rightElement
- * Right element of the attribute change.
- * @param remoteDeletedValues
- * Values that have been deleted from the remote (right) element.
- * @param remoteAddedValues
- * Values that have been added to the remote (right) element.
- * @throws FactoryException
- * Thrown if we cannot compute the ordering diffs for this attribute.
- */
- private void createRemoteAttributeDiffs(DiffGroup root, EAttribute attribute, EObject leftElement,
- EObject rightElement, List<Object> remoteDeletedValues, List<Object> remoteAddedValues)
- throws FactoryException {
- final List<AttributeChangeLeftTarget> remoteDeletedValuesDiffs = new ArrayList<AttributeChangeLeftTarget>(
- remoteDeletedValues.size());
- final List<AttributeChangeRightTarget> remoteAddedValuesDiffs = new ArrayList<AttributeChangeRightTarget>(
- remoteAddedValues.size());
-
- // REMOTE REMOVE Attribute values
- for (final Object aValue : remoteDeletedValues) {
- final AttributeChangeLeftTarget operation = DiffFactory.eINSTANCE
- .createAttributeChangeLeftTarget();
- operation.setAttribute(attribute);
- operation.setRightElement(rightElement);
- operation.setLeftElement(leftElement);
- operation.setLeftTarget(aValue);
- operation.setRemote(true);
- root.getSubDiffElements().add(operation);
-
- remoteDeletedValuesDiffs.add(operation);
- }
-
- // REMOTE ADD Attribute values
- for (final Object aValue : remoteAddedValues) {
- final AttributeChangeRightTarget operation = DiffFactory.eINSTANCE
- .createAttributeChangeRightTarget();
- operation.setAttribute(attribute);
- operation.setRightElement(rightElement);
- operation.setLeftElement(leftElement);
- operation.setRightTarget(aValue);
- operation.setRemote(true);
- root.getSubDiffElements().add(operation);
-
- remoteAddedValuesDiffs.add(operation);
- }
-
- // REMOTE ORDER CHANGE
- if (attribute.isOrdered()) {
- checkAttributeRemoteOrderChange(root, attribute, leftElement, rightElement,
- remoteDeletedValuesDiffs, remoteAddedValuesDiffs);
- }
- }
-
- /**
- * Checks a given {@link EAttribute attribute} for changes related to a given <code>mapping</code> and
- * populates the given {@link List}s with the attribute values belonging to them.
- * <p>
- * <ul>
- * <li>&quot;Added&quot; values are the values that have been added in the left element since the origin
- * and that haven't been added in the right element.</li>
- * <li>&quot;Deleted&quot; values are the values that have been removed from the left element since the
- * origin but are still present in the right element.</li>
- * <li>&quot;Remotely added&quot; values are the values that have been added in the right element since
- * the origin but haven't been added in the left element.</li>
- * <li>&quot;Remotely deleted&quot; values are the values that have been removed from the right element
- * since the origin but are still present in the left element.</li>
- * </ul>
- * </p>
- *
- * @param mapping
- * Contains informations about the left, right and origin elements.
- * @param attribute
- * {@link EAttribute} we're checking for changes.
- * @param addedValues
- * {@link List} that will be populated with the values that have been added in the left element
- * since the origin.
- * @param deletedValues
- * {@link List} that will be populated with the values that have been removed from the left
- * element since the origin.
- * @param remoteAddedValues
- * {@link List} that will be populated with the values that have been added in the right
- * element since the origin.
- * @param remoteDeletedValues
- * {@link List} that will be populated with the values that have been removed from the right
- * element since the origin.
- * @throws FactoryException
- * Thrown if we cannot fetch the attribute's values in either the left, right or origin
- * element.
- */
- private void populateThreeWayAttributeChanges(Match3Elements mapping, EAttribute attribute,
- List<Object> addedValues, List<Object> deletedValues, List<Object> remoteAddedValues,
- List<Object> remoteDeletedValues) throws FactoryException {
- final String attributeName = attribute.getName();
-
- final List<Object> leftValues = convertFeatureMapList(EFactory.eGetAsList(mapping.getLeftElement(),
- attributeName));
- final List<Object> rightValues = convertFeatureMapList(EFactory.eGetAsList(mapping.getRightElement(),
- attributeName));
- final List<Object> ancestorValues = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getOriginElement(), attributeName));
-
- // populates remotely added and locally deleted lists
- final List<Object> leftCopy = new ArrayList<Object>(leftValues);
- List<Object> ancestorCopy = new ArrayList<Object>(ancestorValues);
- for (Object right : rightValues) {
- Object leftMatched = null;
- final Iterator<Object> leftIterator = leftCopy.iterator();
- while (leftMatched == null && leftIterator.hasNext()) {
- final Object next = leftIterator.next();
- if (!areDistinctValues(right, next)) {
- leftMatched = next;
- }
- }
-
- Object ancestorMatched = null;
- final Iterator<Object> ancestorIterator = ancestorCopy.iterator();
- while (ancestorMatched == null && ancestorIterator.hasNext()) {
- final Object next = ancestorIterator.next();
- if (!areDistinctValues(right, next)) {
- ancestorMatched = next;
- }
- }
-
- if (leftMatched == null && ancestorMatched == null) {
- remoteAddedValues.add(right);
- } else if (leftMatched == null) {
- deletedValues.add(right);
- }
- if (leftMatched != null) {
- leftCopy.remove(leftMatched);
- }
- if (ancestorMatched != null) {
- ancestorCopy.remove(ancestorMatched);
- }
- }
-
- // populates remotely deleted and locally added lists
- final List<Object> rightCopy = new ArrayList<Object>(rightValues);
- ancestorCopy = new ArrayList<Object>(ancestorValues);
- for (Object left : leftValues) {
- Object rightMatched = null;
- final Iterator<Object> rightIterator = rightCopy.iterator();
- while (rightMatched == null && rightIterator.hasNext()) {
- final Object next = rightIterator.next();
- if (!areDistinctValues(left, next)) {
- rightMatched = next;
- }
- }
-
- Object ancestorMatched = null;
- final Iterator<Object> ancestorIterator = ancestorCopy.iterator();
- while (ancestorMatched == null && ancestorIterator.hasNext()) {
- final Object next = ancestorIterator.next();
- if (!areDistinctValues(left, next)) {
- ancestorMatched = next;
- }
- }
-
- if (rightMatched == null && ancestorMatched == null) {
- addedValues.add(left);
- } else if (rightMatched == null) {
- remoteDeletedValues.add(left);
- }
- if (rightMatched != null) {
- rightCopy.remove(rightMatched);
- }
- if (ancestorMatched != null) {
- ancestorCopy.remove(ancestorMatched);
- }
- }
- }
-
- /**
- * This will create the {@link ConflictingDiffGroup} and its children for a conflictual AttributeChange.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param attribute
- * Attribute which has been changed to conflictual values.
- * @param mapping
- * Contains informations about the left, right and origin element.
- * @throws FactoryException
- * Thrown if we cannot create the {@link ConflictingDiffGroup}'s children.
- */
- private void createConflictingAttributeChange(DiffGroup root, EAttribute attribute, Match3Elements mapping)
- throws FactoryException {
- // We'll use this diffGroup to make use of #createNonConflictingAttributeChange(DiffGroup, EAttribute,
- // EObject, EObject)
- final DiffGroup dummyGroup = DiffFactory.eINSTANCE.createDiffGroup();
- createNonConflictingAttributeChange(dummyGroup, attribute, mapping.getLeftElement(),
- mapping.getRightElement());
-
- if (dummyGroup.getSubDiffElements().size() > 0) {
- final ConflictingDiffElement conflictingDiff = DiffFactory.eINSTANCE
- .createConflictingDiffElement();
- conflictingDiff.setLeftParent(mapping.getLeftElement());
- conflictingDiff.setRightParent(mapping.getRightElement());
- conflictingDiff.setOriginElement(mapping.getOriginElement());
- for (final DiffElement subDiff : new ArrayList<DiffElement>(dummyGroup.getSubDiffElements())) {
- conflictingDiff.getSubDiffElements().add(subDiff);
- }
- root.getSubDiffElements().add(conflictingDiff);
- }
- }
-
- /**
- * Creates and add the {@link DiffGroup} corresponding to an AttributeChange operation to the given
- * {@link DiffGroup root}.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param attribute
- * Attribute which value has been changed.
- * @param leftElement
- * Left element of the attribute change.
- * @param rightElement
- * Right element of the attribute change.
- * @throws FactoryException
- * Thrown if we cannot fetch the attribute's value for either one of the elements.
- */
- private void createNonConflictingAttributeChange(DiffGroup root, EAttribute attribute,
- EObject leftElement, EObject rightElement) throws FactoryException {
- if (attribute.isMany()) {
- final List<Object> rightValues = convertFeatureMapList(EFactory.eGetAsList(rightElement,
- attribute.getName()));
- final List<Object> leftValues = convertFeatureMapList(EFactory.eGetAsList(leftElement,
- attribute.getName()));
-
- final List<Object> addedValues = computeAddedValues(leftValues, rightValues);
- final List<Object> deletedValues = computeDeletedValues(leftValues, rightValues);
-
- createLocalAttributeDiffs(root, attribute, leftElement, rightElement, addedValues, deletedValues);
- } else {
- final UpdateAttribute operation = DiffFactory.eINSTANCE.createUpdateAttribute();
- operation.setRightElement(rightElement);
- operation.setLeftElement(leftElement);
- operation.setAttribute(attribute);
- root.getSubDiffElements().add(operation);
- }
- }
-
- /**
- * This will be called to check for changes on a given attribute's values. Note that we know that
- * <code>attribute.isMany()</code> and <code>attribute.isOrdered()</code> always return <code>true</code>
- * here.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param attribute
- * {@link EAttribute} to check for modifications.
- * @param leftElement
- * Element corresponding to the final holder of the given attribute.
- * @param rightElement
- * Element corresponding to the initial holder of the given attribute.
- * @param addedValues
- * Contains the created differences for added attribute values.
- * @param deletedValues
- * Contains the created differences for removed attribute values.
- * @throws FactoryException
- * Thrown if we cannot fetch the attribute's values.
- * @since 1.3
- */
- protected void checkAttributeOrderChange(DiffGroup root, EAttribute attribute, EObject leftElement,
- EObject rightElement, List<AttributeChangeLeftTarget> addedValues,
- List<AttributeChangeRightTarget> deletedValues) throws FactoryException {
- final List<Object> rightValues = convertFeatureMapList(EFactory.eGetAsList(rightElement,
- attribute.getName()));
- final List<Object> leftValues = convertFeatureMapList(EFactory.eGetAsList(leftElement,
- attribute.getName()));
- final List<Integer> removedIndices = new ArrayList<Integer>(deletedValues.size());
-
- // Purge "left" list of all attribute values that have been added to it
- for (AttributeChangeLeftTarget added : addedValues) {
- leftValues.remove(added.getLeftTarget());
- }
-
- // Compute the list of indices that have been removed from the list
- for (AttributeChangeRightTarget removed : deletedValues) {
- final int removedIndex = rightValues.indexOf(removed.getRightTarget());
- removedIndices.add(Integer.valueOf(removedIndex));
- }
-
- // Iterate over the list to detect values that actually changed order.
- int expectedIndex = 0;
- for (int i = 0; i < leftValues.size(); i++) {
- for (Integer removedIndex : new ArrayList<Integer>(removedIndices)) {
- if (i == removedIndex.intValue()) {
- expectedIndex++;
- removedIndices.remove(removedIndex);
- }
- }
-
- if (areDistinctValues(leftValues.get(i), rightValues.get(expectedIndex++))) {
- final AttributeOrderChange attributeChange = DiffFactory.eINSTANCE
- .createAttributeOrderChange();
- attributeChange.setAttribute(attribute);
- attributeChange.setLeftElement(leftElement);
- attributeChange.setRightElement(rightElement);
-
- root.getSubDiffElements().add(attributeChange);
- break;
- }
- }
- }
-
- /**
- * This will be called to check for changes on a given attribute's values. Note that we know that
- * <code>attribute.isMany()</code> and <code>attribute.isOrdered()</code> always return <code>true</code>
- * here.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param attribute
- * {@link EAttribute} to check for modifications.
- * @param leftElement
- * Element corresponding to the final holder of the given attribute.
- * @param rightElement
- * Element corresponding to the initial holder of the given attribute.
- * @param remoteDeletedValues
- * Contains the created differences for remotely removed attribute values.
- * @param remoteAddedValues
- * Contains the created differences for remotely added attribute values.
- * @throws FactoryException
- * Thrown if we cannot fetch the attribute's values.
- * @since 1.3
- */
- protected void checkAttributeRemoteOrderChange(DiffGroup root, EAttribute attribute, EObject leftElement,
- EObject rightElement, List<AttributeChangeLeftTarget> remoteDeletedValues,
- List<AttributeChangeRightTarget> remoteAddedValues) throws FactoryException {
- final List<Object> rightValues = convertFeatureMapList(EFactory.eGetAsList(rightElement,
- attribute.getName()));
- final List<Object> leftValues = convertFeatureMapList(EFactory.eGetAsList(leftElement,
- attribute.getName()));
- final List<Integer> removedIndices = new ArrayList<Integer>(remoteAddedValues.size());
-
- // Purge "left" list of all attribute values that have been added to it
- for (AttributeChangeLeftTarget remoteDeleted : remoteDeletedValues) {
- leftValues.remove(remoteDeleted.getLeftTarget());
- }
-
- // Compute the list of indices that have been removed from the list
- for (AttributeChangeRightTarget remoteAdded : remoteAddedValues) {
- final int removedIndex = rightValues.indexOf(remoteAdded.getRightTarget());
- removedIndices.add(Integer.valueOf(removedIndex));
- }
-
- // Iterate over the list to detect values that actually changed order.
- int expectedIndex = 0;
- for (int i = 0; i < leftValues.size(); i++) {
- for (Integer removedIndex : new ArrayList<Integer>(removedIndices)) {
- if (i == removedIndex.intValue()) {
- expectedIndex++;
- removedIndices.remove(removedIndex);
- }
- }
-
- if (areDistinctValues(leftValues.get(i), rightValues.get(expectedIndex))) {
- final AttributeOrderChange attributeChange = DiffFactory.eINSTANCE
- .createAttributeOrderChange();
- attributeChange.setAttribute(attribute);
- attributeChange.setLeftElement(leftElement);
- attributeChange.setRightElement(rightElement);
- attributeChange.setRemote(true);
-
- root.getSubDiffElements().add(attributeChange);
- break;
- }
- }
- }
-
- /**
- * This will create and populate a {@link List} with all the values from the <code>leftValues</code> list
- * that are not present the the <code>rightValues</code> list.
- *
- * @param leftValues
- * List of the left element attribute values.
- * @param rightValues
- * List of the right element attribute values.
- * @return The list of all values that are contained by <code>leftValues</code> but not by
- * <code>rightValues</code>.
- */
- private List<Object> computeAddedValues(List<Object> leftValues, List<Object> rightValues) {
- final List<Object> result = new ArrayList<Object>(leftValues);
- final List<Object> rightCopy = new ArrayList<Object>(rightValues);
-
- for (Object left : leftValues) {
- Object matched = null;
- final Iterator<Object> rightIterator = rightCopy.iterator();
- while (matched == null && rightIterator.hasNext()) {
- final Object next = rightIterator.next();
- if (!areDistinctValues(left, next)) {
- matched = next;
- }
- }
-
- if (matched != null) {
- rightCopy.remove(matched);
- result.remove(left);
- }
- }
-
- return result;
- }
-
- /**
- * This will create and populate a {@link List} with all the values from the <code>rightValues</code> list
- * that are not present the the <code>leftValues</code> list.
- *
- * @param leftValues
- * List of the left element attribute values.
- * @param rightValues
- * List of the right element attribute values.
- * @return The list of all values that are contained by <code>rightValues</code> but not by
- * <code>leftValues</code>.
- */
- private List<Object> computeDeletedValues(List<Object> leftValues, List<Object> rightValues) {
- final List<Object> result = new ArrayList<Object>(rightValues);
- final List<Object> leftCopy = new ArrayList<Object>(leftValues);
-
- for (Object right : rightValues) {
- Object matched = null;
- final Iterator<Object> leftIterator = leftCopy.iterator();
- while (matched == null && leftIterator.hasNext()) {
- final Object next = leftIterator.next();
- if (!areDistinctValues(right, next)) {
- matched = next;
- }
- }
-
- if (matched != null) {
- leftCopy.remove(matched);
- result.remove(right);
- }
- }
-
- return result;
- }
-
- /**
- * This will create the needed remote attribute change {@link DiffElement} under the given
- * {@link DiffGroup root}.<br/>
- * An attribute is &quot;remotely changed&quot; if it has been added, updated or deleted in the right
- * (latest from head) version but it has kept its former value in the left (working copy) version.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param attribute
- * Target {@link EAttribute} of the update.
- * @param mapping
- * Contains the three (ancestor, left, right) elements' mapping.
- * @throws FactoryException
- * Thrown if we cannot fetch <code>attribute</code>'s left and right values.
- */
- private void createRemoteAttributeChange(DiffGroup root, EAttribute attribute, Match3Elements mapping)
- throws FactoryException {
- if (attribute.isMany()) {
- final List<Object> remoteDeletedValues = new ArrayList<Object>();
- final List<Object> remoteAddedValues = new ArrayList<Object>();
-
- // We know that there is no "local" diff, thus addedValues and deletedValues are not used.
- populateThreeWayAttributeChanges(mapping, attribute, new ArrayList<Object>(),
- new ArrayList<Object>(), remoteAddedValues, remoteDeletedValues);
- createRemoteAttributeDiffs(root, attribute, mapping.getLeftElement(), mapping.getRightElement(),
- remoteDeletedValues, remoteAddedValues);
- } else {
- final UpdateAttribute operation = DiffFactory.eINSTANCE.createUpdateAttribute();
- operation.setRemote(true);
- operation.setRightElement(mapping.getRightElement());
- operation.setLeftElement(mapping.getLeftElement());
- operation.setAttribute(attribute);
- root.getSubDiffElements().add(operation);
- }
- }
-
- /**
- * This can be used to check that the given list contains the given value. This will use the checks
- * described in {@link #areDistinctValues(Object, Object)}.
- *
- * @param values
- * The list we need to check for a value equivalent to <code>value</code>.
- * @param value
- * The value we need to know if it's contained by <code>values</code>.
- * @return <code>true</code> if {@link #areDistinctValues(Object, Object)} returned true for one of the
- * objects contained by <code>values</code> when compared with <code>value</code>.
- * @deprecated no longer in use.
- */
- @Deprecated
- protected final boolean attributeListContains(List<Object> values, Object value) {
- for (Object aValue : values) {
- if (!areDistinctValues(aValue, value)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/ReferencesCheck.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/ReferencesCheck.java
deleted file mode 100644
index 69a89c059..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/check/ReferencesCheck.java
+++ /dev/null
@@ -1,1240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.engine.check;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.engine.IMatchManager;
-import org.eclipse.emf.compare.diff.engine.IMatchManager.MatchSide;
-import org.eclipse.emf.compare.diff.engine.IMatchManager2;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.match.internal.statistic.ResourceSimilarity;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.Match3Elements;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * This will implement the reference checks : order of reference values, changes between two versions, ...
- *
- * @author Laurent Goubet <a href="mailto:laurent.goubet@obeo.fr">laurent.goubet@obeo.fr</a>
- * @since 1.0
- */
-public class ReferencesCheck extends AbstractCheck {
- /** We'll use this as a prefix for all of EMF Compare's internal proxies. */
- private static final String PROXY_PREFIX = "emfCompareProxy:/"; //$NON-NLS-1$
-
- /**
- * Simply delegates to the super constructor.
- *
- * @param referencer
- * CrossReferencer instantiated with the match model or match resource set.
- * @see {@link AbstractCheck#DefaultCheck(org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer)}
- * @deprecated CrossReferencer mechanism is now hidden behind the {@link IMatchManager} interface.
- */
- @Deprecated
- public ReferencesCheck(EcoreUtil.CrossReferencer referencer) {
- super(referencer);
- }
-
- /**
- * Simply delegates to the super constructor.
- *
- * @see IMatchManager
- * @param manager
- * the IMatchManager instance to determine matches for certain <code>EObject</code>
- * @since 1.3
- */
- public ReferencesCheck(IMatchManager manager) {
- super(manager);
- }
-
- /**
- * Checks if there's been references updates in the model.<br/>
- * <p>
- * A reference is considered updated if its value(s) has been changed (either removal or addition of an
- * element if the reference is multi-valued or update of a single-valued reference) between the left and
- * the right model.
- * </p>
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param mapping
- * Contains informations about the left and right model elements we have to compare.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- */
- public void checkReferencesUpdates(DiffGroup root, Match2Elements mapping) throws FactoryException {
- final EClass eClass = mapping.getLeftElement().eClass();
- final List<EReference> eclassReferences = eClass.getEAllReferences();
-
- final Iterator<EReference> it = eclassReferences.iterator();
- while (it.hasNext()) {
- final EReference next = it.next();
- if (!shouldBeIgnored(next)) {
- checkReferenceUpdates(root, mapping, next);
- } else if (next.isContainment() && next.isOrdered()) {
- checkContainmentReferenceOrderChange(root, mapping, next);
- }
- }
- }
-
- /**
- * Checks if there's been references updates in the model.<br/>
- * <p>
- * A reference is considered updated if its value(s) has been changed (either removal or addition of an
- * element if the reference is multi-valued or update of a single-valued reference) between the left and
- * the ancestor model, the right and the ancestor or between the left and the right model.
- * </p>
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param mapping
- * Contains informations about the left, right and origin model elements we have to compare.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- */
- public void checkReferencesUpdates(DiffGroup root, Match3Elements mapping) throws FactoryException {
- // Ignores matchElements when they don't have origin (no updates on these)
- if (mapping.getOriginElement() == null)
- return;
- final EClass eClass = mapping.getOriginElement().eClass();
- final List<EReference> eclassReferences = eClass.getEAllReferences();
-
- final Iterator<EReference> it = eclassReferences.iterator();
- while (it.hasNext()) {
- final EReference next = it.next();
- if (!shouldBeIgnored(next)) {
- checkReferenceUpdates(root, mapping, next);
- } else if (next.isContainment() && next.isOrdered()) {
- checkContainmentReferenceOrderChange(root, mapping, next);
- }
- }
- }
-
- /**
- * This will be called to check for ordering changes on a given containment reference values.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param mapping
- * Contains informations about the left and right model elements we have to compare.
- * @param reference
- * {@link EReference} to check for modifications.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- */
- @SuppressWarnings("unchecked")
- protected void checkContainmentReferenceOrderChange(DiffGroup root, Match2Elements mapping,
- EReference reference) throws FactoryException {
- /*
- * We'll need to compute the added and removed reference values from the cross referencing of
- * unmatched elements as they haven't been processed yet.
- */
- final List<EObject> leftElementReferences = new ArrayList<EObject>(
- (List<EObject>)EFactory.eGetAsList(mapping.getLeftElement(), reference.getName()));
- final List<EObject> rightElementReferences = new ArrayList<EObject>(
- (List<EObject>)EFactory.eGetAsList(mapping.getRightElement(), reference.getName()));
- final List<Integer> removedIndices = new ArrayList<Integer>();
- // Purge "left" list of all reference values that have been added to it
- for (EObject leftValue : new ArrayList<EObject>(leftElementReferences)) {
- if (!getMatchManager().isInScope(leftValue)
- || getMatchManager().isUnmatched(leftValue)
- || getMatchManager().getMatchedEObject(leftValue.eContainer()) != getMatchManager()
- .getMatchedEObject(leftValue).eContainer())
- leftElementReferences.remove(leftValue);
- }
- for (EObject rightValue : new ArrayList<EObject>(rightElementReferences)) {
- if (!getMatchManager().isInScope(rightValue)
- || getMatchManager().isUnmatched(rightValue)
- || getMatchManager().getMatchedEObject(rightValue.eContainer()) != getMatchManager()
- .getMatchedEObject(rightValue).eContainer()) {
- removedIndices.add(Integer.valueOf(rightElementReferences.indexOf(rightValue)));
- }
- }
- int expectedIndex = 0;
- for (int i = 0; i < leftElementReferences.size(); i++) {
- final EObject matched = getMatchManager().getMatchedEObject(leftElementReferences.get(i));
- for (final Integer removedIndex : new ArrayList<Integer>(removedIndices)) {
- if (expectedIndex == removedIndex.intValue()) {
- expectedIndex += 1;
- removedIndices.remove(removedIndex);
- }
- }
- if (rightElementReferences.indexOf(matched) != expectedIndex++) {
- final ReferenceOrderChange refChange = DiffFactory.eINSTANCE.createReferenceOrderChange();
- refChange.setReference(reference);
- refChange.setLeftElement(mapping.getLeftElement());
- refChange.setRightElement(mapping.getRightElement());
-
- // The loop will be broken here. Initialize left and right "target" lists for the diff
- final List<EObject> leftTarget = new ArrayList<EObject>();
- for (int j = 0; j < rightElementReferences.size(); j++) {
- final EObject right = rightElementReferences.get(j);
- EObject target = getMatchManager().getMatchedEObject(right);
- if (target == null) {
- target = createProxyFor(right);
- }
- leftTarget.add(target);
- }
- final List<EObject> rightTarget = new ArrayList<EObject>();
- for (int j = 0; j < leftElementReferences.size(); j++) {
- final EObject left = leftElementReferences.get(j);
- EObject target = getMatchManager().getMatchedEObject(left);
- if (target == null) {
- target = createProxyFor(left);
- }
- rightTarget.add(target);
- }
-
- refChange.getLeftTarget().addAll(leftTarget);
- refChange.getRightTarget().addAll(rightTarget);
-
- root.getSubDiffElements().add(refChange);
- break;
- }
- }
- }
-
- /**
- * This will create a proxy for the given EObject. If <code>original</code> is itself a proxy, it will
- * simply be returned as-is.
- *
- * @param original
- * The object we need a proxy for.
- * @return A new proxy for the given original object.
- */
- private EObject createProxyFor(EObject original) {
- if (original.eIsProxy()) {
- return original;
- }
-
- final org.eclipse.emf.ecore.EFactory factory = original.eClass().getEPackage().getEFactoryInstance();
- final EObject proxy = factory.create(original.eClass());
- ((InternalEObject)proxy).eSetProxyURI(URI.createURI(PROXY_PREFIX
- + EcoreUtil.getURI(original).toString()));
- return proxy;
- }
-
- /**
- * This will be called to check for changes on a given reference values. Note that we know
- * <code>reference.isMany()</code> and <code>reference.isOrdered()</code> always return true here for the
- * generic diff engine and the tests won't be made.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param reference
- * {@link EReference} to check for modifications.
- * @param leftElement
- * Element corresponding to the final holder of the given reference.
- * @param rightElement
- * Element corresponding to the initial holder of the given reference.
- * @param addedValues
- * References the values of the left EObject that have been removed in the right one.
- * @param removedValues
- * References the values of the right EObject that have been removed in the left one.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- * @since 1.3
- */
- @SuppressWarnings("unchecked")
- protected void checkReferenceOrderChange(DiffGroup root, EReference reference, EObject leftElement,
- EObject rightElement, Set<EObject> addedValues, Set<EObject> removedValues)
- throws FactoryException {
- final List<EObject> leftElementReferences = new ArrayList<EObject>(
- (List<EObject>)EFactory.eGetAsList(leftElement, reference.getName()));
- final List<EObject> rightElementReferences = new ArrayList<EObject>(
- (List<EObject>)EFactory.eGetAsList(rightElement, reference.getName()));
- final List<Integer> removedIndices = new ArrayList<Integer>(removedValues.size());
-
- final List<EObject> filteredLeft = new ArrayList<EObject>(leftElementReferences);
- // Purge "left" list of all reference values that have been added to it
- for (final EObject added : addedValues) {
- filteredLeft.remove(added);
- }
- for (final EObject removed : removedValues) {
- removedIndices.add(Integer.valueOf(rightElementReferences.indexOf(removed)));
- }
-
- int expectedIndex = 0;
- for (int i = 0; i < filteredLeft.size(); i++) {
- EObject matched = getMatchManager().getMatchedEObject(filteredLeft.get(i));
- /*
- * There is a possibiliy that this object is located in another resource. If we are here, we know
- * it is neither added nor removed. We thus need to assume it is the case, and the object is in
- * both left and right, same instance in both.
- */
- if (matched == null) {
- matched = filteredLeft.get(i);
- }
- for (final Integer removedIndex : new ArrayList<Integer>(removedIndices)) {
- if (i == removedIndex.intValue()) {
- expectedIndex += 1;
- removedIndices.remove(removedIndex);
- }
- }
- int actualIndex = rightElementReferences.indexOf(matched);
- if (actualIndex == -1) {
- for (int j = 0; j < rightElementReferences.size() && actualIndex == -1; j++) {
- if (!areDistinct(matched, rightElementReferences.get(j))) {
- actualIndex = j;
- }
- }
- }
-
- if (actualIndex != expectedIndex++) {
- final ReferenceOrderChange refChange = DiffFactory.eINSTANCE.createReferenceOrderChange();
- refChange.setReference(reference);
- refChange.setLeftElement(leftElement);
- refChange.setRightElement(rightElement);
-
- // The loop will be broken here. Initialize left and right "target" lists for the diff
- final List<EObject> leftTarget = new ArrayList<EObject>();
- for (int j = 0; j < rightElementReferences.size(); j++) {
- final EObject right = rightElementReferences.get(j);
- EObject target = getMatchManager().getMatchedEObject(right);
- if (target == null) {
- target = createProxyFor(right);
- }
- leftTarget.add(target);
- }
- final List<EObject> rightTarget = new ArrayList<EObject>();
- for (int j = 0; j < leftElementReferences.size(); j++) {
- final EObject left = leftElementReferences.get(j);
- EObject target = getMatchManager().getMatchedEObject(left);
- if (target == null) {
- target = createProxyFor(left);
- }
- rightTarget.add(target);
- }
-
- refChange.getLeftTarget().addAll(leftTarget);
- refChange.getRightTarget().addAll(rightTarget);
-
- root.getSubDiffElements().add(refChange);
- break;
- }
- }
- }
-
- /**
- * This will be called to check for changes on a given reference values. Note that we know
- * <code>reference.isMany()</code> and <code>reference.isOrdered()</code> always return true here for the
- * generic diff engine and the tests won't be made.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param reference
- * {@link EReference} to check for modifications.
- * @param leftElement
- * Element corresponding to the final holder of the given reference.
- * @param rightElement
- * Element corresponding to the initial holder of the given reference.
- * @param addedReferences
- * Contains the created differences for added reference values.
- * @param removedReferences
- * Contains the created differences for removed reference values.
- * @throws FactoryException
- * Thrown if we cannot fetch the references' values.
- * @deprecated Use {@link #checkReferenceOrderChange(DiffGroup, EReference, EObject, EObject, Set, Set)}
- */
- @Deprecated
- protected void checkReferenceOrderChange(DiffGroup root, EReference reference, EObject leftElement,
- EObject rightElement, List<ReferenceChangeLeftTarget> addedReferences,
- List<ReferenceChangeRightTarget> removedReferences) throws FactoryException {
- final Set<EObject> addedValues = new HashSet<EObject>();
- final Set<EObject> removedValues = new HashSet<EObject>();
-
- for (ReferenceChangeLeftTarget added : addedReferences) {
- addedValues.add(added.getLeftTarget());
- }
- for (ReferenceChangeRightTarget removed : removedReferences) {
- removedValues.add(removed.getRightTarget());
- }
-
- checkReferenceOrderChange(root, reference, leftElement, rightElement, addedValues, removedValues);
- }
-
- /**
- * This will check that the values of the given reference from the objects contained by mapping has been
- * modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param mapping
- * Contains informations about the left and right model elements we have to compare.
- * @param reference
- * The reference we need to check for differences.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- */
- protected void checkReferenceUpdates(DiffGroup root, Match2Elements mapping, EReference reference)
- throws FactoryException {
- createNonConflictingReferencesUpdate(root, reference, mapping.getLeftElement(),
- mapping.getRightElement());
- }
-
- /**
- * This will check that the values of the given reference from the objects contained by mapping has been
- * modified.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement} to create.
- * @param mapping
- * Contains informations about the left and right model elements we have to compare.
- * @param reference
- * The reference we need to check for differences.
- * @throws FactoryException
- * Thrown if one of the checks fails.
- */
- protected void checkReferenceUpdates(DiffGroup root, Match3Elements mapping, EReference reference)
- throws FactoryException {
- final String referenceName = reference.getName();
- final List<Object> leftReferences = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getLeftElement(), referenceName));
- final List<Object> rightReferences = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getRightElement(), referenceName));
- final List<Object> ancestorReferences = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getOriginElement(), referenceName));
-
- // Checks if there're conflicts
- if (isConflictual(reference, leftReferences, rightReferences, ancestorReferences)) {
- createConflictingReferenceUpdate(root, reference, mapping);
- return;
- }
- // We know there aren't any conflicting changes
- final List<EObject> remoteDeletedReferences = new ArrayList<EObject>();
- final List<EObject> remoteAddedReferences = new ArrayList<EObject>();
- final List<EObject> deletedReferences = new ArrayList<EObject>();
- final List<EObject> addedReferences = new ArrayList<EObject>();
-
- populateThreeWayReferencesChanges(mapping, reference, addedReferences, deletedReferences,
- remoteAddedReferences, remoteDeletedReferences);
- createRemoteReferencesUpdate(root, reference, mapping, remoteAddedReferences, remoteDeletedReferences);
-
- if (!reference.isMany()) {
- EObject addedValue = null;
- EObject deletedValue = null;
- if (addedReferences.size() > 0) {
- addedValue = addedReferences.get(0);
- }
- if (deletedReferences.size() > 0) {
- deletedValue = deletedReferences.get(0);
- }
-
- if (areDistinct(addedValue, deletedValue)) {
- root.getSubDiffElements().add(
- createUpdatedReferenceOperation(mapping.getLeftElement(), mapping.getRightElement(),
- reference, addedValue, deletedValue));
- }
- } else {
- final List<EObject> addedReferencesCopy = new ArrayList<EObject>(addedReferences);
- final List<EObject> deletedReferencesCopy = new ArrayList<EObject>(deletedReferences);
-
- for (EObject addedReference : addedReferencesCopy) {
- deletedReferences.remove(addedReference);
- }
- for (EObject deletedReference : deletedReferencesCopy) {
- addedReferences.remove(deletedReference);
- }
-
- final List<ReferenceChangeLeftTarget> addedReferencesDiffs = new ArrayList<ReferenceChangeLeftTarget>(
- addedReferences.size());
- final List<ReferenceChangeRightTarget> removedReferencesDiffs = new ArrayList<ReferenceChangeRightTarget>(
- deletedReferences.size());
- // REFERENCES ADD
- if (addedReferences.size() > 0) {
- addedReferencesDiffs.addAll(createNewReferencesOperation(root, mapping.getLeftElement(),
- mapping.getRightElement(), reference, addedReferences));
- }
- // REFERENCES DEL
- if (deletedReferences.size() > 0) {
- removedReferencesDiffs.addAll(createRemovedReferencesOperation(root,
- mapping.getLeftElement(), mapping.getRightElement(), reference, deletedReferences));
- }
- // Check for references order changes
- if (reference.isOrdered()) {
- // Consider both "added" and "remotelyDeleted" here
- final Set<EObject> addedValues = new HashSet<EObject>(remoteDeletedReferences);
- for (final ReferenceChangeLeftTarget added : addedReferencesDiffs) {
- addedValues.add(added);
- }
- // Similarly, consider both "deleted" and "remoteAdded"
- final Set<EObject> removedValues = new HashSet<EObject>(remoteAddedReferences);
- for (final ReferenceChangeRightTarget removed : removedReferencesDiffs) {
- removedValues.add(removed);
- }
-
- checkReferenceOrderChange(root, reference, mapping.getLeftElement(),
- mapping.getRightElement(), addedValues, removedValues);
- }
- }
- }
-
- /**
- * Checks whether the two given values are distinct.
- *
- * @param addedValue
- * The value that's been added to a reference.
- * @param deletedValue
- * The value that's been removed from a reference.
- * @return <code>true</code> if there is a diff between the two values, <code>false</code> otherwise.
- */
- private boolean areDistinct(EObject addedValue, EObject deletedValue) {
- final double similarReferenceURIThreshold = 0.8d;
- boolean createDiff = false;
-
- // One of the two value is null, reference has been unset
- if (addedValue == deletedValue) {
- createDiff = false;
- } else if ((addedValue == null || deletedValue == null) && addedValue != deletedValue) {
- createDiff = true;
- } else if (getMatchManager().isUnmatched(addedValue) && getMatchManager().isUnmatched(deletedValue)) {
- createDiff = true;
- } else if (addedValue != null && deletedValue != null) {
- final EObject matchAdded = getMatchManager().getMatchedEObject(addedValue);
- if (matchAdded != null && matchAdded != deletedValue) {
- createDiff = true;
- } else if (getMatchManager().getMatchedEObject(deletedValue) != null) {
- // the deleted object has a match. At this point it can only be distinct from the added
- // value since this added value itself has no match.
- createDiff = true;
- } else {
- final URI addedURI = EcoreUtil.getURI(addedValue);
- final URI deletedURI = EcoreUtil.getURI(deletedValue);
- if (addedValue.eIsProxy() && deletedValue.eIsProxy()) {
- // Strict equality
- createDiff = !addedURI.equals(deletedURI);
- } else if (addedValue.eIsProxy() || deletedValue.eIsProxy()) {
- // Only one of them is a proxy, thus different since one of the two cannot be resolved
- createDiff = true;
- } else if (ResourceSimilarity.computeURISimilarity(addedURI, deletedURI) < similarReferenceURIThreshold) {
- createDiff = true;
- }
- }
- }
-
- return createDiff;
- }
-
- /**
- * Determines if we should ignore a reference for diff detection.
- * <p>
- * Default is to ignore references marked either
- * <ul>
- * <li>Containment</li>
- * <li>Container</li>
- * <li>Transient</li>
- * <li>Derived</li>
- * </ul>
- * </p>
- * <p>
- * Clients should override this if they wish to ignore other references.
- * </p>
- *
- * @param reference
- * Reference to determine whether it should be ignored.
- * @return <code>True</code> if reference has to be ignored, <code>False</code> otherwise.
- */
- protected boolean shouldBeIgnored(EReference reference) {
- boolean ignore = reference.isContainment();
- ignore = ignore || reference.isDerived();
- ignore = ignore || reference.isTransient();
- ignore = ignore || reference.isContainer();
- ignore = ignore || reference.eContainer() == EcorePackage.eINSTANCE.getEGenericType();
- return ignore;
- }
-
- /**
- * This will create and populate a {@link List} with all the references from the
- * <code>leftReferences</code> {@link List} that cannot be matched in the <code>rightReferences</code>
- * {@link List}.
- *
- * @param leftReferences
- * List of the left element reference values.
- * @param rightReferences
- * List of the right element reference values.
- * @return {@link List} of all the references that have been added in the left (local) element since the
- * right (distant) element.
- */
- private List<EObject> computeAddedReferences(List<EObject> leftReferences, List<EObject> rightReferences) {
- final List<EObject> deletedReferences = new ArrayList<EObject>();
- final List<EObject> addedReferences = new ArrayList<EObject>();
- final List<EObject> deletedProxies = new ArrayList<EObject>();
-
- if (leftReferences != null) {
- addedReferences.addAll(leftReferences);
- }
- if (rightReferences != null) {
- for (EObject obj : rightReferences) {
- if (obj.eIsProxy()) {
- deletedProxies.add(obj);
- } else {
- deletedReferences.add(obj);
- }
- }
- }
- final List<EObject> matchedOldReferences = getMatchedReferences(deletedReferences);
-
- // If the same object is both in left and right, it is neither added nor removed.
- addedReferences.removeAll(deletedReferences);
- // "Added" references are the references from the left element that
- // have no matching "right" counterpart
- addedReferences.removeAll(matchedOldReferences);
-
- // Double check for proxies
- final Iterator<EObject> addedCandidates = addedReferences.iterator();
- while (addedCandidates.hasNext() && !deletedProxies.isEmpty()) {
- final EObject added = addedCandidates.next();
- if (added.eIsProxy()) {
- final URI addedURI = ((InternalEObject)added).eProxyURI();
- boolean hasMatch = false;
- final Iterator<EObject> candidateMatches = deletedProxies.iterator();
- while (!hasMatch && candidateMatches.hasNext()) {
- final EObject candidate = candidateMatches.next();
- if (addedURI.equals(((InternalEObject)candidate).eProxyURI())) {
- hasMatch = true;
- candidateMatches.remove();
- }
- }
- if (hasMatch) {
- addedCandidates.remove();
- }
- }
- }
-
- return addedReferences;
- }
-
- /**
- * This will create and populate a {@link List} with all the references from the
- * <code>rightReferences</code> {@link List} that cannot be matched in the <code>leftReferences</code>
- * {@link List}.
- *
- * @param leftReferences
- * List of the left element reference values.
- * @param rightReferences
- * List of the right element reference values.
- * @return {@link List} of all the references that have been deleted from the left (local) element since
- * the right (distant) element.
- */
- private List<EObject> computeDeletedReferences(List<EObject> leftReferences, List<EObject> rightReferences) {
- final List<EObject> deletedReferences = new ArrayList<EObject>();
- final List<EObject> addedReferences = new ArrayList<EObject>();
- final List<EObject> addedProxies = new ArrayList<EObject>();
-
- if (leftReferences != null) {
- for (EObject obj : leftReferences) {
- if (obj.eIsProxy()) {
- addedProxies.add(obj);
- } else {
- addedReferences.add(obj);
- }
- }
- }
- if (rightReferences != null) {
- deletedReferences.addAll(rightReferences);
- }
- final List<EObject> matchedNewReferences = getMatchedReferences(addedReferences);
-
- // If the same object is both in left and right, it is neither added nor removed.
- deletedReferences.removeAll(addedReferences);
- // "deleted" references are the references from the right element that
- // have no counterpart in the left element
- deletedReferences.removeAll(matchedNewReferences);
-
- // Double check for proxies
- final Iterator<EObject> deletedCandidates = deletedReferences.iterator();
- while (deletedCandidates.hasNext() && !addedProxies.isEmpty()) {
- final EObject deleted = deletedCandidates.next();
- if (deleted.eIsProxy()) {
- final URI deletedURI = ((InternalEObject)deleted).eProxyURI();
- boolean hasMatch = false;
- final Iterator<EObject> candidateMatches = addedProxies.iterator();
- while (!hasMatch && candidateMatches.hasNext()) {
- final EObject candidate = candidateMatches.next();
- if (deletedURI.equals(((InternalEObject)candidate).eProxyURI())) {
- hasMatch = true;
- candidateMatches.remove();
- }
- }
- if (hasMatch) {
- deletedCandidates.remove();
- }
- }
- }
-
- return deletedReferences;
- }
-
- /**
- * This will create the {@link ConflictingDiffGroup} and its children for a conflictual ReferenceChange.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement} to create.
- * @param reference
- * Target {@link EReference} of the modification.
- * @param mapping
- * Contains informations about the left, right and origin element where the given reference has
- * changed.
- * @throws FactoryException
- * Thrown if we cannot create the underlying ReferenceChanges.
- */
- private void createConflictingReferenceUpdate(DiffGroup root, EReference reference, Match3Elements mapping)
- throws FactoryException {
- // We'll use this diffGroup to make use of #createNonConflictingAttributeChange(DiffGroup, EAttribute,
- // EObject, EObject)
- final DiffGroup dummyGroup = DiffFactory.eINSTANCE.createDiffGroup();
- createNonConflictingReferencesUpdate(dummyGroup, reference, mapping.getLeftElement(),
- mapping.getRightElement());
-
- if (dummyGroup.getSubDiffElements().size() > 0) {
- final ConflictingDiffElement conflictingDiff = DiffFactory.eINSTANCE
- .createConflictingDiffElement();
- conflictingDiff.setLeftParent(mapping.getLeftElement());
- conflictingDiff.setRightParent(mapping.getRightElement());
- conflictingDiff.setOriginElement(mapping.getOriginElement());
- for (final DiffElement subDiff : new ArrayList<DiffElement>(dummyGroup.getSubDiffElements())) {
- conflictingDiff.getSubDiffElements().add(subDiff);
- }
- root.getSubDiffElements().add(conflictingDiff);
- }
- }
-
- /**
- * Creates the {@link DiffGroup} corresponding to a reference's value addition under the given
- * {@link DiffGroup}.<br/>
- * The parameters include the list of added references which can be computed using
- * {@link #computeAddedReferences(List, List)}.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement}s to create.
- * @param left
- * Left element of the reference change.
- * @param right
- * Right element of the reference change.
- * @param reference
- * {@link EReference} target of the operation.
- * @param addedReferences
- * {@link List} of reference values that have been added in the <code>right</code> element
- * since the <code>left</code> element.
- * @return The list of created differences, an empty list if none.
- */
- private List<ReferenceChangeLeftTarget> createNewReferencesOperation(DiffGroup root, EObject left,
- EObject right, EReference reference, List<EObject> addedReferences) {
- final List<ReferenceChangeLeftTarget> result = new ArrayList<ReferenceChangeLeftTarget>();
- final Iterator<EObject> addedReferenceIterator = addedReferences.iterator();
- while (addedReferenceIterator.hasNext()) {
- final EObject eobj = addedReferenceIterator.next();
- final ReferenceChangeLeftTarget addOperation = DiffFactory.eINSTANCE
- .createReferenceChangeLeftTarget();
- addOperation.setRightElement(right);
- addOperation.setLeftElement(left);
- addOperation.setReference(reference);
- addOperation.setLeftTarget(eobj);
- if (getMatchManager().getMatchedEObject(eobj) != null) {
- addOperation.setRightTarget(getMatchManager().getMatchedEObject(eobj));
- }
- root.getSubDiffElements().add(addOperation);
- result.add(addOperation);
- }
- return result;
- }
-
- /**
- * This will check the given <code>reference</code> for modification between <code>leftElement</code> and
- * <code>rightElement</code> and create the corresponding {@link DiffElement}s under the given
- * {@link DiffGroup}.
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param reference
- * {@link EReference} to check for modifications.
- * @param leftElement
- * Element corresponding to the final value for the given reference.
- * @param rightElement
- * Element corresponding to the initial value for the given reference.
- * @throws FactoryException
- * Thrown if we cannot fetch <code>reference</code>'s values for either the left or the right
- * element.
- */
- private void createNonConflictingReferencesUpdate(DiffGroup root, EReference reference,
- EObject leftElement, EObject rightElement) throws FactoryException {
- final List<Object> leftElementObjReferences = convertFeatureMapList(EFactory.eGetAsList(leftElement,
- reference.getName()));
- final List<Object> rightElementObjReferences = convertFeatureMapList(EFactory.eGetAsList(
- rightElement, reference.getName()));
-
- // All values should be EObjects
- final List<EObject> leftElementReferences = new ArrayList<EObject>();
- final List<EObject> rightElementReferences = new ArrayList<EObject>();
- for (Object left : leftElementObjReferences) {
- leftElementReferences.add((EObject)left);
- }
- for (Object right : rightElementObjReferences) {
- rightElementReferences.add((EObject)right);
- }
-
- final List<EObject> deletedReferences = computeDeletedReferences(leftElementReferences,
- rightElementReferences);
- final List<EObject> addedReferences = computeAddedReferences(leftElementReferences,
- rightElementReferences);
-
- // REFERENCES UPDATES
- if (!reference.isMany()) {
- EObject addedValue = null;
- EObject deletedValue = null;
-
- if (addedReferences.size() > 0) {
- addedValue = addedReferences.get(0);
- }
- if (deletedReferences.size() > 0) {
- deletedValue = deletedReferences.get(0);
- }
-
- if (getMatchManager().isUnmatched(addedValue) || getMatchManager().isUnmatched(deletedValue)
- || areDistinct(addedValue, deletedValue)) {
- root.getSubDiffElements().add(
- createUpdatedReferenceOperation(leftElement, rightElement, reference, addedValue,
- deletedValue));
- }
- } else {
- // check that added references are not in deleted reference
- final Iterator<EObject> addedIterator = addedReferences.iterator();
- while (addedIterator.hasNext()) {
- final EObject added = addedIterator.next();
- final Iterator<EObject> deletedIterator = deletedReferences.iterator();
- while (deletedIterator.hasNext()) {
- final EObject deleted = deletedIterator.next();
- if (!areDistinct(added, deleted)) {
- addedIterator.remove();
- deletedIterator.remove();
- }
- }
- }
-
- final List<ReferenceChangeLeftTarget> addedReferencesDiffs = new ArrayList<ReferenceChangeLeftTarget>(
- addedReferences.size());
- final List<ReferenceChangeRightTarget> removedReferencesDiffs = new ArrayList<ReferenceChangeRightTarget>(
- deletedReferences.size());
- // REFERENCES ADD
- if (addedReferences.size() > 0) {
- addedReferencesDiffs.addAll(createNewReferencesOperation(root, leftElement, rightElement,
- reference, addedReferences));
- }
- // REFERENCES DEL
- if (deletedReferences.size() > 0) {
- removedReferencesDiffs.addAll(createRemovedReferencesOperation(root, leftElement,
- rightElement, reference, deletedReferences));
- }
- // Check for references order changes
- if (reference.isOrdered()) {
- checkReferenceOrderChange(root, reference, leftElement, rightElement, addedReferencesDiffs,
- removedReferencesDiffs);
- }
- }
- }
-
- /**
- * This will check for remote ReferenceChange operations and create the corresponding {@link DiffElement}
- * s.<br/>
- * <p>
- * A reference is considered &quot;remotely changed&quot; if its values differ between the right (latest
- * from HEAD) and origin (common ancestor) model, but its values haven't changed between the left (working
- * copy) and the origin model.
- * </p>
- *
- * @param root
- * {@link DiffGroup Root} of the {@link DiffElement}s to create.
- * @param reference
- * {@link EReference} to check for ReferenceChanges.
- * @param mapping
- * Contains informations about the left, right and original model elements.
- * @param remotelyAdded
- * {@link List} of reference values that have been added in the left model since the origin.
- * @param remotelyDeleted
- * {@link List} of reference values that have been removed from the left model since the
- * origin.
- */
- private void createRemoteReferencesUpdate(DiffGroup root, EReference reference, Match3Elements mapping,
- List<EObject> remotelyAdded, List<EObject> remotelyDeleted) {
- if (!reference.isMany() && (remotelyAdded.size() > 0 || remotelyDeleted.size() > 0)) {
- EObject remoteAdded = null;
- if (remotelyAdded.size() > 0) {
- remoteAdded = remotelyAdded.get(0);
- }
- EObject remoteDeleted = null;
- if (remotelyDeleted.size() > 0) {
- remoteDeleted = remotelyDeleted.get(0);
- }
-
- final UpdateReference operation = DiffFactory.eINSTANCE.createUpdateReference();
- operation.setRemote(true);
- operation.setLeftElement(mapping.getLeftElement());
- operation.setRightElement(mapping.getRightElement());
- operation.setReference(reference);
-
- EObject leftTarget = getMatchManager().getMatchedEObject(remoteAdded);
- EObject rightTarget = getMatchManager().getMatchedEObject(remoteDeleted);
- // checks if target are defined remotely
- if (leftTarget == null && remoteAdded != null) {
- leftTarget = remoteAdded;
- }
- if (rightTarget == null && remoteDeleted != null) {
- rightTarget = remoteDeleted;
- }
-
- operation.setLeftTarget(leftTarget);
- operation.setRightTarget(rightTarget);
-
- root.getSubDiffElements().add(operation);
- } else if (reference.isMany()) {
- final Iterator<EObject> addedReferenceIterator = remotelyAdded.iterator();
- while (addedReferenceIterator.hasNext()) {
- final EObject eobj = addedReferenceIterator.next();
- final ReferenceChangeRightTarget addOperation = DiffFactory.eINSTANCE
- .createReferenceChangeRightTarget();
- addOperation.setRemote(true);
- addOperation.setRightElement(mapping.getRightElement());
- addOperation.setLeftElement(mapping.getLeftElement());
- addOperation.setReference(reference);
- addOperation.setRightTarget(eobj);
- if (getMatchManager().getMatchedEObject(eobj) != null) {
- addOperation.setLeftTarget(getMatchManager().getMatchedEObject(eobj));
- }
- root.getSubDiffElements().add(addOperation);
- }
- final Iterator<EObject> deletedReferenceIterator = remotelyDeleted.iterator();
- while (deletedReferenceIterator.hasNext()) {
- final EObject eobj = deletedReferenceIterator.next();
- final ReferenceChangeLeftTarget delOperation = DiffFactory.eINSTANCE
- .createReferenceChangeLeftTarget();
- delOperation.setRemote(true);
- delOperation.setRightElement(mapping.getRightElement());
- delOperation.setLeftElement(mapping.getLeftElement());
- delOperation.setReference(reference);
- delOperation.setLeftTarget(eobj);
- if (getMatchManager().getMatchedEObject(eobj) != null) {
- delOperation.setRightTarget(getMatchManager().getMatchedEObject(eobj));
- }
- root.getSubDiffElements().add(delOperation);
- }
- }
- }
-
- /**
- * Creates the {@link DiffGroup} corresponding to a reference's value removal under the given
- * {@link DiffGroup}.<br/>
- * The parameters include the list of removed references which can be computed using
- * {@link #computeDeletedReferences(List, List)}.
- *
- * @param root
- * {@link DiffGroup root} of the {@link DiffElement}s to create.
- * @param left
- * Left element of the reference change.
- * @param right
- * Right element of the reference change.
- * @param reference
- * {@link EReference} target of the operation.
- * @param deletedReferences
- * {@link List} of reference values that have been removed in the <code>right</code> element
- * since the <code>left</code> element.
- * @return The list of created differences, an empty list if none.
- */
- private List<ReferenceChangeRightTarget> createRemovedReferencesOperation(DiffGroup root, EObject left,
- EObject right, EReference reference, List<EObject> deletedReferences) {
- final List<ReferenceChangeRightTarget> result = new ArrayList<ReferenceChangeRightTarget>();
- final Iterator<EObject> deletedReferenceIterator = deletedReferences.iterator();
- while (deletedReferenceIterator.hasNext()) {
- final EObject eobj = deletedReferenceIterator.next();
- final ReferenceChangeRightTarget delOperation = DiffFactory.eINSTANCE
- .createReferenceChangeRightTarget();
- delOperation.setRightElement(right);
- delOperation.setLeftElement(left);
- delOperation.setReference(reference);
- delOperation.setRightTarget(eobj);
- if (getMatchManager().getMatchedEObject(eobj) != null) {
- delOperation.setLeftTarget(getMatchManager().getMatchedEObject(eobj));
- }
- root.getSubDiffElements().add(delOperation);
- result.add(delOperation);
- }
- return result;
- }
-
- /**
- * Creates the {@link DiffElement} corresponding to an unique reference's value update.
- *
- * @param left
- * Left element of the reference change.
- * @param right
- * Right element of the reference change.
- * @param reference
- * {@link EReference} target of the operation.
- * @param addedValue
- * Value which has been added for the reference.
- * @param deletedValue
- * Value that has been deleted from the reference.
- * @return The {@link DiffElement} corresponding to an unique reference's value update
- */
- private UpdateReference createUpdatedReferenceOperation(EObject left, EObject right,
- EReference reference, EObject addedValue, EObject deletedValue) {
- final UpdateReference operation = DiffFactory.eINSTANCE.createUpdateReference();
- operation.setLeftElement(left);
- operation.setRightElement(right);
- operation.setReference(reference);
-
- EObject leftTarget = getMatchManager().getMatchedEObject(deletedValue);
- EObject rightTarget = getMatchManager().getMatchedEObject(addedValue);
- // checks if target are defined remotely
- if (leftTarget == null && deletedValue != null) {
- leftTarget = deletedValue;
- }
- if (rightTarget == null && addedValue != null) {
- rightTarget = addedValue;
- }
-
- operation.setLeftTarget(leftTarget);
- operation.setRightTarget(rightTarget);
-
- return operation;
- }
-
- /**
- * Returns the list of references from the given list that can be matched on either right or left
- * {@link EObject}s.
- *
- * @param references
- * {@link List} of the references to match.
- * @return The list of references from the given list that can be matched on either right or left
- * {@link EObject}s.
- */
- private List<EObject> getMatchedReferences(List<EObject> references) {
- final List<EObject> matchedReferences = new ArrayList<EObject>();
- final Iterator<EObject> refIterator = references.iterator();
- while (refIterator.hasNext()) {
- final Object currentReference = refIterator.next();
- if (currentReference != null) {
- final EObject currentMapped = getMatchManager().getMatchedEObject((EObject)currentReference);
- if (currentMapped != null) {
- matchedReferences.add(currentMapped);
- }
- }
- }
- return matchedReferences;
- }
-
- /**
- * Checks if the values of a given reference have been changed both on the right (latest from head) and
- * left (working copy) to distinct values since the origin.
- *
- * @param reference
- * Reference we're checking for conflictual changes.
- * @param leftReferences
- * {@link List} of values from the left (working copy) model for <code>reference</code>.
- * @param rightReferences
- * {@link List} of values from the right (latest from head) model for <code>reference</code>.
- * @param ancestorReferences
- * {@link List} of values from the origin (common ancestor) model for <code>reference</code>.
- * @return <code>True</code> if there's been a conflictual change for the given {@link EReference},
- * <code>False</code> otherwise.
- */
- private boolean isConflictual(EReference reference, List<?> leftReferences, List<?> rightReferences,
- List<?> ancestorReferences) {
- boolean isConflictual = false;
- // There CAN be a conflict ONLY if the reference is unique
- if (!reference.isMany()) {
- // If both left and right number of values have changed since origin...
- if (leftReferences.size() != ancestorReferences.size()
- && rightReferences.size() != ancestorReferences.size()) {
- // ... There is a conflict if the value hasn't been erased AND
- // the left value is different than the right one
- if (leftReferences.size() > 0
- && !leftReferences.get(0).equals(
- getMatchManager().getMatchedEObject((EObject)rightReferences.get(0)))) {
- isConflictual = true;
- }
- // If the number of values hasn't changed since the origin, there
- // cannot be a conflict if there are no values
- } else if (leftReferences.size() > 0 && rightReferences.size() > 0) {
- // There's a conflict if the values are distinct
- if (!leftReferences.get(0).equals(
- getMatchManager().getMatchedEObject((EObject)ancestorReferences.get(0),
- MatchSide.LEFT))
- && !rightReferences.get(0).equals(
- getMatchManager().getMatchedEObject((EObject)ancestorReferences.get(0),
- MatchSide.RIGHT))
- && !rightReferences.get(0).equals(
- getMatchManager().getMatchedEObject((EObject)leftReferences.get(0)))) {
- isConflictual = true;
- }
- }
- }
- return isConflictual;
- }
-
- /**
- * Checks a given {@link EReference reference} for changes related to a given <code>mapping</code> and
- * populates the given {@link List}s with the reference values belonging to them.
- *
- * @param mapping
- * Contains informations about the left, right and origin elements.<br/>
- * <ul>
- * <li>&quot;Added&quot; values are the values that have been added in the left element since
- * the origin and that haven't been added in the right element.</li>
- * <li>&quot;Deleted&quot; values are the values that have been removed from the left element
- * since the origin but are still present in the right element.</li>
- * <li>&quot;Remotely added&quot; values are the values that have been added in the right
- * element since the origin but haven't been added in the left element.</li>
- * <li>&quot;Remotely deleted&quot; values are the values that have been removed from the right
- * element since the origin but are still present in the left element.</li>
- * </ul>
- * @param reference
- * {@link EReference} we're checking for changes.
- * @param addedReferences
- * {@link List} that will be populated with the values that have been added in the left element
- * since the origin.
- * @param deletedReferences
- * {@link List} that will be populated with the values that have been removed from the left
- * element since the origin.
- * @param remoteAddedReferences
- * {@link List} that will be populated with the values that have been added in the right
- * element since the origin.
- * @param remoteDeletedReferences
- * {@link List} that will be populated with the values that have been removed from the right
- * element since the origin.
- * @throws FactoryException
- * Thrown if we cannot fetch the reference's values in either the left, right or origin
- * element.
- */
- private void populateThreeWayReferencesChanges(Match3Elements mapping, EReference reference,
- List<EObject> addedReferences, List<EObject> deletedReferences,
- List<EObject> remoteAddedReferences, List<EObject> remoteDeletedReferences)
- throws FactoryException {
- final List<Object> leftReferences = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getLeftElement(), reference.getName()));
- final List<Object> rightReferences = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getRightElement(), reference.getName()));
- final List<Object> ancestorReferences = convertFeatureMapList(EFactory.eGetAsList(
- mapping.getOriginElement(), reference.getName()));
- // populates remotely added and locally deleted lists
- final List<Object> leftCopy = new ArrayList<Object>(leftReferences);
- List<Object> ancestorCopy = new ArrayList<Object>(ancestorReferences);
- for (final Object right : rightReferences) {
- EObject leftMatched = null;
- EObject ancestorMatched = null;
- boolean hasLeftMatch = false;
- boolean hasAncestorMatch = false;
- if (right instanceof EObject && !((EObject)right).eIsProxy()) {
- ancestorMatched = getMatchManager().getMatchedEObject((EObject)right, MatchSide.ANCESTOR);
- leftMatched = getMatchManager().getMatchedEObject((EObject)right);
- hasLeftMatch = leftMatched != null && leftCopy.contains(leftMatched);
- hasAncestorMatch = ancestorMatched != null && ancestorCopy.contains(ancestorMatched);
- } else if (right instanceof EObject && ((EObject)right).eIsProxy()) {
- final Iterator<Object> ancestorIterator = ancestorCopy.iterator();
- while (ancestorMatched == null && ancestorIterator.hasNext()) {
- final Object ancestor = ancestorIterator.next();
- if (!areDistinct((EObject)right, (EObject)ancestor)) {
- ancestorMatched = (EObject)ancestor;
- }
- }
- final Iterator<Object> leftIterator = leftCopy.iterator();
- while (leftMatched == null && leftIterator.hasNext()) {
- final Object left = leftIterator.next();
- if (!areDistinct((EObject)right, (EObject)left)) {
- leftMatched = (EObject)left;
- }
- }
- hasLeftMatch = leftMatched != null;
- hasAncestorMatch = ancestorMatched != null;
- }
- // Take remote unmatched into account
- hasAncestorMatch = hasAncestorMatch || getMatchManager() instanceof IMatchManager2
- && ((IMatchManager2)getMatchManager()).isRemoteUnmatched((EObject)right);
- if (!hasLeftMatch && !hasAncestorMatch) {
- remoteAddedReferences.add((EObject)right);
- } else if (!hasLeftMatch) {
- deletedReferences.add((EObject)right);
- }
- if (leftMatched != null) {
- leftCopy.remove(leftMatched);
- }
- if (ancestorMatched != null) {
- ancestorCopy.remove(ancestorMatched);
- }
- }
- // populates remotely deleted and locally added lists
- final List<Object> rightCopy = new ArrayList<Object>(rightReferences);
- ancestorCopy = new ArrayList<Object>(ancestorReferences);
- for (final Object left : leftReferences) {
- EObject rightMatched = null;
- EObject ancestorMatched = null;
- boolean hasRightMatch = false;
- boolean hasAncestorMatch = false;
- if (left instanceof EObject && !((EObject)left).eIsProxy()) {
- ancestorMatched = getMatchManager().getMatchedEObject((EObject)left, MatchSide.ANCESTOR);
- rightMatched = getMatchManager().getMatchedEObject((EObject)left);
- hasRightMatch = rightMatched != null && rightCopy.contains(rightMatched);
- hasAncestorMatch = ancestorMatched != null && ancestorCopy.contains(ancestorMatched);
- } else if (left instanceof EObject && ((EObject)left).eIsProxy()) {
- final Iterator<Object> ancestorIterator = ancestorCopy.iterator();
- while (ancestorMatched == null && ancestorIterator.hasNext()) {
- final Object ancestor = ancestorIterator.next();
- if (!areDistinct((EObject)left, (EObject)ancestor)) {
- ancestorMatched = (EObject)ancestor;
- }
- }
- final Iterator<Object> rightIterator = rightCopy.iterator();
- while (rightMatched == null && rightIterator.hasNext()) {
- final Object right = rightIterator.next();
- if (!areDistinct((EObject)left, (EObject)right)) {
- rightMatched = (EObject)right;
- }
- }
- hasRightMatch = rightMatched != null;
- hasAncestorMatch = ancestorMatched != null;
- }
- // Take remote unmatched into account
- hasAncestorMatch = hasAncestorMatch || getMatchManager() instanceof IMatchManager2
- && ((IMatchManager2)getMatchManager()).isRemoteUnmatched((EObject)left);
- if (!hasRightMatch && !hasAncestorMatch) {
- addedReferences.add((EObject)left);
- } else if (!hasRightMatch) {
- remoteDeletedReferences.add((EObject)left);
- }
- if (rightMatched != null) {
- leftCopy.remove(rightMatched);
- }
- if (ancestorMatched != null) {
- ancestorCopy.remove(ancestorMatched);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/package-info.java
deleted file mode 100644
index 9fadd09f4..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/engine/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * Provides a generic diff engine.
- * <p>
- * The provided engine does not require Eclipse to be running and can be
- * called stand-alone.
- * </p>
- * <p>
- * Clients can extends this diff engine and inherit most of its behavior
- * instead of redefining an IDiffEngine from scratch.
- * </p>
- */
-package org.eclipse.emf.compare.diff.engine; \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffCollectionsHelper.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffCollectionsHelper.java
deleted file mode 100644
index c03eeb9f4..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffCollectionsHelper.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- * Martin Taal - [299641] Compare arrays by their content instead of instance equality
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal;
-
-import java.lang.reflect.Array;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.engine.IMatchManager;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Utility class to diff Collection values.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-public class DiffCollectionsHelper {
- /**
- * IMatchManager instance used to determine the match for an arbitrary EObject.
- *
- * @see IMatchManager
- */
- private IMatchManager matchManager;
-
- /**
- * Create a new utility to diff collections.
- *
- * @param manager
- * the IMatchManager instance used to retrieve the matches.
- */
- public DiffCollectionsHelper(IMatchManager manager) {
- this.matchManager = manager;
- }
-
- /**
- * Return the number of missing occurrence from tested list comparing with reference list.
- *
- * @param referenceList
- * the reference list.
- * @param testedList
- * the list to test.
- * @param value
- * the value to look occurrences for.
- * @return the number of "value" occurrences missing in testedList to be like referenceList.
- */
- public int getNumberOfMissingOccurrence(List<Object> referenceList, List<Object> testedList, Object value) {
- final int expectedOccurrences = getNumberOfOccurrences(referenceList, value);
- final int actualOccurrences = getNumberOfOccurrences(testedList, value);
- return expectedOccurrences - actualOccurrences;
- }
-
- /**
- * Return the number of occurrences in a list.
- *
- * @param values
- * list.
- * @param value
- * element to look for.
- * @return the number of occurrences in it.
- */
- private int getNumberOfOccurrences(List<Object> values, Object value) {
- int i = 0;
- for (Object aValue : values) {
- if (!areDistinctValues(aValue, value)) {
- i++;
- }
- }
- return i;
- }
-
- /**
- * Compare values by equality handling specifics of EMF.
- *
- * @param left
- * object 1.
- * @param right
- * object 2
- * @return true if both objects are not equals.
- */
- public boolean areDistinctValues(Object left, Object right) {
- final boolean distinct;
- if (left instanceof EEnumLiteral && right instanceof EEnumLiteral) {
- final StringBuilder value1 = new StringBuilder();
- value1.append(((EEnumLiteral)left).getLiteral()).append(((EEnumLiteral)left).getValue());
- final StringBuilder value2 = new StringBuilder();
- value2.append(((EEnumLiteral)right).getLiteral()).append(((EEnumLiteral)right).getValue());
- distinct = !value1.toString().equals(value2.toString());
- } else if (left instanceof EObject && right instanceof EObject) {
- // [248442] This will handle FeatureMapEntries detection
- distinct = left != getMatchManager().getMatchedEObject((EObject)right);
- } else if (left != null && left.getClass().isArray()) {
- // [299641] compare arrays by their content instead of instance equality
- distinct = areDistinctArrays(left, right);
- } else {
- distinct = left != null && !left.equals(right) || left == null && left != right;
- }
- return distinct;
- }
-
- /**
- * Compares two values as arrays, checking that the length and content of both matches each other.
- *
- * @param left
- * The value of the attribute from the left compare resource.
- * @param right
- * The value of the attribute from the right compare resource.
- * @return <code>true</code> if the <code>left</code> value is distinct from the <code>right</code> value.
- */
- private boolean areDistinctArrays(Object left, Object right) {
- boolean distinct = false;
- // we know left is a non-null array.
- if (right == null || !right.getClass().isArray()) {
- distinct = true;
- } else {
- final int leftLength = Array.getLength(left);
- final int rightLength = Array.getLength(right);
- if (leftLength != rightLength) {
- distinct = true;
- } else {
- for (int i = 0; i < leftLength; i++) {
- final Object leftElement = Array.get(left, i);
- final Object rightElement = Array.get(right, i);
- if (areDistinctValues(leftElement, rightElement)) {
- distinct = true;
- break;
- }
- }
- }
- }
- return distinct;
- }
-
- /**
- * Returns the match manager used by this engine.
- *
- * @return The match manager used by this engine.
- */
- protected IMatchManager getMatchManager() {
- return matchManager;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffReferenceUtil.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffReferenceUtil.java
deleted file mode 100644
index 8f58688d6..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/DiffReferenceUtil.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMapUtil;
-
-/**
- * This utility class holds methods that will be used by the diff and merge processes.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public final class DiffReferenceUtil {
- /**
- * Utility classes don't need a default constructor.
- */
- private DiffReferenceUtil() {
- // Hides default constructor
- }
-
- /**
- * Returns the list of references that should be taken into account when copying an EObject : EReferences
- * that are neither {@link EReference#isContainer() container} nor {@link EReference#isContainment()}; or
- * that contain feature maps.
- *
- * @param eObject
- * The EObject for which we seek the "copy-able" references.
- * @return The EReferences that should be copied from the given EObject.
- */
- public static List<EStructuralFeature> getCopiableReferences(EObject eObject) {
- final EClass eClass = eObject.eClass();
- final List<EStructuralFeature> result = new ArrayList<EStructuralFeature>();
- for (int j = 0; j < eClass.getFeatureCount(); ++j) {
- final EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(j);
- if (eStructuralFeature.isChangeable() && !eStructuralFeature.isDerived()) {
- if (isSimpleReference(eStructuralFeature) || isFeatureMap(eStructuralFeature)) {
- result.add(eStructuralFeature);
- }
- }
- }
- return result;
- }
-
- /**
- * Checks if the specified feature is an EReference that is neither {@link EReference#isContainer()
- * container} nor {@link EReference#isContainment()} reference.
- *
- * @param feature
- * Feature to be tested.
- * @return <code>true</code> if the feature is a simple reference, <code>false</code> otherwise.
- */
- public static boolean isSimpleReference(EStructuralFeature feature) {
- return feature instanceof EReference && !((EReference)feature).isContainment()
- && !((EReference)feature).isContainer();
- }
-
- /**
- * Checks if the specified feature's type is a feature map.
- *
- * @param feature
- * Feature to be tested.
- * @return <code>true</code> if it the feature's type is a feature map, <code>false</code> otherwise.
- */
- public static boolean isFeatureMap(EStructuralFeature feature) {
- return FeatureMapUtil.isFeatureMap(feature);
- }
-
- /**
- * Returns the value of the given feature for the given EObject. Whatever the type of the feature, its
- * value(s) will be returned as a Set.
- *
- * @param eObject
- * The EObject from which to retrieve a feature's values.
- * @param feature
- * The feature which values we seek.
- * @param resolveProxies
- * <code>true</code> if the proxies have to be resolved.
- * @return The Set of values for the given EReference of the given EObject
- */
- @SuppressWarnings("unchecked")
- private static Set<EObject> getReferencedEObject(EObject eObject, EStructuralFeature feature,
- boolean resolveProxies) {
- final Set<EObject> result = new LinkedHashSet<EObject>();
- if (isSimpleReference(feature)) {
- final Object obj = eObject.eGet(feature, resolveProxies);
- if (obj instanceof EObject) {
- result.add((EObject)obj);
- } else if (obj instanceof Collection<?>) {
- result.addAll((Collection<EObject>)obj);
- }
- } else if (isFeatureMap(feature)) {
- final FeatureMap featureMap = (FeatureMap)eObject.eGet(feature);
- for (int k = 0; k < featureMap.size(); ++k) {
- final EStructuralFeature f = featureMap.getEStructuralFeature(k);
- if (f instanceof EReference) {
- final Object referencedEObject = featureMap.getValue(k);
- if (referencedEObject instanceof EObject) {
- result.add((EObject)referencedEObject);
- } else if (referencedEObject instanceof Collection<?>) {
- result.addAll((Collection<EObject>)referencedEObject);
- }
- }
- }
- }
- return result;
- }
-
- /**
- * Get all the EObjects referenced by the specified eObject.
- *
- * @param eObject
- * The EObject.
- * @param resolveProxies
- * <code>true</code> if the proxies have to be resolved.
- * @return The set of all EObjects referenced from the given EObject.
- */
- public static Set<EObject> getReferencedEObjects(EObject eObject, boolean resolveProxies) {
- final Set<EObject> result = new LinkedHashSet<EObject>();
- final Iterator<EStructuralFeature> references = getCopiableReferences(eObject).iterator();
- while (references.hasNext()) {
- final EStructuralFeature feature = references.next();
- result.addAll(getReferencedEObject(eObject, feature, resolveProxies));
- }
- final Iterator<EObject> children = eObject.eAllContents();
- while (children.hasNext()) {
- final EObject child = children.next();
- result.addAll(getReferencedEObjects(child, resolveProxies));
- }
- return result;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/CrossReferencerMatchManager.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/CrossReferencerMatchManager.java
deleted file mode 100644
index c6f74a1a8..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/CrossReferencerMatchManager.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Open Canarias 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:
- * Victor Roldan Betancort - [352002] initial API and implementation
- * Obeo
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.engine;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.emf.compare.diff.engine.IMatchManager;
-import org.eclipse.emf.compare.diff.engine.IMatchManager2;
-import org.eclipse.emf.compare.match.metamodel.Match2Elements;
-import org.eclipse.emf.compare.match.metamodel.Match3Elements;
-import org.eclipse.emf.compare.match.metamodel.MatchPackage;
-import org.eclipse.emf.compare.match.metamodel.UnmatchElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * An IMatchManager that uses a CrossReferencer to determine matches for an <code>EObject</code>.
- *
- * @author Victor Roldan Betancort
- * @see IMatchManager
- */
-public class CrossReferencerMatchManager implements IMatchManager, IMatchManager2 {
- /**
- * If we're currently doing a resourceSet differencing, this will have been initialized with the whole
- * MatchResourceSet.
- */
- private EcoreUtil.CrossReferencer crossReferencer;
-
- /**
- * Instantiates this match manager given the CrossReferencer from which to retrieve the mappings.
- *
- * @param referencer
- * The CrossReferencer containing the mappings.
- */
- public CrossReferencerMatchManager(EcoreUtil.CrossReferencer referencer) {
- this.crossReferencer = referencer;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IMatchManager#getMatchedEObject(org.eclipse.emf.ecore.EObject)
- */
- public EObject getMatchedEObject(EObject from) {
- EObject matchedEObject = null;
- if (crossReferencer != null && from != null) {
- final Collection<EStructuralFeature.Setting> settings = crossReferencer.get(from);
- if (settings == null) {
- return null;
- }
- for (final org.eclipse.emf.ecore.EStructuralFeature.Setting setting : crossReferencer.get(from)) {
- if (setting.getEObject() instanceof Match2Elements) {
- if (setting.getEStructuralFeature().getFeatureID() == MatchPackage.MATCH2_ELEMENTS__LEFT_ELEMENT) {
- matchedEObject = ((Match2Elements)setting.getEObject()).getRightElement();
- } else if (setting.getEStructuralFeature().getFeatureID() == MatchPackage.MATCH2_ELEMENTS__RIGHT_ELEMENT) {
- matchedEObject = ((Match2Elements)setting.getEObject()).getLeftElement();
- }
- }
- }
- }
- return matchedEObject;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IMatchManager#getMatchedEObject(org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.compare.diff.engine.IMatchManager.MatchSide)
- */
- public EObject getMatchedEObject(EObject from, MatchSide side) {
- EObject matchedEObject = null;
- if (crossReferencer != null && from != null) {
- final Collection<EStructuralFeature.Setting> settings = crossReferencer.get(from);
- if (settings == null) {
- return null;
- }
- for (final org.eclipse.emf.ecore.EStructuralFeature.Setting setting : settings) {
- if (setting.getEObject() instanceof Match2Elements) {
- if (side == MatchSide.LEFT) {
- matchedEObject = ((Match2Elements)setting.getEObject()).getLeftElement();
- } else if (side == MatchSide.RIGHT) {
- matchedEObject = ((Match2Elements)setting.getEObject()).getRightElement();
- } else if (setting.getEObject() instanceof Match3Elements) {
- matchedEObject = ((Match3Elements)setting.getEObject()).getOriginElement();
- }
- }
- }
- }
- return matchedEObject;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IMatchManager#isInScope(org.eclipse.emf.ecore.EObject)
- */
- public boolean isInScope(EObject eObj) {
- if (crossReferencer != null && eObj != null && crossReferencer.get(eObj) != null) {
- for (final org.eclipse.emf.ecore.EStructuralFeature.Setting setting : crossReferencer.get(eObj)) {
- if (setting.getEObject() instanceof Match2Elements
- || setting.getEObject() instanceof UnmatchElement) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IMatchManager2#isRemoteUnmatched(org.eclipse.emf.ecore.EObject)
- */
- public boolean isRemoteUnmatched(EObject element) {
- if (crossReferencer != null && crossReferencer.get(element) != null) {
- final Iterator<EStructuralFeature.Setting> it = crossReferencer.get(element).iterator();
- if (it.hasNext()) {
- final EObject next = it.next().getEObject();
- if (next instanceof UnmatchElement && ((UnmatchElement)next).isRemote()) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.engine.IMatchManager#isUnmatched(org.eclipse.emf.ecore.EObject)
- */
- public boolean isUnmatched(EObject element) {
- if (crossReferencer != null && crossReferencer.get(element) != null) {
- final Iterator<EStructuralFeature.Setting> it = crossReferencer.get(element).iterator();
- if (it.hasNext() && it.next().getEObject() instanceof UnmatchElement) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/MatchCrossReferencer.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/MatchCrossReferencer.java
deleted file mode 100644
index 665f49b2c..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/engine/MatchCrossReferencer.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo 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:
- * Obeo - initial API and implementation
- * Victor Roldan Betancort - [352002] introduce IMatchManager
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.engine;
-
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.compare.match.metamodel.MatchPackage;
-import org.eclipse.emf.compare.match.metamodel.MatchResourceSet;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * This implementation of a Cross Referencer will only cross reference matched and unmatched elements.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class MatchCrossReferencer extends EcoreUtil.CrossReferencer {
- /** Generic Serial ID. */
- private static final long serialVersionUID = 1L;
-
- /**
- * Initializes our cross referencer given the match model to consider for mappings.
- *
- * @param match
- * The match model to cross reference.
- */
- public MatchCrossReferencer(MatchModel match) {
- super(match);
- crossReference();
- }
-
- /**
- * Initializes our cross referencer given the match model to consider for mappings. Used in case of
- * three-way comparisons.
- *
- * @param matchResourceSet
- * The match model to cross reference.
- */
- public MatchCrossReferencer(MatchResourceSet matchResourceSet) {
- super(matchResourceSet);
- crossReference();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject) {
- // FIXME shouldn't we test for eObject instanceof Match2Elements?
- // Cross reference this if it is either one of the left, right, or ancestor elements
- boolean crossReference = eReference == MatchPackage.eINSTANCE.getMatch2Elements_LeftElement()
- || eReference == MatchPackage.eINSTANCE.getMatch2Elements_RightElement()
- || eReference == MatchPackage.eINSTANCE.getMatch3Elements_OriginElement();
-
- // Or if it is an unmatched element
- crossReference = crossReference || eReference == MatchPackage.eINSTANCE.getUnmatchElement_Element();
-
- if (crossReference) {
- super.crossReference(eObject, eReference, crossReferencedEObject);
- }
-
- return crossReference;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/DefaultMergerProvider.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/DefaultMergerProvider.java
deleted file mode 100644
index 569f3ca36..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/DefaultMergerProvider.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge;
-
-import java.util.Map;
-
-import org.eclipse.emf.compare.diff.internal.merge.impl.AttributeChangeLeftTargetMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.AttributeChangeRightTargetMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.AttributeOrderChangeMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.DiffGroupMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.ModelElementChangeLeftTargetMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.ModelElementChangeRightTargetMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.MoveModelElementMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.ReferenceChangeLeftTargetMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.ReferenceChangeRightTargetMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.ReferenceOrderChangeMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.UpdateAttributeMerger;
-import org.eclipse.emf.compare.diff.internal.merge.impl.UpdateReferenceMerger;
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.compare.diff.merge.IMergerProvider;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.util.EMFCompareMap;
-
-/**
- * This will associate all of the basic {@link DiffElement}s with generic merger implementations.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class DefaultMergerProvider implements IMergerProvider {
- /**
- * This map keeps a bridge between a given {@link DiffElement}'s class and the most accurate merger's
- * class for that particular {@link DiffElement}.
- */
- private Map<Class<? extends DiffElement>, Class<? extends IMerger>> mergerTypes;
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergerProvider#getMergers()
- */
- public Map<Class<? extends DiffElement>, Class<? extends IMerger>> getMergers() {
- if (mergerTypes == null) {
- mergerTypes = new EMFCompareMap<Class<? extends DiffElement>, Class<? extends IMerger>>();
- mergerTypes.put(DiffGroup.class, DiffGroupMerger.class);
- mergerTypes.put(ModelElementChangeRightTarget.class, ModelElementChangeRightTargetMerger.class);
- mergerTypes.put(ModelElementChangeLeftTarget.class, ModelElementChangeLeftTargetMerger.class);
- mergerTypes.put(MoveModelElement.class, MoveModelElementMerger.class);
- mergerTypes.put(ReferenceChangeRightTarget.class, ReferenceChangeRightTargetMerger.class);
- mergerTypes.put(ReferenceChangeLeftTarget.class, ReferenceChangeLeftTargetMerger.class);
- mergerTypes.put(UpdateReference.class, UpdateReferenceMerger.class);
- mergerTypes.put(AttributeChangeRightTarget.class, AttributeChangeRightTargetMerger.class);
- mergerTypes.put(AttributeChangeLeftTarget.class, AttributeChangeLeftTargetMerger.class);
- mergerTypes.put(UpdateAttribute.class, UpdateAttributeMerger.class);
- mergerTypes.put(ReferenceOrderChange.class, ReferenceOrderChangeMerger.class);
- mergerTypes.put(AttributeOrderChange.class, AttributeOrderChangeMerger.class);
- }
- return mergerTypes;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeLeftTargetMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeLeftTargetMerger.java
deleted file mode 100644
index 959b4b363..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeLeftTargetMerger.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.List;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Merger for an {@link AttributeChangeLeftTarget} operation.<br/>
- * <p>
- * Are considered for this merger :
- * <ul>
- * <li>{@link RemoveAttribute}</li>
- * <li>{@link RemoteAddAttribute}</li>
- * </ul>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class AttributeChangeLeftTargetMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final AttributeChangeLeftTarget theDiff = (AttributeChangeLeftTarget)this.diff;
- final EObject origin = theDiff.getLeftElement();
- final Object value = theDiff.getLeftTarget();
- final EAttribute attr = theDiff.getAttribute();
- try {
- EFactory.eRemove(origin, attr.getName(), value);
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final AttributeChangeLeftTarget theDiff = (AttributeChangeLeftTarget)this.diff;
- final EObject target = theDiff.getRightElement();
- final Object value = theDiff.getLeftTarget();
- final EAttribute attr = theDiff.getAttribute();
- try {
- int valueIndex = -1;
- if (attr.isMany()) {
- final EObject leftElement = theDiff.getLeftElement();
- final Object leftValues = leftElement.eGet(attr);
- if (leftValues instanceof List) {
- final List leftValuesList = (List)leftValues;
- valueIndex = leftValuesList.indexOf(value);
- }
- }
- EFactory.eAdd(target, attr.getName(), value, valueIndex);
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeRightTargetMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeRightTargetMerger.java
deleted file mode 100644
index cb29ce18e..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeChangeRightTargetMerger.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.List;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Merger for an {@link AttributeChangeRightTarget} operation.<br/>
- * <p>
- * Are considered for this merger :
- * <ul>
- * <li>{@link AddAttribute}</li>
- * <li>{@link RemoteRemoveAttribute}</li>
- * </ul>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class AttributeChangeRightTargetMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final AttributeChangeRightTarget theDiff = (AttributeChangeRightTarget)this.diff;
- final EObject origin = theDiff.getLeftElement();
- final Object value = theDiff.getRightTarget();
- final EAttribute attr = theDiff.getAttribute();
- try {
- int valueIndex = -1;
- if (attr.isMany()) {
- final EObject rightElement = theDiff.getRightElement();
- final Object rightValues = rightElement.eGet(attr);
- if (rightValues instanceof List) {
- final List rightValuesList = (List)rightValues;
- valueIndex = rightValuesList.indexOf(value);
- }
- }
- EFactory.eAdd(origin, attr.getName(), value, valueIndex);
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final AttributeChangeRightTarget theDiff = (AttributeChangeRightTarget)this.diff;
- final EObject target = theDiff.getRightElement();
- final Object value = theDiff.getRightTarget();
- final EAttribute attr = theDiff.getAttribute();
- try {
- EFactory.eRemove(target, attr.getName(), value);
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeOrderChangeMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeOrderChangeMerger.java
deleted file mode 100644
index 6d2a31538..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/AttributeOrderChangeMerger.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * Merger for an {@link AttributeOrderChange} operation.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-@SuppressWarnings("unchecked")
-public class AttributeOrderChangeMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final AttributeOrderChange theDiff = (AttributeOrderChange)this.diff;
- final EAttribute attribute = theDiff.getAttribute();
- final EObject leftElement = theDiff.getLeftElement();
- final EObject rightElement = theDiff.getRightElement();
-
- final List<Object> leftList = (List<Object>)leftElement.eGet(attribute);
- final List<Object> rightList = (List<Object>)rightElement.eGet(attribute);
-
- /*
- * We need to transform the "left" list into the "right" list, modulo missing values. In practical
- * terms, this means that we'll simply leave untouched any element that has no match in the "right"
- * list (elements that were deleted) while reordering the others in the order they have in the "right"
- * list.
- */
- final List<Object> leftCopy = new ArrayList<Object>(leftList);
- final List<Object> result = new ArrayList<Object>(leftList.size());
- // Add all unmatched values in the result list
- for (int i = 0; i < leftList.size(); i++) {
- final Object left = leftList.get(i);
-
- boolean hasMatch = false;
- for (int j = 0; !hasMatch && j < rightList.size(); j++) {
- hasMatch = !areDistinctValues(left, rightList.get(j));
- }
-
- if (!hasMatch) {
- leftCopy.remove(left);
- result.add(left);
- }
- }
- // Then reorder according to the right list's order
- for (int i = 0; i < rightList.size(); i++) {
- final Object right = rightList.get(i);
-
- Object leftMatch = null;
- for (int j = 0; leftMatch == null && j < leftCopy.size(); j++) {
- if (!areDistinctValues(right, leftCopy.get(j))) {
- leftMatch = leftCopy.get(j);
- }
- }
-
- if (leftMatch != null) {
- leftCopy.remove(leftMatch);
- result.add(leftMatch);
- }
- }
- // Finally, set the value of our attribute to this new list
- leftElement.eSet(attribute, result);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final AttributeOrderChange theDiff = (AttributeOrderChange)this.diff;
- final EAttribute attribute = theDiff.getAttribute();
- final EObject leftElement = theDiff.getLeftElement();
- final EObject rightElement = theDiff.getRightElement();
-
- final List<Object> leftList = (List<Object>)leftElement.eGet(attribute);
- final List<Object> rightList = (List<Object>)rightElement.eGet(attribute);
-
- /*
- * We need to transform the "right" list into the "left" list, modulo missing values. In practical
- * terms, this means that we'll simply leave untouched any element that has no match in the "left"
- * list (elements that were added) while reordering the others in the order they have in the "left"
- * list.
- */
- final List<Object> rightCopy = new ArrayList<Object>(rightList);
- final List<Object> result = new ArrayList<Object>(rightList.size());
- // Add all unmatched values in the result list
- for (int i = 0; i < rightList.size(); i++) {
- final Object right = rightList.get(i);
-
- boolean hasMatch = false;
- for (int j = 0; !hasMatch && j < leftList.size(); j++) {
- hasMatch = !areDistinctValues(right, leftList.get(j));
- }
-
- if (!hasMatch) {
- rightCopy.remove(right);
- result.add(right);
- }
- }
- // Then reorder according to the left list's order
- for (int i = 0; i < leftList.size(); i++) {
- final Object left = leftList.get(i);
-
- Object rightMatch = null;
- for (int j = 0; rightMatch == null && j < rightCopy.size(); j++) {
- if (!areDistinctValues(left, rightCopy.get(j))) {
- rightMatch = rightCopy.get(j);
- }
- }
-
- if (rightMatch != null) {
- rightCopy.remove(rightMatch);
- result.add(rightMatch);
- }
- }
- // Finally, set the value of our attribute to this new list
- rightElement.eSet(attribute, result);
- }
-
- /**
- * Compare values by equality handling specifics of EMF.
- *
- * @param left
- * object 1.
- * @param right
- * object 2
- * @return true if both objects are not equals.
- */
- private static boolean areDistinctValues(Object left, Object right) {
- final boolean distinct;
- if (left instanceof EEnumLiteral && right instanceof EEnumLiteral) {
- final StringBuilder value1 = new StringBuilder();
- value1.append(((EEnumLiteral)left).getLiteral()).append(((EEnumLiteral)left).getValue());
- final StringBuilder value2 = new StringBuilder();
- value2.append(((EEnumLiteral)right).getLiteral()).append(((EEnumLiteral)right).getValue());
- distinct = !value1.toString().equals(value2.toString());
- } else if (left != null && left.getClass().isArray()) {
- // [299641] compare arrays by their content instead of instance equality
- distinct = areDistinctArrays(left, right);
- } else if (left instanceof FeatureMap.Entry || right instanceof FeatureMap.Entry) {
- distinct = areDistinctEntries(left, right);
- } else {
- distinct = left != null && !left.equals(right) || left == null && left != right;
- }
- return distinct;
- }
-
- /**
- * Compares the two given value while assuming one or both is a {@link FeatureMap.Entry}.
- *
- * @param left
- * Left of the two values to compare.
- * @param right
- * Right of the two values to compare.
- * @return <code>true</code> if the two values are distinct, <code>false</code> otherwise.
- */
- private static boolean areDistinctEntries(Object left, Object right) {
- final boolean distinct;
- if (left instanceof FeatureMap.Entry && right instanceof FeatureMap.Entry) {
- distinct = areDistinctValues(((FeatureMap.Entry)left).getValue(),
- ((FeatureMap.Entry)right).getValue());
- } else if (left instanceof FeatureMap.Entry) {
- distinct = areDistinctValues(((FeatureMap.Entry)left).getValue(), right);
- } else {
- distinct = areDistinctValues(left, ((FeatureMap.Entry)right).getValue());
- }
- return distinct;
- }
-
- /**
- * Compares two values as arrays, checking that the length and content of both matches each other.
- *
- * @param left
- * The value of the attribute from the left compare resource.
- * @param right
- * The value of the attribute from the right compare resource.
- * @return <code>true</code> if the <code>left</code> value is distinct from the <code>right</code> value.
- */
- private static boolean areDistinctArrays(Object left, Object right) {
- boolean distinct = false;
- // we know left is a non-null array.
- if (right == null || !right.getClass().isArray()) {
- distinct = true;
- } else {
- final int leftLength = Array.getLength(left);
- final int rightLength = Array.getLength(right);
- if (leftLength != rightLength) {
- distinct = true;
- } else {
- for (int i = 0; i < leftLength; i++) {
- final Object leftElement = Array.get(left, i);
- final Object rightElement = Array.get(right, i);
- if (areDistinctValues(leftElement, rightElement)) {
- distinct = true;
- break;
- }
- }
- }
- }
- return distinct;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffExtensionMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffExtensionMerger.java
deleted file mode 100644
index 8b49d35cf..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffExtensionMerger.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-
-/**
- * Merger for an {@link DiffExtension} operation.<br/>
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-public class DiffExtensionMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
-
- @Override
- public void doApplyInOrigin() {
- // TODO code diff extension merger
- // final AbstractDiffExtension extension = (AbstractDiffExtension)this.diff;
- // if (!extension.providesMerger()) {
- // /*
- // * No merger is provided so we'll browse the hidden elements and merge them..
- // */
- // for (final Iterator<DiffElement> iterator = extension.getHideElements().iterator();
- // iterator.hasNext(); ) {
- // final DiffElement hidden = iterator.next();
- // final AbstractMerger merger = MergeFactory.createMerger(hidden);
- // merger.applyInOrigin();
- // }
- // } else {
- // extension.getMerger().applyInOrigin();
- // }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- // TODO code diff extension merger
- // final AbstractDiffExtension extension = (AbstractDiffExtension)this.diff;
- // if (!extension.providesMerger()) {
- // /*
- // * No merger is provided so we'll browse the hidden elements and merge them..
- // */
- // for (final Iterator<DiffElement> iterator = extension.getHideElements().iterator();
- // iterator.hasNext(); ) {
- // final DiffElement hidden = iterator.next();
- // final AbstractMerger merger = MergeFactory.createMerger(hidden);
- // merger.undoInTarget();
- // }
- // } else {
- // extension.getMerger().undoInTarget();
- // }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffGroupMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffGroupMerger.java
deleted file mode 100644
index eba9467b0..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/DiffGroupMerger.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.merge.service.MergeService;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-
-/**
- * This merger will handle DiffGroup merging by recursively create mergers on each of its contents.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class DiffGroupMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#applyInOrigin()
- */
- @Override
- public void applyInOrigin() {
- // Creates a temporary list to avoid ConcurentModificationExceptions
- final List<DiffElement> subDiffs = new ArrayList<DiffElement>(diff.getSubDiffElements());
- MergeService.merge(subDiffs, false);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#undoInTarget()
- */
- @Override
- public void undoInTarget() {
- // Creates a temporary list to avoid ConcurentModificationExceptions
- final List<DiffElement> subDiffs = new ArrayList<DiffElement>(diff.getSubDiffElements());
- MergeService.merge(subDiffs, true);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeLeftTargetMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeLeftTargetMerger.java
deleted file mode 100644
index 27d80f7bf..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeLeftTargetMerger.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * Merger for an {@link ModelElementChangeLeftTarget} operation.<br/>
- * <p>
- * Are considered for this merger :
- * <ul>
- * <li>AddModelElement</li>
- * <li>RemoteRemoveModelElement</li>
- * </ul>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class ModelElementChangeLeftTargetMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- protected void doApplyInOrigin() {
- final ModelElementChangeLeftTarget theDiff = (ModelElementChangeLeftTarget)this.diff;
- final EObject element = theDiff.getLeftElement();
- final EObject parent = theDiff.getLeftElement().eContainer();
- EcoreUtil.remove(element);
- // now removes all the dangling references
- removeDanglingReferences(parent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- protected void doUndoInTarget() {
- final ModelElementChangeLeftTarget theDiff = (ModelElementChangeLeftTarget)this.diff;
- // we should copy the element to the Origin one.
- final EObject origin = theDiff.getRightParent();
- final EObject element = theDiff.getLeftElement();
- final EObject newOne = copy(element);
- final EReference ref = element.eContainmentFeature();
- if (ref != null) {
- try {
- int elementIndex = -1;
- if (ref.isMany()) {
- final Object containmentRefVal = element.eContainer().eGet(ref);
- if (containmentRefVal instanceof List<?>) {
- @SuppressWarnings("unchecked")
- final List<EObject> listVal = (List<EObject>)containmentRefVal;
- elementIndex = listVal.indexOf(element);
- }
- }
- EFactory.eAdd(origin, ref.getName(), newOne, elementIndex, true);
- setXMIID(newOne, getXMIID(element));
- } catch (final FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- } else if (origin == null && getDiffModel().getRightRoots().size() > 0) {
- getDiffModel().getRightRoots().get(0).eResource().getContents().add(newOne);
- } else if (origin != null) {
- origin.eResource().getContents().add(newOne);
- } else {
- // FIXME throw exception : couldn't merge this
- }
- // we should now have a look for RemovedReferencesLinks needing elements to apply
- final Iterator<EObject> siblings = getDiffModel().eAllContents();
- while (siblings.hasNext()) {
- final Object op = siblings.next();
- if (op instanceof ReferenceChangeLeftTarget) {
- final ReferenceChangeLeftTarget link = (ReferenceChangeLeftTarget)op;
- // now if I'm in the target References I should put my copy in the origin
- if (link.getRightTarget() != null && link.getRightTarget() == element) {
- link.setLeftTarget(newOne);
- }
- } else if (op instanceof ReferenceOrderChange) {
- final ReferenceOrderChange link = (ReferenceOrderChange)op;
- if (link.getRightElement() == origin && link.getReference() == ref) {
- final ListIterator<EObject> targetIterator = link.getRightTarget().listIterator();
- boolean replaced = false;
- while (!replaced && targetIterator.hasNext()) {
- final EObject target = targetIterator.next();
- if (target.eIsProxy()
- && equalProxyURIs(((InternalEObject)target).eProxyURI(),
- EcoreUtil.getURI(element))) {
- targetIterator.set(newOne);
- replaced = true;
- }
- }
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#getDependencies(boolean)
- */
- @Override
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- if (!applyInOrigin) {
- return diff.getRequires();
- }
- return super.getDependencies(applyInOrigin);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeRightTargetMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeRightTargetMerger.java
deleted file mode 100644
index 874405d2b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ModelElementChangeRightTargetMerger.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * Merger for an {@link ModelElementChangeRightTarget} operation.<br/>
- * <p>
- * Are considered for this merger :
- * <ul>
- * <li>RemoveModelElement</li>
- * <li>RemoteAddModelElement</li>
- * </ul>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class ModelElementChangeRightTargetMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final ModelElementChangeRightTarget theDiff = (ModelElementChangeRightTarget)this.diff;
- final EObject origin = theDiff.getLeftParent();
- final EObject element = theDiff.getRightElement();
- final EObject newOne = copy(element);
- final EReference ref = element.eContainmentFeature();
- if (ref != null) {
- try {
- int expectedIndex = -1;
- if (ref.isMany()) {
- final Object containmentRefVal = element.eContainer().eGet(ref);
- if (containmentRefVal instanceof List<?>) {
- @SuppressWarnings("unchecked")
- final List<EObject> listVal = (List<EObject>)containmentRefVal;
- expectedIndex = listVal.indexOf(element);
- }
- }
- EFactory.eAdd(origin, ref.getName(), newOne, expectedIndex, true);
- setXMIID(newOne, getXMIID(element));
- } catch (final FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- } else if (origin == null && getDiffModel().getLeftRoots().size() > 0) {
- getDiffModel().getLeftRoots().get(0).eResource().getContents().add(newOne);
- } else if (origin != null) {
- origin.eResource().getContents().add(newOne);
- } else {
- // FIXME Throw exception : couldn't merge this
- }
- // we should now have a look for AddReferencesLinks needing this object
- final Iterator<EObject> siblings = getDiffModel().eAllContents();
- while (siblings.hasNext()) {
- final DiffElement op = (DiffElement)siblings.next();
- if (op instanceof ReferenceChangeRightTarget) {
- final ReferenceChangeRightTarget link = (ReferenceChangeRightTarget)op;
- // now if I'm in the target References I should put my copy in the origin
- if (link.getLeftTarget() != null && link.getLeftTarget() == element) {
- link.setRightTarget(newOne);
- }
- } else if (op instanceof ReferenceOrderChange) {
- final ReferenceOrderChange link = (ReferenceOrderChange)op;
- if (link.getLeftElement() == origin && link.getReference() == ref) {
- final ListIterator<EObject> targetIterator = link.getLeftTarget().listIterator();
- boolean replaced = false;
- while (!replaced && targetIterator.hasNext()) {
- final EObject target = targetIterator.next();
- if (target.eIsProxy()
- && equalProxyURIs(((InternalEObject)target).eProxyURI(),
- EcoreUtil.getURI(element))) {
- targetIterator.set(newOne);
- replaced = true;
- }
- }
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final ModelElementChangeRightTarget theDiff = (ModelElementChangeRightTarget)this.diff;
- final EObject element = theDiff.getRightElement();
- final EObject parent = theDiff.getRightElement().eContainer();
- EcoreUtil.remove(element);
- // now removes all the dangling references
- removeDanglingReferences(parent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#canUndoInTarget()
- */
- @Override
- public boolean canUndoInTarget() {
- final ModelElementChangeRightTarget theDiff = (ModelElementChangeRightTarget)this.diff;
- final boolean isRightElementNotNull = theDiff.getRightElement() != null;
- return isRightElementNotNull;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#getDependencies(boolean)
- */
- @Override
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- if (applyInOrigin) {
- return diff.getRequires();
- }
- return super.getDependencies(applyInOrigin);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/MoveModelElementMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/MoveModelElementMerger.java
deleted file mode 100644
index 34c2a976f..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/MoveModelElementMerger.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.List;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * Merger for a {@link MoveModelElement} operation.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class MoveModelElementMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @SuppressWarnings("unchecked")
- @Override
- public void doApplyInOrigin() {
- final MoveModelElement theDiff = (MoveModelElement)this.diff;
- final EObject leftTarget = theDiff.getLeftTarget();
- final EObject leftElement = theDiff.getLeftElement();
- final EReference ref = theDiff.getRightElement().eContainmentFeature();
- if (ref != null) {
- // ordering handling:
- int index = -1;
- final EObject rightElementParent = theDiff.getRightElement().eContainer();
- final Object rightRefValue = rightElementParent.eGet(ref);
- if (rightRefValue instanceof List) {
- final List<Object> refRightValueList = (List<Object>)rightRefValue;
- index = refRightValueList.indexOf(theDiff.getRightElement());
- }
-
- try {
- // We'll store the element's ID because moving an element deletes its XMI ID
- final String elementID = getXMIID(leftElement);
- EcoreUtil.remove(leftElement);
- EFactory.eAdd(leftTarget, ref.getName(), leftElement, index, true);
- // Sets anew the element's ID
- setXMIID(leftElement, elementID);
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- } else {
- // shouldn't be here
- assert false;
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @SuppressWarnings("unchecked")
- @Override
- public void doUndoInTarget() {
- final MoveModelElement theDiff = (MoveModelElement)this.diff;
- final EObject rightTarget = theDiff.getRightTarget();
- final EObject rightElement = theDiff.getRightElement();
- final EReference ref = theDiff.getLeftElement().eContainmentFeature();
- if (ref != null) {
- // ordering handling:
- int index = -1;
- final EObject leftElementParent = theDiff.getLeftElement().eContainer();
- final Object leftRefValue = leftElementParent.eGet(ref);
- if (leftRefValue instanceof List) {
- final List<Object> refLeftValueList = (List<Object>)leftRefValue;
- index = refLeftValueList.indexOf(theDiff.getLeftElement());
- }
-
- try {
- final String elementID = getXMIID(rightElement);
- EcoreUtil.remove(rightElement);
- EFactory.eAdd(rightTarget, ref.getName(), rightElement, index, true);
- setXMIID(rightElement, elementID);
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- } else {
- // shouldn't be here
- assert false;
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeLeftTargetMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeLeftTargetMerger.java
deleted file mode 100644
index da9bced90..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeLeftTargetMerger.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.merge.service.MergeService;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * Merger for an {@link ReferenceChangeLeftTarget} operation.<br/>
- * <p>
- * Are considered for this merger :
- * <ul>
- * <li>AddReferenceValue</li>
- * <li>RemoteRemoveReferenceValue</li>
- * </ul>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class ReferenceChangeLeftTargetMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final ReferenceChangeLeftTarget theDiff = (ReferenceChangeLeftTarget)this.diff;
- final EObject element = theDiff.getLeftElement();
- final EObject leftTarget = theDiff.getLeftTarget();
- try {
- EFactory.eRemove(element, theDiff.getReference().getName(), leftTarget);
- } catch (final FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- // we should now have a look for AddReferencesLinks needing this object
- final Iterator<EObject> siblings = getDiffModel().eAllContents();
- while (siblings.hasNext()) {
- final DiffElement op = (DiffElement)siblings.next();
- if (op instanceof ReferenceChangeLeftTarget) {
- final ReferenceChangeLeftTarget link = (ReferenceChangeLeftTarget)op;
- // now if I'm in the target References I should put my copy in the origin
- if (link.getReference().equals(theDiff.getReference().getEOpposite())
- && link.getLeftTarget().equals(element)) {
- removeFromContainer(link);
- }
- } else if (op instanceof ResourceDependencyChange) {
- final ResourceDependencyChange link = (ResourceDependencyChange)op;
- final Resource res = link.getRoots().get(0).eResource();
- if (res == leftTarget.eResource()) {
- EcoreUtil.remove(link);
- res.unload();
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final ReferenceChangeLeftTarget theDiff = (ReferenceChangeLeftTarget)this.diff;
- final EReference reference = theDiff.getReference();
- final EObject element = theDiff.getRightElement();
- final EObject leftTarget = theDiff.getLeftTarget();
- final EObject rightTarget = theDiff.getRightTarget();
-
- int index = -1;
- if (reference.isMany()) {
- final EObject leftElement = theDiff.getLeftElement();
- final Object leftRefValue = leftElement.eGet(reference);
- if (leftRefValue instanceof List) {
- final List refLeftValueList = (List)leftRefValue;
- index = refLeftValueList.indexOf(leftTarget);
- }
- }
- final EObject copiedValue = MergeService.getCopier(diff).copyReferenceValue(reference, element,
- leftTarget, rightTarget, index);
-
- // we should now have a look for AddReferencesLinks needing this object
- final Iterator<EObject> siblings = getDiffModel().eAllContents();
- while (siblings.hasNext()) {
- final DiffElement op = (DiffElement)siblings.next();
- if (op instanceof ReferenceChangeLeftTarget) {
- final ReferenceChangeLeftTarget link = (ReferenceChangeLeftTarget)op;
- // now if I'm in the target References I should put my copy in the origin
- if (link.getReference().equals(reference.getEOpposite())
- && link.getLeftTarget().equals(element)) {
- removeFromContainer(link);
- }
- } else if (op instanceof ReferenceOrderChange) {
- final ReferenceOrderChange link = (ReferenceOrderChange)op;
- if (link.getLeftElement() == element && link.getReference() == reference) {
- final ListIterator<EObject> targetIterator = link.getLeftTarget().listIterator();
- boolean replaced = false;
- while (!replaced && targetIterator.hasNext()) {
- final EObject target = targetIterator.next();
- if (target.eIsProxy()
- && equalProxyURIs(((InternalEObject)target).eProxyURI(),
- EcoreUtil.getURI(leftTarget))) {
- targetIterator.set(copiedValue);
- replaced = true;
- }
- }
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#getDependencies(boolean)
- */
- @Override
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- if (!applyInOrigin) {
- return diff.getRequires();
- }
- return super.getDependencies(applyInOrigin);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeRightTargetMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeRightTargetMerger.java
deleted file mode 100644
index e6be49f45..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceChangeRightTargetMerger.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.merge.service.MergeService;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-/**
- * Merger for an {@link ReferenceChangeRightTarget} operation.<br/>
- * <p>
- * Are considered for this merger :
- * <ul>
- * <li>RemoveReferenceValue</li>
- * <li>RemoteAddReferenceValue</li>
- * </ul>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class ReferenceChangeRightTargetMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final ReferenceChangeRightTarget theDiff = (ReferenceChangeRightTarget)this.diff;
- final EReference reference = theDiff.getReference();
- final EObject element = theDiff.getLeftElement();
- final EObject rightTarget = theDiff.getRightTarget();
- final EObject leftTarget = theDiff.getLeftTarget();
-
- // ordering handling:
- int index = -1;
- if (reference.isMany()) {
- final EObject rightElement = theDiff.getRightElement();
- final Object rightRefValue = rightElement.eGet(reference);
- if (rightRefValue instanceof List) {
- final List refRightValueList = (List)rightRefValue;
- index = refRightValueList.indexOf(rightTarget);
- }
- }
- final EObject copiedValue = MergeService.getCopier(diff).copyReferenceValue(reference, element,
- rightTarget, leftTarget, index);
-
- // We'll now look through this reference's eOpposite as they are already taken care of
- final Iterator<EObject> related = getDiffModel().eAllContents();
- while (related.hasNext()) {
- final DiffElement op = (DiffElement)related.next();
- if (op instanceof ReferenceChangeRightTarget) {
- final ReferenceChangeRightTarget link = (ReferenceChangeRightTarget)op;
- // If this is my eOpposite, delete it from the DiffModel (merged along with this one)
- if (link.getReference().equals(theDiff.getReference().getEOpposite())
- && link.getRightTarget().equals(element)) {
- removeFromContainer(link);
- }
- } else if (op instanceof ReferenceOrderChange) {
- final ReferenceOrderChange link = (ReferenceOrderChange)op;
- if (link.getLeftElement() == element && link.getReference() == reference) {
- final ListIterator<EObject> targetIterator = link.getLeftTarget().listIterator();
- boolean replaced = false;
- while (!replaced && targetIterator.hasNext()) {
- final EObject target = targetIterator.next();
- if (target.eIsProxy()
- && equalProxyURIs(((InternalEObject)target).eProxyURI(),
- EcoreUtil.getURI(rightTarget))) {
- targetIterator.set(copiedValue);
- replaced = true;
- }
- }
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final ReferenceChangeRightTarget theDiff = (ReferenceChangeRightTarget)this.diff;
- final EObject element = theDiff.getRightElement();
- final EObject rightTarget = theDiff.getRightTarget();
- try {
- EFactory.eRemove(element, theDiff.getReference().getName(), rightTarget);
- } catch (final FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- // we should now have a look for AddReferencesLinks needing this object
- final Iterator<EObject> related = getDiffModel().eAllContents();
- while (related.hasNext()) {
- final DiffElement op = (DiffElement)related.next();
- if (op instanceof ReferenceChangeRightTarget) {
- final ReferenceChangeRightTarget link = (ReferenceChangeRightTarget)op;
- // now if I'm in the target References I should put my copy in the origin
- if (link.getReference().equals(theDiff.getReference().getEOpposite())
- && link.getRightTarget().equals(element)) {
- removeFromContainer(link);
- }
- } else if (op instanceof ResourceDependencyChange) {
- final ResourceDependencyChange link = (ResourceDependencyChange)op;
- final Resource res = link.getRoots().get(0).eResource();
- if (res == rightTarget.eResource()) {
- EcoreUtil.remove(link);
- res.unload();
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#getDependencies(boolean)
- */
- @Override
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- if (applyInOrigin) {
- return diff.getRequires();
- }
- return super.getDependencies(applyInOrigin);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceOrderChangeMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceOrderChangeMerger.java
deleted file mode 100644
index ad7cfed18..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/ReferenceOrderChangeMerger.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Lists;
-
-import java.util.Collection;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-
-/**
- * Merger for a {@link ReferenceOrderChange} operation.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class ReferenceOrderChangeMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final ReferenceOrderChange theDiff = (ReferenceOrderChange)this.diff;
- final EObject leftElement = theDiff.getLeftElement();
-
- final Collection<EObject> target = Lists.newArrayList(Collections2.filter(theDiff.getLeftTarget(),
- new Predicate<EObject>() {
- public boolean apply(EObject input) {
- return !input.eIsProxy()
- || !DefaultMerger.isEMFCompareProxy(((InternalEObject)input).eProxyURI());
- }
- }));
-
- try {
- EFactory.eSet(leftElement, theDiff.getReference().getName(), target);
- } catch (final FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final ReferenceOrderChange theDiff = (ReferenceOrderChange)this.diff;
- final EObject rightElement = theDiff.getRightElement();
-
- final Collection<EObject> target = Lists.newArrayList(Collections2.filter(theDiff.getRightTarget(),
- new Predicate<EObject>() {
- public boolean apply(EObject input) {
- return !input.eIsProxy()
- || !DefaultMerger.isEMFCompareProxy(((InternalEObject)input).eProxyURI());
- }
- }));
-
- try {
- EFactory.eSet(rightElement, theDiff.getReference().getName(), target);
- } catch (final FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateAttributeMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateAttributeMerger.java
deleted file mode 100644
index 3ce1c2dd2..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateAttributeMerger.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.util.EFactory;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Merger for an {@link UpdateAttribute}.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class UpdateAttributeMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final UpdateAttribute theDiff = (UpdateAttribute)this.diff;
- final EObject element = theDiff.getRightElement();
- final EObject origin = theDiff.getLeftElement();
- final EAttribute attr = theDiff.getAttribute();
- try {
- EFactory.eSet(origin, attr.getName(), EFactory.eGet(element, attr.getName()));
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final UpdateAttribute theDiff = (UpdateAttribute)this.diff;
- final EObject element = theDiff.getRightElement();
- final EObject origin = theDiff.getLeftElement();
- final EAttribute attr = theDiff.getAttribute();
- try {
- EFactory.eSet(element, attr.getName(), EFactory.eGet(origin, attr.getName()));
- } catch (FactoryException e) {
- EMFComparePlugin.log(e, true);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateReferenceMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateReferenceMerger.java
deleted file mode 100644
index 4e618add7..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/UpdateReferenceMerger.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.merge.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.merge.service.MergeService;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * Merger for an {@link UpdateUniqueReferenceValue} operation.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class UpdateReferenceMerger extends DefaultMerger {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doApplyInOrigin()
- */
- @Override
- public void doApplyInOrigin() {
- final UpdateReference theDiff = (UpdateReference)this.diff;
- final EReference reference = theDiff.getReference();
- final EObject element = theDiff.getLeftElement();
- final EObject leftTarget = (EObject)theDiff.getRightElement().eGet(reference);
- final EObject matchedLeftTarget = theDiff.getLeftTarget();
-
- if (leftTarget == null) {
- // We're unsetting the value, no need to copy
- element.eUnset(reference);
- } else {
- MergeService.getCopier(diff).copyReferenceValue(reference, element, leftTarget,
- matchedLeftTarget, -1);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.api.AbstractMerger#doUndoInTarget()
- */
- @Override
- public void doUndoInTarget() {
- final UpdateReference theDiff = (UpdateReference)this.diff;
- final EReference reference = theDiff.getReference();
- final EObject element = theDiff.getRightElement();
- final EObject rightTarget = (EObject)theDiff.getLeftElement().eGet(reference);
- final EObject matchedRightTarget = theDiff.getRightTarget();
-
- if (rightTarget == null) {
- // We're unsetting the value, no need to copy
- element.eUnset(reference);
- } else {
- MergeService.getCopier(diff).copyReferenceValue(reference, element, rightTarget,
- matchedRightTarget, -1);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#getDependencies(boolean)
- */
- @Override
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- final List<DiffElement> diffs = diff.getRequires();
- final List<DiffElement> result = new ArrayList<DiffElement>();
- for (DiffElement diffElement : diffs) {
- if (applyInOrigin && diffElement instanceof ModelElementChangeRightTarget) {
- result.add(diffElement);
- } else if (!applyInOrigin && diffElement instanceof ModelElementChangeLeftTarget) {
- result.add(diffElement);
- }
- }
- return result;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/package-info.java
deleted file mode 100644
index ed11fa0bb..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/impl/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * This package holds internal classes for the generic mergers.
- * <p>
- * None of the classes defined here are intended to be used by clients.
- * </p>
- *
- * @since 0.8
- */
-package org.eclipse.emf.compare.diff.internal.merge.impl; \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/package-info.java
deleted file mode 100644
index f7f808a14..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/merge/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * This package holds internal classes for the generic mergers and their provider.
- * <p>
- * None of the classes defined here are intended to be used by clients.
- * </p>
- *
- * @since 0.8
- */
-package org.eclipse.emf.compare.diff.internal.merge; \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DefaultDiffEngineSelector.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DefaultDiffEngineSelector.java
deleted file mode 100644
index aa49e1bd3..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DefaultDiffEngineSelector.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.service;
-
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.service.DiffEngineDescriptor;
-import org.eclipse.emf.compare.diff.service.IDiffEngineSelector;
-
-/**
- * This default implementation of an {@link IDiffEngineSelector} simply selects the first diff engine of the
- * passed list.
- *
- * @author <a href="laurent.goubet@obeo.fr">Laurent Goubet</a>
- * @since 1.0
- */
-public class DefaultDiffEngineSelector implements IDiffEngineSelector {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.service.IDiffEngineSelector#selectDiffEngine(java.util.List)
- */
- public DiffEngineDescriptor selectDiffEngine(List<DiffEngineDescriptor> engines) {
- DiffEngineDescriptor engine = null;
-
- if (!engines.isEmpty()) {
- engine = engines.get(0);
- }
-
- return engine;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DiffExtensionDescriptor.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DiffExtensionDescriptor.java
deleted file mode 100644
index 75425de7f..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/internal/service/DiffExtensionDescriptor.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.internal.service;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-
-/**
- * The engine descriptor represents a diff extension contribution trough the extension point.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-public class DiffExtensionDescriptor {
- /**
- * Content type on which applying this diff extension.
- *
- * @since 1.1
- */
- protected final String contentType;
-
- /** Class name of this {@link DiffExtension}. */
- protected final String diffextensionClassName;
-
- /** Configuration element of this descriptor. */
- protected final IConfigurationElement element;
-
- /** File extension on which applying this diff extension. */
- protected final String fileExtension;
-
- /**
- * Namespace on which applying this diff extension.
- *
- * @since 1.1
- */
- protected final String namespace;
-
- /** {@link DiffExtension} this descriptor describes. */
- private AbstractDiffExtension diffExtension;
-
- /**
- * Instantiate the descriptor given its configuration.
- *
- * @param configuration
- * {@link IConfigurationElement configuration element} of this descriptor.
- */
- public DiffExtensionDescriptor(IConfigurationElement configuration) {
- element = configuration;
- diffextensionClassName = getAttribute("extensionClass", null); //$NON-NLS-1$
-
- contentType = getAttribute("contentType", ""); //$NON-NLS-1$ //$NON-NLS-2$
- namespace = getAttribute("namespace", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if ("".equals(contentType) && "".equals(namespace)) { //$NON-NLS-1$ //$NON-NLS-2$
- fileExtension = getAttribute("fileExtension", "*"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- fileExtension = getAttribute("fileExtension", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
- }
-
- /**
- * Returns the content type associated with this contribution.
- *
- * @return The content type associated with this contribution.
- * @since 1.1
- */
- public String getContentType() {
- return contentType;
- }
-
- /**
- * Returns this {@link DiffExtension} class name.
- *
- * @return The diff extension class name.
- */
- public String getdDiffExtensionClassName() {
- return diffextensionClassName;
- }
-
- /**
- * Returns this {@link DiffExtension} instance.
- *
- * @return the diff extension instance.
- */
- public AbstractDiffExtension getDiffExtensionInstance() {
- if (diffExtension == null) {
- try {
- diffExtension = (AbstractDiffExtension)element.createExecutableExtension("extensionClass"); //$NON-NLS-1$
- } catch (CoreException e) {
- EMFComparePlugin.log(e, false);
- }
- }
- return diffExtension;
- }
-
- /**
- * Returns the file extension associated with this contribution.
- *
- * @return The file extension associated with this contribution.
- */
- public String getFileExtension() {
- return fileExtension;
- }
-
- /**
- * Returns the namespace associated with this contribution.
- *
- * @return The namespace associated with this contribution.
- * @since 1.1
- */
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * Returns the value of the attribute <code>name</code> of this descriptor's configuration element. if the
- * attribute hasn't been set, we'll return <code>defaultValue</code> instead.
- *
- * @param name
- * Name of the attribute we seek the value of.
- * @param defaultValue
- * Value to return if the attribute hasn't been set.
- * @return The value of the attribute <code>name</code>, <code>defaultValue</code> if it hasn't been set.
- */
- private String getAttribute(String name, String defaultValue) {
- final String value = element.getAttribute(name);
- if (value != null)
- return value;
- if (defaultValue != null)
- return defaultValue;
- throw new IllegalArgumentException(EMFCompareDiffMessages.getString(
- "Descriptor.MissingAttribute", name)); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/AbstractMergeListener.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/AbstractMergeListener.java
deleted file mode 100644
index 5540a98af..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/AbstractMergeListener.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-/**
- * An abstract implementation of a listener to receive merge events. All methods in this class are empty,
- * clients should override the method corresponding to whichever event they are interested in handling
- * notifications for.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public abstract class AbstractMergeListener implements IMergeListener {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeDiffEnd(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeDiffEnd(MergeEvent event) {
- // empty implementation
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeDiffStart(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeDiffStart(MergeEvent event) {
- // empty implementation
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeOperationEnd(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeOperationEnd(MergeEvent event) {
- // empty implementation
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeOperationStart(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeOperationStart(MergeEvent event) {
- // empty implementation
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultExtensionMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultExtensionMerger.java
deleted file mode 100644
index 528b7d652..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultExtensionMerger.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-
-/**
- * Basic implementation of a {@link DefaultMerger}. Clients can extend this class.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- * @since 1.3
- */
-public class DefaultExtensionMerger extends DefaultMerger {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.DefaultMerger#getDependencies(boolean)
- */
- @Override
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- final List<DiffElement> requiredDiffs = diff.getRequires();
- return getBusinessDependencies(applyInOrigin, requiredDiffs);
- }
-
- /**
- * Get the difference dependencies to consider in the context of the merge process.
- *
- * @param applyInOrigin
- * Direction of merge.
- * @param requiredDiffs
- * The required differences.
- * @return The required differences to keep.
- */
- protected List<DiffElement> getBusinessDependencies(boolean applyInOrigin, List<DiffElement> requiredDiffs) {
- final List<DiffElement> result = new ArrayList<DiffElement>();
- for (DiffElement diffElement : requiredDiffs) {
- if (!(diffElement instanceof AbstractDiffExtension)
- || diffElement instanceof AbstractDiffExtension
- && isBusinessDependency(applyInOrigin, (AbstractDiffExtension)diffElement)) {
- result.add(diffElement);
- }
- }
- return result;
- }
-
- /**
- * Check if the given required difference extension has to be considered in relation to the direction of
- * merge.
- *
- * @param applyInOrigin
- * Direction of merge.
- * @param requiredDiff
- * The required difference.
- * @return True if it has to be considered in the merge.
- */
- protected boolean isBusinessDependency(boolean applyInOrigin, AbstractDiffExtension requiredDiff) {
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultMerger.java
deleted file mode 100644
index 9bbac5d41..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/DefaultMerger.java
+++ /dev/null
@@ -1,552 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.compare.diff.merge.service.MergeFactory;
-import org.eclipse.emf.compare.diff.merge.service.MergeService;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EGenericType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-
-/**
- * Basic implementation of an {@link IMerger}. Clients can extend this class instead of implementing IMerger
- * to avoid reimplementing all methods.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class DefaultMerger implements IMerger {
- /** The scheme used for all of EMF Compare's internal proxies. */
- private static final String PROXY_SCHEME = "emfCompareProxy"; //$NON-NLS-1$
-
- /** Stores the differences which are merged or being merged during a merge operation. */
- private static List<DiffElement> mergedDiffs;
-
- /** This listener will be used to reset the {@link mergedDiffs} list at the end of a merge operation. */
- private static MergedDiffsListener mergedDiffslistener;
-
- /** {@link DiffElement} to be merged by this merger. */
- protected DiffElement diff;
-
- /** Keeps a reference on the left resource for this merger. */
- @Deprecated
- protected Resource leftResource;
-
- /** Keeps a reference on the right resource for this merger. */
- @Deprecated
- protected Resource rightResource;
-
- /**
- * Reset the {@link mergedDiffs} list.
- *
- * @since 1.3
- */
- protected static void resetMergedDiffs() {
- mergedDiffs = null;
- }
-
- /**
- * Returns <code>true</code> if the given URI is an internal EMF Compare proxy.
- *
- * @param uri
- * The URI to check.
- * @return <code>true</code> if the given URI is an internal EMF Compare proxy.
- * @since 1.3
- */
- public static boolean isEMFCompareProxy(URI uri) {
- return uri.scheme() != null && uri.scheme().equals(PROXY_SCHEME);
- }
-
- /**
- * Checks whether the two given proxy URIs are equal, ignoring EMF Compare's internal
- * {@link #PROXY_PREFIX}.
- *
- * @param uri1
- * First of the two URIs to compare.
- * @param uri2
- * Second of the two URIs to compare.
- * @return <code>true</code> if the two given URIs are equal.
- * @since 1.3
- */
- public static boolean equalProxyURIs(URI uri1, URI uri2) {
- String stringValue1 = uri1.toString();
- String stringValue2 = uri2.toString();
- if (isEMFCompareProxy(uri1)) {
- stringValue1 = stringValue1.substring(PROXY_SCHEME.length() + 2);
- }
- if (isEMFCompareProxy(uri2)) {
- stringValue2 = stringValue2.substring(PROXY_SCHEME.length() + 2);
- }
- return stringValue1.equals(stringValue2);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMerger#applyInOrigin()
- */
- public void applyInOrigin() {
- mergeRequiredDifferences(true);
- doApplyInOrigin();
- postProcess();
- }
-
- /**
- * Applies the modification in the original (left) model.
- *
- * @since 1.3
- */
- protected void doApplyInOrigin() {
- // To specialize in child class.
- }
-
- /**
- * Applies a post processing.
- *
- * @since 1.3
- */
- protected void postProcess() {
- handleMutuallyDerivedReferences();
- ensureXMIIDCopied();
- removeFromContainer(diff);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMerger#canApplyInOrigin()
- */
- public boolean canApplyInOrigin() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMerger#canUndoInTarget()
- */
- public boolean canUndoInTarget() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMerger#setDiffElement(org.eclipse.emf.compare.diff.metamodel.DiffElement)
- */
- public void setDiffElement(DiffElement element) {
- diff = element;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMerger#undoInTarget()
- */
- public void undoInTarget() {
- mergeRequiredDifferences(false);
- doUndoInTarget();
- postProcess();
- }
-
- /**
- * Cancels the modification in the target (right) model.
- *
- * @since 1.3
- */
- protected void doUndoInTarget() {
- // To specialize in child class.
- }
-
- /**
- * Removes the given {@link DiffGroup} from its container if it was its last child, also calls for the
- * same cleanup operation on its hierarchy.
- *
- * @param diffGroup
- * {@link DiffGroup} we want to cleanup.
- */
- protected void cleanDiffGroup(DiffGroup diffGroup) {
- if (diffGroup != null && diffGroup.getSubDiffElements().size() == 0) {
- final EObject parent = diffGroup.eContainer();
- if (parent instanceof DiffGroup) {
- EcoreUtil.remove(diffGroup);
- cleanDiffGroup((DiffGroup)parent);
- }
- }
- }
-
- /**
- * Creates a copy of the given EObject as would {@link EcoreUtil#copy(EObject)} would, except we use
- * specific handling for unmatched references.
- *
- * @param eObject
- * The object to copy.
- * @return the copied object.
- */
- protected EObject copy(EObject eObject) {
- final EMFCompareEObjectCopier copier = MergeService.getCopier(diff);
- final EObject result = copier.copy(eObject);
- copier.copyReferences();
- copier.copyXMIIDs();
- return result;
- }
-
- /**
- * This can be called after a merge operation to ensure that all objects created by the operation share
- * the same XMI ID as their original.
- * <p>
- * Implemented because of bug 351591 : some of the objects we copy mays not have been added to a resource
- * when we check their IDs. We thus need to wait till the merge operation has completed.
- * </p>
- *
- * @since 1.3
- */
- protected void ensureXMIIDCopied() {
- final EMFCompareEObjectCopier copier = MergeService.getCopier(diff);
- copier.copyXMIIDs();
- }
-
- /**
- * Returns the {@link DiffModel} containing the {@link DiffElement} this merger is intended to merge.
- *
- * @return The {@link DiffModel} containing the {@link DiffElement} this merger is intended to merge.
- */
- protected DiffModel getDiffModel() {
- EObject container = diff.eContainer();
- while (container != null) {
- if (container instanceof DiffModel)
- return (DiffModel)container;
- container = container.eContainer();
- }
- return null;
- }
-
- /**
- * Returns the XMI ID of the given {@link EObject} or <code>null</code> if it cannot be resolved.
- *
- * @param object
- * Object which we seek the XMI ID of.
- * @return <code>object</code>'s XMI ID, <code>null</code> if not applicable.
- */
- protected String getXMIID(EObject object) {
- String objectID = null;
- if (object != null && object.eResource() instanceof XMIResource) {
- objectID = ((XMIResource)object.eResource()).getID(object);
- }
- return objectID;
- }
-
- /**
- * Removes all references to the given {@link EObject} from the {@link DiffModel}.
- *
- * @param deletedObject
- * Object to remove all references to.
- */
- protected void removeDanglingReferences(EObject deletedObject) {
- // EObject root = EcoreUtil.getRootContainer(deletedObject);
- // if (root instanceof ComparisonResourceSnapshot) {
- // root = ((ComparisonResourceSnapshot)root).getDiff();
- // }
- // if (root != null) {
- // // FIXME performance, find a way to cache this referencer
- // final Resource res = root.eResource();
- // final EcoreUtil.CrossReferencer referencer;
- // if (res != null && res.getResourceSet() != null) {
- // referencer = new EcoreUtil.CrossReferencer(res.getResourceSet()) {
- // private static final long serialVersionUID = 616050158241084372L;
- //
- // // initializer for this anonymous class
- // {
- // crossReference();
- // }
- //
- // @Override
- // protected boolean crossReference(EObject eObject, EReference eReference,
- // EObject crossReferencedEObject) {
- // if (eReference.isChangeable() && !eReference.isDerived())
- // return crossReferencedEObject.eResource() == null;
- // return false;
- // }
- // };
- // } else if (res != null) {
- // referencer = new EcoreUtil.CrossReferencer(res) {
- // private static final long serialVersionUID = 616050158241084372L;
- //
- // // initializer for this anonymous class
- // {
- // crossReference();
- // }
- //
- // @Override
- // protected boolean crossReference(EObject eObject, EReference eReference,
- // EObject crossReferencedEObject) {
- // if (eReference.isChangeable() && !eReference.isDerived())
- // return crossReferencedEObject.eResource() == null;
- // return false;
- // }
- // };
- // } else {
- // referencer = new EcoreUtil.CrossReferencer(root) {
- // private static final long serialVersionUID = 616050158241084372L;
- //
- // // initializer for this anonymous class
- // {
- // crossReference();
- // }
- //
- // @Override
- // protected boolean crossReference(EObject eObject, EReference eReference,
- // EObject crossReferencedEObject) {
- // if (eReference.isChangeable() && !eReference.isDerived())
- // return crossReferencedEObject.eResource() == null;
- // return false;
- // }
- // };
- // }
- // final Iterator<Map.Entry<EObject, Collection<EStructuralFeature.Setting>>> i = referencer
- // .entrySet().iterator();
- // while (i.hasNext()) {
- // final Map.Entry<EObject, Collection<EStructuralFeature.Setting>> entry = i.next();
- // final Iterator<EStructuralFeature.Setting> j = entry.getValue().iterator();
- // while (j.hasNext()) {
- // EcoreUtil.remove(j.next(), entry.getKey());
- // }
- // }
- // }
- }
-
- /**
- * Removes a {@link DiffElement} from its {@link DiffGroup}.
- *
- * @param diffElement
- * {@link DiffElement} to remove from its container.
- */
- protected void removeFromContainer(DiffElement diffElement) {
- final EObject parent = diffElement.eContainer();
- EcoreUtil.remove(diffElement);
- removeDanglingReferences(parent);
-
- // If diff was contained by a ConflictingDiffElement, we call back this on it
- if (parent instanceof ConflictingDiffElement) {
- removeFromContainer((DiffElement)parent);
- }
-
- // if diff was in a diffGroup and it was the last one, we also remove the diffgroup
- if (parent instanceof DiffGroup) {
- cleanDiffGroup((DiffGroup)parent);
- }
- }
-
- /**
- * Sets the XMI ID of the given {@link EObject} if it belongs in an {@link XMIResource}.
- *
- * @param object
- * Object we want to set the XMI ID of.
- * @param id
- * XMI ID to give to <code>object</code>.
- */
- protected void setXMIID(EObject object, String id) {
- if (object != null && object.eResource() instanceof XMIResource) {
- ((XMIResource)object.eResource()).setID(object, id);
- }
- }
-
- /**
- * Merge the differences required by the current difference.
- *
- * @param applyInOrigin
- * True if the merge has to apply in origin.
- * @since 1.3
- */
- protected void mergeRequiredDifferences(boolean applyInOrigin) {
- if (mergedDiffs == null) {
- mergedDiffs = new ArrayList<DiffElement>();
- if (mergedDiffslistener == null) {
- mergedDiffslistener = new MergedDiffsListener();
- MergeService.addMergeListener(mergedDiffslistener);
- }
- }
- mergedDiffs.add(diff);
-
- for (DiffElement requiredDiff : getDependencies(applyInOrigin)) {
- if (requiredDiff.eContainer() != null && !mergedDiffs.contains(requiredDiff)) {
- final IMerger merger = MergeFactory.createMerger(requiredDiff);
- if (applyInOrigin) {
- merger.applyInOrigin();
- } else {
- merger.undoInTarget();
- }
- }
- }
- }
-
- /**
- * This default merge listener will allow us to reset the {@link #mergedDiffs} list at the end of the
- * merge operation.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
- private class MergedDiffsListener implements IMergeListener {
- /**
- * Default constructor.
- */
- public MergedDiffsListener() {
- // Enhance visibility of the default constructor.
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeDiffEnd(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeDiffEnd(MergeEvent event) {
- // do nothing
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeDiffStart(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeDiffStart(MergeEvent event) {
- // do nothing
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeOperationEnd(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeOperationEnd(MergeEvent event) {
- resetMergedDiffs();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diff.merge.IMergeListener#mergeOperationStart(org.eclipse.emf.compare.diff.merge.MergeEvent)
- */
- public void mergeOperationStart(MergeEvent event) {
- // do nothing
- }
- }
-
- /**
- * Get the dependencies of the difference {@link diff} to merge. These dependencies will be merged before
- * itself. This method may be overridden by a specific merger to choose to exploit or not the 'requires'
- * link of the {@link diff} according to the nature of the merger and the direction of the merge.
- *
- * @param applyInOrigin
- * The direction of the merge.
- * @return The list of the dependencies to exploit.
- * @since 1.3
- */
- protected List<DiffElement> getDependencies(boolean applyInOrigin) {
- return new ArrayList<DiffElement>();
- }
-
- /**
- * Mutually derived references need specific handling : merging one will implicitely merge the other and
- * there are no way to tell such references apart.
- * <p>
- * Currently known references raising such issues :
- * <table>
- * <tr>
- * <td>{@link EcorePackage#ECLASS__ESUPER_TYPES}</td>
- * <td>{@link EcorePackage#ECLASS__EGENERIC_SUPER_TYPES}</td>
- * </tr>
- * </table>
- * </p>
- */
- private void handleMutuallyDerivedReferences() {
- DiffElement toRemove = null;
- if (diff instanceof ReferenceChange) {
- final EReference reference = ((ReferenceChange)diff).getReference();
- if (reference == EcorePackage.eINSTANCE.getEClass_ESuperTypes()) {
- EObject referenceType = null;
- if (diff instanceof ReferenceChangeLeftTarget) {
- referenceType = ((ReferenceChangeLeftTarget)diff).getRightTarget();
- } else if (diff instanceof ReferenceChangeRightTarget) {
- referenceType = ((ReferenceChangeRightTarget)diff).getLeftTarget();
- } else if (diff instanceof UpdateReference) {
- referenceType = ((UpdateReference)diff).getLeftTarget();
- } else {
- // we did cover all the subclasses, we should have a RferenceOrderChange
- }
- for (final DiffElement siblingDiff : ((DiffGroup)diff.eContainer()).getSubDiffElements()) {
- if (siblingDiff instanceof ModelElementChangeLeftTarget) {
- if (((ModelElementChangeLeftTarget)siblingDiff).getLeftElement() instanceof EGenericType
- && ((EGenericType)((ModelElementChangeLeftTarget)siblingDiff)
- .getLeftElement()).getEClassifier() == referenceType) {
- toRemove = siblingDiff;
- break;
- }
- } else if (siblingDiff instanceof ModelElementChangeRightTarget) {
- if (((ModelElementChangeRightTarget)siblingDiff).getRightElement() instanceof EGenericType
- && ((EGenericType)((ModelElementChangeRightTarget)siblingDiff)
- .getRightElement()).getEClassifier() == referenceType) {
- toRemove = siblingDiff;
- break;
- }
- }
- }
- }
- } else if (diff instanceof ModelElementChangeLeftTarget
- && ((ModelElementChangeLeftTarget)diff).getLeftElement() instanceof EGenericType) {
- final ModelElementChangeLeftTarget theDiff = (ModelElementChangeLeftTarget)diff;
- final EClassifier referenceType = ((EGenericType)theDiff.getLeftElement()).getEClassifier();
- for (final DiffElement siblingDiff : ((DiffGroup)diff.eContainer()).getSubDiffElements()) {
- if (siblingDiff instanceof ReferenceChangeLeftTarget
- && ((ReferenceChangeLeftTarget)siblingDiff).getReference().getFeatureID() == EcorePackage.ECLASS__ESUPER_TYPES) {
- if (((ReferenceChangeLeftTarget)siblingDiff).getRightTarget() == referenceType) {
- toRemove = siblingDiff;
- break;
- }
- }
- }
- } else if (diff instanceof ModelElementChangeRightTarget
- && ((ModelElementChangeRightTarget)diff).getRightElement() instanceof EGenericType) {
- final ModelElementChangeRightTarget theDiff = (ModelElementChangeRightTarget)diff;
- final EClassifier referenceType = ((EGenericType)theDiff.getRightElement()).getEClassifier();
- for (final DiffElement siblingDiff : ((DiffGroup)diff.eContainer()).getSubDiffElements()) {
- if (siblingDiff instanceof ReferenceChangeRightTarget
- && ((ReferenceChangeRightTarget)siblingDiff).getReference().getFeatureID() == EcorePackage.ECLASS__ESUPER_TYPES) {
- if (((ReferenceChangeRightTarget)siblingDiff).getLeftTarget() == referenceType) {
- toRemove = siblingDiff;
- break;
- }
- }
- }
- }
- if (toRemove != null) {
- removeFromContainer(toRemove);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/EMFCompareEObjectCopier.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/EMFCompareEObjectCopier.java
deleted file mode 100644
index 9a17ff82e..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/EMFCompareEObjectCopier.java
+++ /dev/null
@@ -1,870 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.compare.diff.internal.DiffReferenceUtil;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-
-/**
- * Defines here a new copier to alter the way references are copied when an EObject is. References
- * corresponding to unmatched object need specific handling.
- * <p>
- * <b>This map's content should be cleared when all differences of {@link #diffModel} are merged.</b>
- * </p>
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- * @since 0.8
- */
-public class EMFCompareEObjectCopier extends org.eclipse.emf.ecore.util.EcoreUtil.Copier {
- /** This class' serial version UID. */
- private static final long serialVersionUID = 2701874812215174395L;
-
- /** If there are any ResourceDependencyChanges in the diffModel, they'll be cached in this. */
- private final List<ResourceDependencyChange> dependencyChanges = new ArrayList<ResourceDependencyChange>();
-
- /* (non-javadoc) defined transient since not serializable. */
- /**
- * The DiffModel on which differences this copier will be used. Note that this could be <code>null</code>
- * if {@link #diffResourceSet} is not.
- */
- private final transient DiffModel diffModel;
-
- /* (non-javadoc) defined transient since not serializable. */
- /** The Diff Resource Set on which differences this copier will be used. */
- private final transient DiffResourceSet diffResourceSet;
-
- /**
- * Creates a Copier given the DiffModel it will be used for.
- * <p>
- * <b>Note</b> that this should never be used if the given <code>diff</code> is contained in a
- * DiffResourceSet.
- * </p>
- *
- * @param diff
- * The DiffModel which elements will be merged using this copier.
- */
- public EMFCompareEObjectCopier(DiffModel diff) {
- super();
- diffModel = diff;
- if (diffModel.eContainer() instanceof DiffResourceSet) {
- diffResourceSet = (DiffResourceSet)diffModel.eContainer();
- for (final EObject child : diffModel.eContainer().eContents()) {
- if (child instanceof ResourceDependencyChange) {
- dependencyChanges.add((ResourceDependencyChange)child);
- }
- }
- } else {
- diffResourceSet = null;
- }
- }
-
- /**
- * Creates a Copier given the DiffResourceSet it will be used for.
- *
- * @param diff
- * The Diff Resource Set which elements will be merged using this copier.
- * @since 1.3
- */
- public EMFCompareEObjectCopier(DiffResourceSet diff) {
- super();
- diffModel = null;
- diffResourceSet = diff;
- for (final EObject child : diffResourceSet.eContents()) {
- if (child instanceof ResourceDependencyChange) {
- dependencyChanges.add((ResourceDependencyChange)child);
- }
- }
- }
-
- /**
- * Adds the given <code>newValue</code> to the given <code>list</code> at the given <code>index</code>. If
- * the value cannot be inserted at said index, we'll attach an adapter to it in order to remember its
- * "expected" position. The list will be reordered later on.
- *
- * @param collection
- * The collection to which we are to add a value.
- * @param newValue
- * The value that we need to add to that collection.
- * @param index
- * Index at which to insert the value.
- */
- private static void addAtIndex(Collection<EObject> collection, EObject newValue, int index) {
- if (collection instanceof InternalEList<?>) {
- final InternalEList<? super EObject> internalEList = (InternalEList<? super EObject>)collection;
- final int listSize = internalEList.size();
- if (index > -1 && index < listSize) {
- internalEList.addUnique(index, newValue);
- } else {
- internalEList.addUnique(newValue);
- }
- attachRealPositionEAdapter(newValue, index);
- reorderList(internalEList);
- } else if (collection instanceof List<?>) {
- final List<? super EObject> list = (List<? super EObject>)collection;
- final int listSize = list.size();
- if (index > -1 && index < listSize) {
- list.add(index, newValue);
- } else {
- list.add(newValue);
- }
- attachRealPositionEAdapter(newValue, index);
- reorderList(list);
- } else {
- collection.add(newValue);
- }
- }
-
- /**
- * If we could not merge a given object at its expected position in a list, we'll attach an Adapter to it
- * in order to "remember" that "expected" position. That will allow us to reorder the list later on if
- * need be.
- *
- * @param object
- * The object on which to attach an Adapter.
- * @param expectedPosition
- * The expected position of <code>object</code> in its list.
- */
- private static void attachRealPositionEAdapter(Object object, int expectedPosition) {
- if (object instanceof EObject) {
- ((EObject)object).eAdapters().add(new PostionAdapter(expectedPosition));
- }
- }
-
- /**
- * Initially copied from {@link org.eclipse.emf.ecore.resource.impl.ResourceImpl#getEObject(List<String>)}
- * .
- *
- * @param container
- * The container in which we need to find an EObject.
- * @param uriFragmentPath
- * Segments of the URI we need an EObject for.
- * @return The EObject contained in <code>container</code> that lies at <code>uriFragmentPath</code>.
- * @since 1.3
- */
- private static EObject getEObject(EObject container, List<String> uriFragmentPath) {
- final int size = uriFragmentPath.size();
- EObject eObject = container;
- for (int i = 1; i < size && eObject != null; ++i) {
- eObject = ((InternalEObject)eObject).eObjectForURIFragmentSegment(uriFragmentPath.get(i));
- }
-
- return eObject;
- }
-
- /**
- * Initially copied from {@link org.eclipse.emf.ecore.resource.impl.ResourceImpl#getEObject(String)}.
- *
- * @param container
- * The container in which we need to find an EObject.
- * @param fragment
- * The fragment we need an EObject for.
- * @return The EObject contained in <code>container</code> that lies at <code>uriFragment</code>.
- * @since 1.3
- */
- private static EObject getEObject(EObject container, String fragment) {
- String uriFragment = fragment;
- final int length = uriFragment.length();
- if (length > 0) {
- if (uriFragment.charAt(0) == '/') {
- final ArrayList<String> uriFragmentPath = new ArrayList<String>(4);
- int start = 1;
- for (int i = 1; i < length; ++i) {
- if (uriFragment.charAt(i) == '/') {
- if (start == i) {
- uriFragmentPath.add(""); //$NON-NLS-1$
- } else {
- uriFragmentPath.add(uriFragment.substring(start, i));
- }
- start = i + 1;
- }
- }
- uriFragmentPath.add(uriFragment.substring(start));
- return getEObject(container, uriFragmentPath);
- } else if (uriFragment.charAt(length - 1) == '?') {
- final int index = uriFragment.lastIndexOf('?', length - 2);
- if (index > 0) {
- uriFragment = uriFragment.substring(0, index);
- }
- }
- }
-
- return getEObjectByID(container, uriFragment);
- }
-
- /**
- * Initially copied from {@link org.eclipse.emf.ecore.resource.impl.ResourceImpl#getEObjectByID(String)}.
- *
- * @param container
- * The container in which we need to find an EObject.
- * @param id
- * The id we need an EObject for.
- * @return The EObject contained in <code>container</code> that corresponds to ID <code>id</code>.
- * @since 1.3
- */
- private static EObject getEObjectByID(EObject container, String id) {
- EObject result = null;
-
- final TreeIterator<EObject> iterator = EcoreUtil.getAllProperContents(container, false);
- while (result == null && iterator.hasNext()) {
- final EObject eObject = iterator.next();
- final String eObjectId = EcoreUtil.getID(eObject);
- if (eObjectId != null) {
- if (eObjectId.equals(id)) {
- result = eObject;
- }
- }
- }
-
- return result;
- }
-
- /**
- * Moves the Object located at index <code>currentIndex</code> from list <code>list</code> to index
- * <code>expectedIndex</code>.
- *
- * @param list
- * The list from which we need an object moved.
- * @param currentIndex
- * The current index of the Object that is to be moved.
- * @param expectedIndex
- * The index at which to move the Object.
- * @param <T>
- * type of the list's elements.
- */
- private static <T> void movetoIndex(List<T> list, int currentIndex, int expectedIndex) {
- final int size = list.size();
- if (size <= 1 || currentIndex < 0 || currentIndex >= size) {
- return;
- }
-
- if (expectedIndex != -1 && expectedIndex != currentIndex && expectedIndex <= size - 1) {
- if (list instanceof InternalEList<?>) {
- ((InternalEList<T>)list).move(expectedIndex, currentIndex);
- } else {
- list.add(expectedIndex, list.remove(currentIndex));
- }
- }
- }
-
- /**
- * Reorders the given list if it contains EObjects associated with a PositionAdapter which are not located
- * at their expected positions.
- *
- * @param list
- * The list that is to be reordered.
- * @param <T>
- * type of the list's elements.
- */
- private static <T> void reorderList(List<T> list) {
- final int size = list.size();
- if (size <= 1) {
- return;
- }
-
- final List<?> copy = Collections.unmodifiableList(list);
- for (int i = 0; i < size; i++) {
- final Object current = copy.get(i);
- if (current instanceof EObject) {
- int expectedIndex = -1;
- final Iterator<Adapter> adapters = ((EObject)current).eAdapters().iterator();
- while (expectedIndex == -1 && adapters.hasNext()) {
- final Adapter adapter = adapters.next();
- if (adapter instanceof PostionAdapter) {
- expectedIndex = ((PostionAdapter)adapter).getExpectedIndex();
- }
- }
- if (expectedIndex != -1 && expectedIndex != i && expectedIndex <= size - 1) {
- if (list instanceof InternalEList<?>) {
- ((InternalEList<T>)list).move(expectedIndex, i);
- } else {
- list.add(expectedIndex, list.remove(i));
- }
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.ecore.util.EcoreUtil$Copier#copyReferences()
- */
- @Override
- public void copyReferences() {
- final Set<Map.Entry<EObject, EObject>> entrySetCopy = new HashSet<Map.Entry<EObject, EObject>>(
- entrySet());
- for (final Map.Entry<EObject, EObject> entry : entrySetCopy) {
- final EObject eObject = entry.getKey();
- final EObject copyEObject = entry.getValue();
- for (EStructuralFeature feature : DiffReferenceUtil.getCopiableReferences(eObject)) {
- if (DiffReferenceUtil.isSimpleReference(feature)) {
- copyReference((EReference)feature, eObject, copyEObject);
- } else if (DiffReferenceUtil.isFeatureMap(feature)) {
- copyFeatureMap(eObject, feature);
- }
- }
- }
- }
-
- /**
- * This will copy the given <tt>value</tt> to the reference <tt>targetReference</tt> of <tt>target</tt>.
- *
- * @param targetReference
- * The reference to add a value to.
- * @param target
- * The object to copy to.
- * @param value
- * The value that is to be copied.
- * @return The copied value.
- * @deprecated Use {@link #copyReferenceValue(EReference, EObject, EObject, int)} instead
- */
- @Deprecated
- public EObject copyReferenceValue(EReference targetReference, EObject target, EObject value) {
- return copyReferenceValue(targetReference, target, value, -1);
- }
-
- /**
- * This will copy the given <tt>value</tt> to the reference <tt>targetReference</tt> of <tt>target</tt>.
- *
- * @param targetReference
- * The reference to add a value to.
- * @param target
- * The object to copy to.
- * @param value
- * The value that is to be copied.
- * @param matchedValue
- * Matched value of <tt>value</tt> if it is known. Will behave like
- * {@link #copyReferenceValue(EReference, EObject, EObject)} if <code>null</code>.
- * @return The copied value.
- * @deprecated use {@link #copyReferenceValue(EReference, EObject, EObject, int)} instead
- */
- @Deprecated
- public EObject copyReferenceValue(EReference targetReference, EObject target, EObject value,
- EObject matchedValue) {
- return copyReferenceValue(targetReference, target, value, matchedValue, -1);
- }
-
- /**
- * This will copy the given <tt>value</tt> to the reference <tt>targetReference</tt> of <tt>target</tt>.
- *
- * @param targetReference
- * The reference to add a value to.
- * @param target
- * The object to copy to.
- * @param value
- * The value that is to be copied.
- * @param matchedValue
- * Matched value of <tt>value</tt> if it is known. Will behave like
- * {@link #copyReferenceValue(EReference, EObject, EObject)} if <code>null</code>.
- * @param index
- * an optional index in case the target is a List (-1 is a good default, the value will be
- * appended to the list)
- * @return The copied value.
- */
- @SuppressWarnings("unchecked")
- public EObject copyReferenceValue(EReference targetReference, EObject target, EObject value,
- EObject matchedValue, int index) {
- EObject actualValue = value;
- if (value == null && matchedValue != null) {
- handleLinkedResourceDependencyChange(matchedValue);
- actualValue = get(matchedValue);
- }
- if (matchedValue != null) {
- put(actualValue, matchedValue);
-
- final Object referenceValue = target.eGet(targetReference);
- if (referenceValue instanceof Collection<?>) {
- addAtIndex((Collection<EObject>)referenceValue, matchedValue, index);
- } else {
- target.eSet(targetReference, matchedValue);
- }
- return matchedValue;
- }
- return copyReferenceValue(targetReference, target, actualValue, index);
- }
-
- /**
- * This will copy the given <tt>value</tt> to the reference <tt>targetReference</tt> of <tt>target</tt>.
- *
- * @param targetReference
- * The reference to add a value to.
- * @param target
- * The object to copy to.
- * @param value
- * The value that is to be copied.
- * @param index
- * An optional index in case the target is a List. -1 can be used to either append to the end
- * of the list, or copy the value of a single-valued reference (
- * <code>targetReference.isMany() == false</code>).
- * @return The copied value.
- * @since 1.3
- */
- @SuppressWarnings("unchecked")
- public EObject copyReferenceValue(EReference targetReference, EObject target, EObject value, int index) {
- final EObject copy;
- final EObject targetValue = get(value);
- if (targetValue != null) {
- copy = targetValue;
- } else {
- if (value.eResource() == null || value.eResource().getURI().isPlatformPlugin()) {
- // We can't copy that object
- copy = value;
- } else {
- copy = copy(value);
- }
- }
-
- final Object referenceValue = target.eGet(targetReference);
- if (referenceValue instanceof List && targetReference.isMany()) {
- if (copy.eIsProxy() && copy instanceof InternalEObject) {
- // only add if the element is not already there.
- final URI proxURI = ((InternalEObject)copy).eProxyURI();
- boolean found = false;
- final Iterator<EObject> it = ((List<EObject>)referenceValue).iterator();
- while (!found && it.hasNext()) {
- final EObject obj = it.next();
- if (obj instanceof InternalEObject) {
- found = proxURI.equals(((InternalEObject)obj).eProxyURI());
- }
- }
- if (!found) {
- final List<EObject> targetList = (List<EObject>)referenceValue;
- addAtIndex(targetList, copy, index);
- }
- } else {
- final List<EObject> targetList = (List<EObject>)referenceValue;
- final int currentIndex = targetList.indexOf(copy);
- if (currentIndex == -1) {
- addAtIndex(targetList, copy, index);
- } else {
- // The order could be wrong in case of eOpposites
- movetoIndex(targetList, currentIndex, index);
- }
- }
- } else {
- if (copy.eIsProxy() && copy instanceof InternalEObject) {
- // only change value if the URI changes
- final URI proxURI = ((InternalEObject)copy).eProxyURI();
- if (referenceValue instanceof InternalEObject) {
- if (!proxURI.equals(((InternalEObject)referenceValue).eProxyURI())) {
- target.eSet(targetReference, copy);
- }
- }
- } else {
- target.eSet(targetReference, copy);
- }
- }
- return copy;
- }
-
- /**
- * Ensures the original and copied objects all share the same XMI ID.
- */
- public void copyXMIIDs() {
- for (final Map.Entry<EObject, EObject> entry : entrySet()) {
- final EObject original = entry.getKey();
- final EObject copy = entry.getValue();
- if (original.eResource() instanceof XMIResource && copy.eResource() instanceof XMIResource) {
- final XMIResource originResource = (XMIResource)original.eResource();
- final XMIResource copyResource = (XMIResource)copy.eResource();
- if (originResource.getID(original) != null) {
- copyResource.setID(copy, originResource.getID(original));
- final TreeIterator<EObject> originalIterator = original.eAllContents();
- final TreeIterator<EObject> copyIterator = copy.eAllContents();
- while (originalIterator.hasNext()) {
- final EObject nextOriginalChild = originalIterator.next();
- final EObject nextCopyChild = copyIterator.next();
- copyResource.setID(nextCopyChild, originResource.getID(nextOriginalChild));
- }
- }
- }
- }
- }
-
- /**
- * Returns the DiffModel associated with this copier if any.
- *
- * @return The DiffModel associated with this copier. Could be <code>null</code>.
- */
- public DiffModel getDiffModel() {
- return diffModel;
- }
-
- /**
- * Returns the DiffResourceSet associated with this copier if any.
- *
- * @return The DiffResourceSet associated with this copier. Could be <code>null</code>.
- * @since 1.3
- */
- public DiffResourceSet getDiffResourceSet() {
- return diffResourceSet;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.ecore.util.EcoreUtil$Copier#copyReference(org.eclipse.emf.ecore.EReference,
- * org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
- */
- @SuppressWarnings("unchecked")
- @Override
- protected void copyReference(EReference eReference, EObject eObject, EObject copyEObject) {
- // No use trying to copy the reference if it isn't set in the origin
- if (!eObject.eIsSet(eReference)) {
- return;
- }
- final Object referencedEObject = eObject.eGet(eReference, resolveProxies);
- if (eReference == EcorePackage.eINSTANCE.getEPackage_EFactoryInstance()) {
- // Let the super do its work.
- super.copyReference(eReference, eObject, copyEObject);
- } else if (eReference.isMany()) {
- final List<?> referencedObjectsList = (List<?>)referencedEObject;
- if (referencedObjectsList == null) {
- copyEObject.eSet(getTarget(eReference), null);
- } else if (referencedObjectsList.size() == 0) {
- copyEObject.eSet(getTarget(eReference), referencedObjectsList);
- } else {
- for (final Object referencedEObj : referencedObjectsList) {
- final Object copyReferencedEObject = get(referencedEObj);
- if (copyReferencedEObject != null) {
- // The referenced object has been copied via this Copier
- ((List<Object>)copyEObject.eGet(getTarget(eReference))).add(copyReferencedEObject);
- } else if (referencedEObj instanceof EObject) {
- // referenced object lies in another resource, simply reference it
- final Object copyReferencedObject = findReferencedObjectCopy((EObject)referencedEObj);
- ((List<Object>)copyEObject.eGet(getTarget(eReference))).add(copyReferencedObject);
- } else {
- ((List<Object>)copyEObject.eGet(getTarget(eReference))).add(referencedEObj);
- }
- }
- }
- } else {
- if (referencedEObject == null) {
- copyEObject.eSet(getTarget(eReference), null);
- } else {
- final Object copyReferencedEObject = get(referencedEObject);
- if (copyReferencedEObject != null) {
- // The referenced object has been copied via this Copier
- copyEObject.eSet(getTarget(eReference), copyReferencedEObject);
- } else if (referencedEObject instanceof EObject) {
- final Object copyReferencedObject = findReferencedObjectCopy((EObject)referencedEObject);
- copyEObject.eSet(getTarget(eReference), copyReferencedObject);
- } else {
- ((List<Object>)copyEObject.eGet(getTarget(eReference))).add(referencedEObject);
- }
- }
- }
- }
-
- /**
- * We couldn't find a copy of <em>referencedObject</em>. We still need to find its matched object in the
- * target resource in order not to simply reference the "old" resource from a copied object.
- *
- * @param referencedEObject
- * object referenced from <em>eObject</em> that needs to be copied or found in the target
- * resource.
- * @return Copy of the referenced object, located in the target resource if we could find it.
- * @since 1.3
- */
- protected Object findReferencedObjectCopy(EObject referencedEObject) {
- Object copyReferencedObject = referencedEObject;
- if (referencedEObject.eResource() == null) {
- return findReferencedObjectCopyNullResource(referencedEObject);
- }
-
- // Is the referencedObject in either left or right?
- final Resource referencedResource = referencedEObject.eResource();
- final String uriFragment = referencedEObject.eResource().getURIFragment(referencedEObject);
- Resource leftResource = null;
- Resource rightResource = null;
-
- if (diffResourceSet != null) {
- final Iterator<DiffModel> diffModels = diffResourceSet.getDiffModels().iterator();
- while (diffModels.hasNext() && leftResource == null && rightResource == null) {
- final DiffModel aDiffModel = diffModels.next();
- DiffModel referencedDiffModel = null;
- if (!aDiffModel.getLeftRoots().isEmpty()
- && aDiffModel.getLeftRoots().get(0).eResource() != null) {
- final Resource resource = aDiffModel.getLeftRoots().get(0).eResource();
- if (referencedEObject.eResource() == resource) {
- referencedDiffModel = aDiffModel;
- }
- }
- if (referencedDiffModel == null) {
- if (!aDiffModel.getRightRoots().isEmpty()
- && aDiffModel.getRightRoots().get(0).eResource() != null) {
- final Resource resource = aDiffModel.getRightRoots().get(0).eResource();
- if (referencedEObject.eResource() == resource) {
- referencedDiffModel = aDiffModel;
- }
- }
- }
- if (referencedDiffModel != null) {
- leftResource = referencedDiffModel.getLeftRoots().get(0).eResource();
- rightResource = referencedDiffModel.getRightRoots().get(0).eResource();
- }
- }
- } else if (diffModel != null) {
- if (!diffModel.getLeftRoots().isEmpty() && diffModel.getLeftRoots().get(0).eResource() != null) {
- leftResource = diffModel.getLeftRoots().get(0).eResource();
- }
- if (!diffModel.getRightRoots().isEmpty() && diffModel.getRightRoots().get(0).eResource() != null) {
- rightResource = diffModel.getRightRoots().get(0).eResource();
- }
- }
-
- if (referencedResource == leftResource && rightResource != null) {
- /*
- * FIXME we should be using the MatchModel, but can't access it. let's hope the referenced object
- * has already been copied
- */
- copyReferencedObject = rightResource.getEObject(uriFragment);
- if (copyReferencedObject == null) {
- // FIXME can we find the referenced object without the match model?
- }
- } else if (referencedResource == rightResource && leftResource != null) {
- /*
- * FIXME we should be using the MatchModel, but can't access it. let's hope the referenced object
- * has already been copied
- */
- copyReferencedObject = leftResource.getEObject(uriFragment);
- if (copyReferencedObject == null) {
- // FIXME can we find the referenced object without the match model?
- }
- } else {
- // Reference lies in another resource. Simply return it as is.
- }
-
- return copyReferencedObject;
- }
-
- /**
- * We couldn't find a copy of <em>referencedObject</em>. We still need to find its matched object in the
- * target resource in order not to simply reference the "old" resource from a copied object.
- * <p>
- * This will only be called after we've made sure that the referenced Object is not attached to a
- * resource. We thus can only look within its containment tree.
- * </p>
- * <p>
- * Take good not that this treatment will be extremely costly and should be avoided whenever possible.
- * </p>
- *
- * @param referencedObject
- * object referenced from <em>eObject</em> that needs to be copied or found in the target
- * containment tree.
- * @return Copy of the referenced object, located in the target containment tree if we could find it.
- * @since 1.3
- */
- protected Object findReferencedObjectCopyNullResource(EObject referencedObject) {
- Object copyReferencedObject = referencedObject;
-
- final EObject rootContainer = EcoreUtil.getRootContainer(referencedObject);
-
- EObject leftRoot = null;
- EObject rightRoot = null;
-
- if (diffResourceSet != null) {
- final Iterator<DiffModel> diffModels = diffResourceSet.getDiffModels().iterator();
- while (diffModels.hasNext() && leftRoot == null && rightRoot == null) {
- final DiffModel aDiffModel = diffModels.next();
- DiffModel referencedDiffModel = null;
- int rootIndex = 0;
-
- for (int i = 0; i < aDiffModel.getLeftRoots().size(); i++) {
- if (rootContainer == aDiffModel.getLeftRoots().get(i)) {
- referencedDiffModel = aDiffModel;
- rootIndex = i;
- }
- }
- if (referencedDiffModel == null) {
- for (int i = 0; i < aDiffModel.getRightRoots().size(); i++) {
- if (rootContainer == aDiffModel.getRightRoots().get(i)) {
- referencedDiffModel = aDiffModel;
- rootIndex = i;
- }
- }
- }
- if (referencedDiffModel != null) {
- if (referencedDiffModel.getLeftRoots().size() >= rootIndex) {
- leftRoot = referencedDiffModel.getLeftRoots().get(rootIndex);
- }
- if (referencedDiffModel.getRightRoots().size() >= rootIndex) {
- rightRoot = referencedDiffModel.getRightRoots().get(rootIndex);
- }
- }
- }
- } else if (diffModel != null) {
- int rootIndex = -1;
- for (int i = 0; i < diffModel.getLeftRoots().size(); i++) {
- if (rootContainer == diffModel.getLeftRoots().get(i)) {
- rootIndex = i;
- }
- }
- for (int i = 0; i < diffModel.getRightRoots().size(); i++) {
- if (rootContainer == diffModel.getRightRoots().get(i)) {
- rootIndex = i;
- }
- }
- if (diffModel.getLeftRoots().size() >= rootIndex) {
- leftRoot = diffModel.getLeftRoots().get(rootIndex);
- }
- if (diffModel.getRightRoots().size() >= rootIndex) {
- rightRoot = diffModel.getRightRoots().get(rootIndex);
- }
- }
-
- // Trims the starting '#//' out
- final String uriFragment = EcoreUtil.getURI(referencedObject).toString().substring(2);
- if (rootContainer == leftRoot && rightRoot != null) {
- /*
- * FIXME we should be using the MatchModel, but can't access it. let's hope the referenced object
- * has already been copied
- */
- copyReferencedObject = getEObject(rightRoot, uriFragment);
- if (copyReferencedObject == null) {
- // FIXME can we find the referenced object without the match model?
- }
- } else if (rootContainer == rightRoot && leftRoot != null) {
- /*
- * FIXME we should be using the MatchModel, but can't access it. let's hope the referenced object
- * has already been copied
- */
- copyReferencedObject = getEObject(leftRoot, uriFragment);
- if (copyReferencedObject == null) {
- // FIXME can we find the referenced object without the match model?
- }
- } else {
- // Reference lies in another resource. Simply copy it
- copyReferencedObject = referencedObject;
- }
-
- return copyReferencedObject;
- }
-
- /**
- * Copies the feature as a FeatureMap.
- *
- * @param eObject
- * The EObject from which the feature is copied
- * @param eStructuralFeature
- * The feature which needs to be copied.
- */
- private void copyFeatureMap(EObject eObject, EStructuralFeature eStructuralFeature) {
- final FeatureMap featureMap = (FeatureMap)eObject.eGet(eStructuralFeature);
- final FeatureMap copyFeatureMap = (FeatureMap)get(eObject).eGet(getTarget(eStructuralFeature));
- int copyFeatureMapSize = copyFeatureMap.size();
- for (int k = 0; k < featureMap.size(); ++k) {
- final EStructuralFeature feature = featureMap.getEStructuralFeature(k);
- if (feature instanceof EReference) {
- final Object referencedEObject = featureMap.getValue(k);
- Object copyReferencedEObject = get(referencedEObject);
- if (copyReferencedEObject == null && referencedEObject != null) {
- final EReference reference = (EReference)feature;
- if (!useOriginalReferences || reference.isContainment()
- || reference.getEOpposite() != null) {
- continue;
- }
- copyReferencedEObject = referencedEObject;
- }
- // If we can't add it, it must already be in the list so find it and move it
- // to the end.
- //
- if (!copyFeatureMap.add(feature, copyReferencedEObject)) {
- for (int l = 0; l < copyFeatureMapSize; ++l) {
- if (copyFeatureMap.getEStructuralFeature(l) == feature
- && copyFeatureMap.getValue(l) == copyReferencedEObject) {
- copyFeatureMap.move(copyFeatureMap.size() - 1, l);
- --copyFeatureMapSize;
- break;
- }
- }
- }
- } else {
- copyFeatureMap.add(featureMap.get(k));
- }
- }
- }
-
- /**
- * This will be called when merging reference changes in order to remove linked dependency changes.
- *
- * @param element
- * The element that is being merged.
- */
- private void handleLinkedResourceDependencyChange(EObject element) {
- for (final ResourceDependencyChange dependencyChange : new ArrayList<ResourceDependencyChange>(
- dependencyChanges)) {
- final Resource resource = dependencyChange.getRoots().get(0).eResource();
- if (resource == element.eResource() && dependencyChange.eContainer() != null) {
- // There are no explicit mergers for resource addition/removal.
- EcoreUtil.remove(dependencyChange);
- dependencyChanges.remove(dependencyChange);
- // map the element to itself : we wish a direct link to the same resource.
- put(element, element);
- break;
- }
- }
- }
-
- /**
- * This adapter will be used to remember the accurate position of an EObject in its target list.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
- private static class PostionAdapter extends AdapterImpl {
- /** The index at which we expect to find this object. */
- private int expectedIndex;
-
- /**
- * Creates our adapter.
- *
- * @param index
- * The index at which we expect to find this object.
- */
- public PostionAdapter(int index) {
- this.expectedIndex = index;
- }
-
- /**
- * Returns the index at which we expect to find this object.
- *
- * @return The index at which we expect to find this object.
- */
- public int getExpectedIndex() {
- return expectedIndex;
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergeListener.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergeListener.java
deleted file mode 100644
index 28a87e1bc..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergeListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import java.util.EventListener;
-
-/**
- * Base interface for the listeners that can be notified when a merge operation is about to occur or to end.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public interface IMergeListener extends EventListener {
- /**
- * This is called whenever a difference has been merge.
- *
- * @param event
- * Holds information about the merged {@link DiffElement}.
- */
- void mergeDiffEnd(MergeEvent event);
-
- /**
- * This is called whenever a DiffElement is about to be merged.
- *
- * @param event
- * Holds information about the merged {@link DiffElement}.
- */
- void mergeDiffStart(MergeEvent event);
-
- /**
- * This is called whenever a merge operation has ended, either on a single {@link DiffElement} or a list
- * of differences.
- *
- * @param event
- * Holds information about the merged {@link DiffElement}(s).
- */
- void mergeOperationEnd(MergeEvent event);
-
- /**
- * This is called whenever a merge operation is about to be launched, either on a single
- * {@link DiffElement} or a list of differences.
- *
- * @param event
- * Holds information about the merged {@link DiffElement}(s).
- */
- void mergeOperationStart(MergeEvent event);
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMerger.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMerger.java
deleted file mode 100644
index 5094c002c..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMerger.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-
-/**
- * Base interface for merger implementation. Clients can implement this interface or extend
- * {@link DefaultMerger} which also provide some utility methods.
- *
- * @see DefaultMerger
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public interface IMerger {
- /**
- * Applies the modification in the original (left) model.
- */
- void applyInOrigin();
-
- /**
- * Returns <code>True</code> if the merger is allowed to apply changes in the origin (left) model.
- *
- * @return <code>True</code> if the merger is allowed to apply changes in the origin (left) model,
- * <code>False</code> otherwise.
- */
- boolean canApplyInOrigin();
-
- /**
- * Returns <code>True</code> if the merger is allowed to undo changes in the target (right) model.
- *
- * @return <code>True</code> if the merger is allowed to undo changes in the target (right) model,
- * <code>False</code> otherwise.
- */
- boolean canUndoInTarget();
-
- /**
- * Sets the {@link DiffElement} to be merged.
- *
- * @param element
- * The {@link DiffElement} to be merged.
- */
- void setDiffElement(DiffElement element);
-
- /**
- * Cancels the modification in the target (right) model.
- */
- void undoInTarget();
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergerProvider.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergerProvider.java
deleted file mode 100644
index a42d6afa7..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/IMergerProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import java.util.Map;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-
-/**
- * This allows the association of mergers to specific {@link DiffElement}.
- * <p>
- * Mergers should implement the interface {@link IMerger} and provide a default, no-arg constructor. This
- * interface is intended to be implemented for the use of the extension point
- * <code>org.eclipse.emf.compare.diff.mergerprovider</code>.
- * </p>
- *
- * @see IMerger
- * @see MergeFactory
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public interface IMergerProvider {
- /**
- * This will be called by the merge factory to get a list of all the mergers associated to a given
- * {@link DiffElement}.
- *
- * @return The map allowing us to know which merger should be used for which DiffElement.
- */
- Map<Class<? extends DiffElement>, Class<? extends IMerger>> getMergers();
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/MergeEvent.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/MergeEvent.java
deleted file mode 100644
index 19b029136..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/MergeEvent.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-
-/**
- * An event characterizing a merge operation. Holds information about the DiffElement(s) that is(are) about to
- * be merged (or which has just been merged) and the merger that handled the operation.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class MergeEvent {
- /** Target {@link DiffElement}s of the underlying merge operation. */
- private final List<DiffElement> elements = new ArrayList<DiffElement>();
-
- /**
- * Constructs a new merge event given the {@link IMerger} in charge and a single target
- * {@link DiffElement}.
- *
- * @param diff
- * {@link DiffElement} which holds the information for this merge operation.
- */
- public MergeEvent(DiffElement diff) {
- elements.add(diff);
- }
-
- /**
- * Constructs a new merge event given the {@link IMerger} in charge and a list of targeted
- * {@link DiffElement}s.
- *
- * @param diffs
- * {@link DiffElement}s which holds the information for this merge operation.
- */
- public MergeEvent(List<DiffElement> diffs) {
- elements.addAll(diffs);
- }
-
- /**
- * Returns the DiffElement(s) targeted by the underlying operation.
- *
- * @return The DiffElement(s) targeted by the underlying operation.
- */
- public List<DiffElement> getDifferences() {
- return elements;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/package-info.java
deleted file mode 100644
index 09471981f..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * Provides merge services for models.
- * <p>
- * Clients can make use of the classes provided within these packages to either
- * add listeners on generic merge operation or implement their own mergers.
- * </p>
- * <p>
- * As the remaining of EMF Compare, the merging functionality can be used stand-alone.
- * </p>
- *
- * @since 0.8
- */
-package org.eclipse.emf.compare.diff.merge; \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeFactory.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeFactory.java
deleted file mode 100644
index 4cf89247a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeFactory.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge.service;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.diff.internal.merge.DefaultMergerProvider;
-import org.eclipse.emf.compare.diff.merge.DefaultExtensionMerger;
-import org.eclipse.emf.compare.diff.merge.DefaultMerger;
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.util.ClassUtils;
-import org.eclipse.emf.compare.util.EMFCompareMap;
-import org.eclipse.emf.compare.util.EngineConstants;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * The merge factory allows the creation of a merger from any kind of {@link DiffElement}.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- * @noextend This class is not intended to be subclassed by clients.
- */
-public final class MergeFactory {
- /** Wild card for file extensions. */
- private static final String ALL_EXTENSIONS = "*"; //$NON-NLS-1$
-
- /** Remembers the last file extension for which we've populated {@link #MERGER_TYPES}. */
- private static String lastExtension = ""; //$NON-NLS-1$
-
- /** Name of the extension point to parse for merger providers. */
- private static final String MERGER_PROVIDER_EXTENSION_POINT = "org.eclipse.emf.compare.diff.mergerprovider"; //$NON-NLS-1$
-
- /**
- * This map will be populated with the merger associated to given {@link DiffElement}s. Each diff element
- * will be mapped to the merger provided by the MergerProvider contributed with the highest priority.
- */
- private static final Map<Class<? extends DiffElement>, Class<? extends IMerger>> MERGER_TYPES = new EMFCompareMap<Class<? extends DiffElement>, Class<? extends IMerger>>();
-
- /** Keeps track of all the providers we've parsed. */
- private static final Map<String, ArrayList<MergerProviderDescriptor>> PARSED_PROVIDERS = new EMFCompareMap<String, ArrayList<MergerProviderDescriptor>>();
-
- /** Externalized here to avoid too many distinct usages. */
- private static final String TAG_PROVIDER = "mergerprovider"; //$NON-NLS-1$
-
- /** These are the possible priorities for the provided mergers. */
- private static final int[] MERGER_PRIORITIES = {EngineConstants.PRIORITY_LOWEST,
- EngineConstants.PRIORITY_LOW, EngineConstants.PRIORITY_NORMAL, EngineConstants.PRIORITY_HIGH,
- EngineConstants.PRIORITY_HIGHEST, };
-
- static {
- parseExtensionMetadata();
- }
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private MergeFactory() {
- // prevents instantiation
- }
-
- /**
- * Handles the creation of the merger for a given {@link DiffElement}.
- *
- * @param element
- * {@link DiffElement} for which we need a merger.
- * @return The merger adapted to <code>element</code>, <code>null</code> if it cannot be instantiated.
- */
- public static IMerger createMerger(DiffElement element) {
- // If the merger provides a default constructor, we instantiate it
- IMerger elementMerger = null;
-
- // diff extensions may offer their own merger, so we use it here
- if (element instanceof AbstractDiffExtension) {
- elementMerger = ((AbstractDiffExtension)element).provideMerger();
- if (elementMerger == null) {
- elementMerger = new DefaultExtensionMerger();
- }
- }
-
- if (elementMerger == null) {
- try {
- final Class<? extends IMerger> mergerClass = getBestMerger(element);
- elementMerger = mergerClass.newInstance();
- } catch (final InstantiationException e) {
- EMFComparePlugin.log(e.getMessage(), false);
- } catch (final IllegalAccessException e) {
- EMFComparePlugin.log(e.getMessage(), false);
- }
- }
-
- if (elementMerger != null) {
- elementMerger.setDiffElement(element);
- }
- return elementMerger;
- }
-
- /**
- * Returns the merger class that is best suited for the given {@link DiffElement}. Merger classes can be
- * managed via {@link #addMergerType(Class, Class)} and {@link #removeMergerType(Class)}.
- *
- * @param element
- * {@link DiffElement} we want a merger for.
- * @return The merger class that is best suited for the given {@link DiffElement}.
- */
- private static Class<? extends IMerger> getBestMerger(DiffElement element) {
- Class<? extends IMerger> mergerClass = DefaultMerger.class;
-
- EObject rightElement = (EObject)ClassUtils.invokeMethod(element, "getRightElement"); //$NON-NLS-1$
- if (rightElement == null) {
- rightElement = (EObject)ClassUtils.invokeMethod(element, "getRightParent"); //$NON-NLS-1$
- }
- String resourceFileExtension = null;
- if (rightElement != null && rightElement.eResource() != null) {
- resourceFileExtension = rightElement.eResource().getURI().fileExtension();
- }
-
- if (resourceFileExtension == null) {
- resourceFileExtension = ALL_EXTENSIONS;
- }
-
- final Map<Class<? extends DiffElement>, Class<? extends IMerger>> mergersMap;
- if (EMFPlugin.IS_ECLIPSE_RUNNING) {
- mergersMap = getMergerTypes(resourceFileExtension);
- } else {
- mergersMap = MERGER_TYPES;
- }
-
- // If we know the merger for this class, we return it
- if (mergersMap.containsKey(element.getClass())) {
- mergerClass = mergersMap.get(element.getClass());
- // Else we seek through the map if our element is an instance of one of the class keys.
- } else {
- for (final Entry<Class<? extends DiffElement>, Class<? extends IMerger>> entry : mergersMap
- .entrySet()) {
- if (entry.getKey().isInstance(element)) {
- mergerClass = entry.getValue();
- break;
- }
- }
- }
- return mergerClass;
- }
-
- /**
- * This will iterate through the list of the parsed providers from the lowest to the highest priority and
- * associate each known {@link DiffElement} to a merger in order of their provider's priority.
- *
- * @param fileExtension
- * File extension on which the provider can apply its mergers.
- * @return The map of the merger associated to given {@link DiffElement}s.
- */
- private static Map<Class<? extends DiffElement>, Class<? extends IMerger>> getMergerTypes(
- String fileExtension) {
- if (!fileExtension.equals(lastExtension)) {
- lastExtension = fileExtension;
- MERGER_TYPES.clear();
- /*
- * TODO We'll iterate n times over all the parsed providers (one loop for each priority). See if
- * we can optimize this.
- */
- for (final int priority : MERGER_PRIORITIES) {
- final Map<Class<? extends DiffElement>, Class<? extends IMerger>> mergers = new EMFCompareMap<Class<? extends DiffElement>, Class<? extends IMerger>>();
- // Iterates through the list of providers registered for all extensions
- if (PARSED_PROVIDERS.containsKey(ALL_EXTENSIONS)) {
- final List<MergerProviderDescriptor> list = PARSED_PROVIDERS.get(ALL_EXTENSIONS);
- Collections.sort(list);
- for (final MergerProviderDescriptor descriptor : list) {
- if (descriptor.getPriorityValue(descriptor.priority) == priority) {
- mergers.putAll(descriptor.getMergerProviderInstance().getMergers());
- }
- }
- }
- if (PARSED_PROVIDERS.containsKey(fileExtension)) {
- final List<MergerProviderDescriptor> list = PARSED_PROVIDERS.get(fileExtension);
- Collections.sort(list);
- for (final MergerProviderDescriptor descriptor : list) {
- if (descriptor.getPriorityValue(descriptor.priority) == priority) {
- mergers.putAll(descriptor.getMergerProviderInstance().getMergers());
- }
- }
- }
- MERGER_TYPES.putAll(mergers);
- }
- }
- return MERGER_TYPES;
- }
-
- /**
- * This will parse the currently running platform for extensions and store all the diff engines and diff
- * extensions that can be found.
- */
- private static void parseExtensionMetadata() {
- if (EMFPlugin.IS_ECLIPSE_RUNNING) {
- final IExtension[] extensions = Platform.getExtensionRegistry()
- .getExtensionPoint(MERGER_PROVIDER_EXTENSION_POINT).getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- final IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- final MergerProviderDescriptor desc = parseProvider(configElements[j]);
- storeProviderDescriptor(desc);
- }
- }
- } else {
- MERGER_TYPES.putAll(new DefaultMergerProvider().getMergers());
- }
- }
-
- /**
- * This will parse the given {@link IConfigurationElement configuration element} and return a descriptor
- * for it if it describes a merger provider.
- *
- * @param configElement
- * Configuration element to parse.
- * @return {@link MergerProviderDescriptor} wrapped around <code>configElement</code> if it describes a
- * merger provider, <code>null</code> otherwise.
- */
- private static MergerProviderDescriptor parseProvider(IConfigurationElement configElement) {
- if (!configElement.getName().equals(TAG_PROVIDER))
- return null;
- final MergerProviderDescriptor desc = new MergerProviderDescriptor(configElement);
- return desc;
- }
-
- /**
- * Stores the given descriptor in the list of known {@link MergerProviderDescriptor}s.
- *
- * @param desc
- * Descriptor to be added to the list of all know descriptors.
- */
- private static void storeProviderDescriptor(MergerProviderDescriptor desc) {
- if (desc.getFileExtension() == null)
- return;
-
- final String[] extensions = desc.getFileExtension().split(","); //$NON-NLS-1$
- for (final String mergerExtension : extensions) {
- if (!PARSED_PROVIDERS.containsKey(mergerExtension)) {
- PARSED_PROVIDERS.put(mergerExtension, new ArrayList<MergerProviderDescriptor>());
- }
- final List<MergerProviderDescriptor> set = PARSED_PROVIDERS.get(mergerExtension);
- set.add(desc);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeService.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeService.java
deleted file mode 100644
index 781839837..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergeService.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.compare.diff.merge.EMFCompareEObjectCopier;
-import org.eclipse.emf.compare.diff.merge.IMergeListener;
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.compare.diff.merge.MergeEvent;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Service for use with diff merging operations.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public final class MergeService {
- /** This copier will be used when merging references. */
- private static EMFCompareEObjectCopier copier;
-
- /**
- * Holds a list of all the merge listeners registered for notifications on merge operations.
- */
- private static final List<IMergeListener> MERGE_LISTENERS = new ArrayList<IMergeListener>();
-
- /**
- * Default constructor.
- */
- private MergeService() {
- // hides default constructor
- }
-
- /**
- * Registers a new merge listener for notifications about merge operations. Has no effect if the listener
- * is already registered.
- *
- * @param listener
- * New Listener to register for notifications.
- */
- public static void addMergeListener(IMergeListener listener) {
- MERGE_LISTENERS.add(listener);
- }
-
- /**
- * Returns the copier given the diff it should merge.
- *
- * @param diff
- * The DiffElement for which a copier is needed.
- * @return The copier for a given diff.
- */
- public static EMFCompareEObjectCopier getCopier(DiffElement diff) {
- final DiffModel diffModel = getContainerDiffModel(diff);
- if (diffModel == null)
- throw new IllegalArgumentException("The diff element should be contained in a DiffModel instance"); //$NON-NLS-1$
- if (diffModel.eContainer() instanceof DiffResourceSet) {
- if (copier == null) {
- copier = new EMFCompareEObjectCopier((DiffResourceSet)diffModel.eContainer());
- } else if (copier.getDiffResourceSet() != diffModel.eContainer()) {
- copier.clear();
- copier = new EMFCompareEObjectCopier((DiffResourceSet)diffModel.eContainer());
- }
- } else {
- if (copier == null) {
- copier = new EMFCompareEObjectCopier(diffModel);
- } else if (copier.getDiffModel() != diffModel) {
- copier.clear();
- copier = new EMFCompareEObjectCopier(diffModel);
- }
- }
- return copier;
- }
-
- /**
- * Browse the diff model from the leaf to the top to find the containing {@link DiffModel} instance.
- *
- * @param diff
- * any {@link DiffElement}.
- * @return the containing {@link DiffModel} instance, null if not found.
- */
- private static DiffModel getContainerDiffModel(DiffElement diff) {
- EObject container = diff.eContainer();
- while (container != null) {
- if (container instanceof DiffModel)
- return (DiffModel)container;
- container = container.eContainer();
- }
- return null;
- }
-
- /**
- * Merges a single DiffElement in the direction specified by <code>leftToRight</code>.
- * <p>
- * Will notify the list of its merge listeners before, and after the operation.
- * </p>
- *
- * @param element
- * {@link DiffElement} containing the information to merge.
- * @param leftToRight
- * <code>True</code> if the changes must be applied from the left to the right model,
- * <code>False</code> when they have to be applied the other way around.
- */
- public static void merge(DiffElement element, boolean leftToRight) {
- fireMergeOperationStart(element);
- doMerge(element, leftToRight);
- fireMergeOperationEnd(element);
- }
-
- /**
- * Merges a list of DiffElements in the direction specified by <code>leftToRight</code>.
- * <p>
- * Will notify the list of its merge listeners before, and after the operation.
- * </p>
- *
- * @param elements
- * {@link DiffElement}s containing the information to merge.
- * @param leftToRight
- * <code>True</code> if the changes must be applied from the left to the right model,
- * <code>False</code> when they have to be applied the other way around.
- */
- public static void merge(List<DiffElement> elements, boolean leftToRight) {
- fireMergeOperationStart(elements);
- for (DiffElement element : new ArrayList<DiffElement>(elements))
- // we might remove the diff from the list before merging it
- // (eOpposite reference)
- if (element.eContainer() != null)
- doMerge(element, leftToRight);
- fireMergeOperationEnd(elements);
- }
-
- /**
- * removes a merge listener from the list of registered listeners. This will have no effect if the given
- * listener is not registered for notifications on this service.
- *
- * @param listener
- * New Listener to register for notifications.
- */
- public static void removeMergeListener(IMergeListener listener) {
- MERGE_LISTENERS.remove(listener);
- }
-
- /**
- * Applies the changes implied by a given {@link DiffElement} in the direction specified by
- * <code>leftToRight</code>.
- * <p>
- * Will notify the list of its merge listeners before, and after the merge.
- * </p>
- *
- * @param element
- * {@link DiffElement} containing the information to merge.
- * @param leftToRight
- * <code>True</code> if the changes must be applied from the left to the right model,
- * <code>False</code> when they have to be applied the other way around.
- */
- protected static void doMerge(DiffElement element, boolean leftToRight) {
- fireMergeDiffStart(element);
- final IMerger merger;
- if (element instanceof ConflictingDiffElement)
- merger = MergeFactory.createMerger(element.getSubDiffElements().get(0));
- else
- merger = MergeFactory.createMerger(element);
- if (leftToRight && merger.canUndoInTarget()) {
- merger.undoInTarget();
- } else if (!leftToRight && merger.canApplyInOrigin()) {
- merger.applyInOrigin();
- }
- fireMergeDiffEnd(element);
- }
-
- /**
- * Notifies all registered listeners that a {@link DiffElement} has just been merged.
- *
- * @param diff
- * {@link DiffElement} which has just been merged.
- */
- protected static void fireMergeDiffEnd(DiffElement diff) {
- for (IMergeListener listener : MERGE_LISTENERS)
- listener.mergeDiffEnd(new MergeEvent(diff));
- }
-
- /**
- * Notifies all registered listeners that a DiffElement is about to be merged.
- *
- * @param diff
- * {@link DiffElement} which is about to be merged.
- */
- protected static void fireMergeDiffStart(DiffElement diff) {
- for (IMergeListener listener : MERGE_LISTENERS)
- listener.mergeDiffStart(new MergeEvent(diff));
- }
-
- /**
- * Notifies all registered listeners that a merge operation on a single diff just ended.
- *
- * @param diff
- * {@link DiffElement} which has just been merged.
- */
- protected static void fireMergeOperationEnd(DiffElement diff) {
- for (IMergeListener listener : MERGE_LISTENERS)
- listener.mergeOperationEnd(new MergeEvent(diff));
- }
-
- /**
- * Notifies all registered listeners that a merge operation has ended for a list of differences.
- *
- * @param diffs
- * {@link DiffElement}s which have been merged.
- */
- protected static void fireMergeOperationEnd(List<DiffElement> diffs) {
- for (IMergeListener listener : MERGE_LISTENERS)
- listener.mergeOperationEnd(new MergeEvent(diffs));
- }
-
- /**
- * Notifies all registered listeners that a merge operation is about to start for a single diff.
- *
- * @param diff
- * {@link DiffElement} which is about to be merged.
- */
- protected static void fireMergeOperationStart(DiffElement diff) {
- for (IMergeListener listener : MERGE_LISTENERS)
- listener.mergeOperationStart(new MergeEvent(diff));
- }
-
- /**
- * Notifies all registered listeners that a merge operation is about to start for a list of differences.
- *
- * @param diffs
- * {@link DiffElement}s which are about to be merged.
- */
- protected static void fireMergeOperationStart(List<DiffElement> diffs) {
- for (IMergeListener listener : MERGE_LISTENERS)
- listener.mergeOperationStart(new MergeEvent(diffs));
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergerProviderDescriptor.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergerProviderDescriptor.java
deleted file mode 100644
index bb3f60b68..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/MergerProviderDescriptor.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.merge.service;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.merge.IMergerProvider;
-import org.eclipse.emf.compare.util.EngineConstants;
-
-/**
- * This descriptor represents a merger provider contribution via the extension point
- * <code>org.eclipse.emf.compare.diff.mergerprovider</code>.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-/* package */class MergerProviderDescriptor implements Comparable<MergerProviderDescriptor> {
- /** Configuration element of this descriptor. */
- protected final IConfigurationElement element;
-
- /** File extensions this merger takes into account. */
- protected final String fileExtension;
-
- /** Class name of the described merger provider. */
- protected final String mergerProviderClassName;
-
- /**
- * Priority of this descriptor. Should be one of
- * <ul>
- * <li>{@link EngineConstants#PRIORITY_HIGHEST}</li>
- * <li>{@link EngineConstants#PRIORITY_HIGH}</li>
- * <li>{@link EngineConstants#PRIORITY_NORMAL}</li>
- * <li>{@link EngineConstants#PRIORITY_LOW}</li>
- * <li>{@link EngineConstants#PRIORITY_LOWEST}</li>
- * </ul>
- */
- protected final String priority;
-
- /** {@link IMergerProvider} this descriptor describes. */
- private IMergerProvider mergerProvider;
-
- /**
- * Instantiate the descriptor given its configuration.
- *
- * @param configuration
- * {@link IConfigurationElement Configuration element} of this descriptor.
- */
- public MergerProviderDescriptor(IConfigurationElement configuration) {
- element = configuration;
- fileExtension = getAttribute("fileExtension", "*"); //$NON-NLS-1$ //$NON-NLS-2$
- priority = getAttribute("priority", "low"); //$NON-NLS-1$//$NON-NLS-2$
- mergerProviderClassName = getAttribute("mergerProviderClass", null); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(MergerProviderDescriptor other) {
- final int nombre1 = other.getPriorityValue(other.getPriority());
- final int nombre2 = getPriorityValue(getPriority());
- return nombre2 - nombre1;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- boolean isEqual = true;
- if (this == obj) {
- isEqual = true;
- } else if (obj == null || getClass() != obj.getClass()) {
- isEqual = false;
- } else if (obj instanceof MergerProviderDescriptor) {
- final MergerProviderDescriptor other = (MergerProviderDescriptor)obj;
- if (mergerProviderClassName == null && other.mergerProviderClassName != null) {
- isEqual = false;
- } else if (mergerProviderClassName != null
- && !mergerProviderClassName.equals(other.mergerProviderClassName)) {
- isEqual = false;
- } else if (fileExtension == null && other.fileExtension != null) {
- isEqual = false;
- } else if (fileExtension != null && !fileExtension.equals(other.fileExtension)) {
- isEqual = false;
- } else if (priority == null && other.priority != null) {
- isEqual = false;
- } else if (priority != null && !priority.equals(other.priority)) {
- isEqual = false;
- }
- } else {
- isEqual = false;
- }
- return isEqual;
- }
-
- /**
- * Returns the file extension this engine should handle.
- *
- * @return The file extension this engine should handle.
- */
- public String getFileExtension() {
- return fileExtension;
- }
-
- /**
- * Returns the engine instance.
- *
- * @return The engine instance.
- */
- public IMergerProvider getMergerProviderInstance() {
- if (mergerProvider == null) {
- try {
- mergerProvider = (IMergerProvider)element.createExecutableExtension("mergerProviderClass"); //$NON-NLS-1$
- } catch (final CoreException e) {
- EMFComparePlugin.log(e, false);
- }
- }
- return mergerProvider;
- }
-
- /**
- * Returns the engine priority.
- *
- * @return The engine priority.
- */
- public String getPriority() {
- return priority.toLowerCase();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int classNameHash = 0;
- if (mergerProviderClassName != null) {
- classNameHash = mergerProviderClassName.hashCode();
- }
- int extensionHash = 0;
- if (fileExtension != null) {
- extensionHash = fileExtension.hashCode();
- }
- int priorityHash = 0;
- if (priority != null) {
- priorityHash = priority.hashCode();
- }
-
- return (((prime + classNameHash) * prime) + extensionHash) * prime + priorityHash;
- }
-
- /*
- * created as package visibility method to allow access from MergeFactory
- */
- /**
- * Returns the value of the priority described by the given {@link String}.<br/>Returned values according
- * to <code>priorityString</code> value :
- * <ul>
- * <li>&quot;lowest&quot; =&gt; {@value EngineConstants#PRIORITY_LOWEST}</li>
- * <li>&quot;low&quot; =&gt; {@value EngineConstants#PRIORITY_LOW}</li>
- * <li>&quot;high&quot; =&gt; {@value EngineConstants#PRIORITY_HIGH}</li>
- * <li>&quot;highest&quot; =&gt; {@value EngineConstants#PRIORITY_HIGHEST}</li>
- * <li>anything else =&gt; {@value EngineConstants#PRIORITY_NORMAL}</li>
- * </ul>
- *
- * @param priorityString
- * {@link String} value of the priority we seek.
- * @return <code>int</code> corresponding to the given priority {@link String}.
- */
- /* package */int getPriorityValue(String priorityString) {
- if (priorityString == null)
- throw new IllegalArgumentException(EMFCompareDiffMessages.getString("Descriptor.IllegalPriority")); //$NON-NLS-1$
- int priorityValue = EngineConstants.PRIORITY_NORMAL;
- if ("lowest".equals(priorityString)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_LOWEST;
- } else if ("low".equals(priorityString)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_LOW;
- } else if ("high".equals(priorityString)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_HIGH;
- } else if ("highest".equals(priorityString)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_HIGHEST;
- }
- return priorityValue;
- }
-
- /**
- * Returns the value of the attribute <code>name</code> of this descriptor's configuration element. if the
- * attribute hasn't been set, we'll return <code>defaultValue</code> instead.
- *
- * @param name
- * Name of the attribute we seek the value of.
- * @param defaultValue
- * Value to return if the attribute hasn't been set.
- * @return The value of the attribute <code>name</code>, <code>defaultValue</code> if it hasn't been set.
- */
- private String getAttribute(String name, String defaultValue) {
- final String value = element.getAttribute(name);
- if (value != null)
- return value;
- if (defaultValue != null)
- return defaultValue;
- throw new IllegalArgumentException(EMFCompareDiffMessages.getString(
- "Descriptor.MissingAttribute", name)); //$NON-NLS-1$
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/package-info.java
deleted file mode 100644
index 8cdce36fd..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/merge/service/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * Provides merging service for EMF Compare.
- * <p>
- * Clients should always use
- * {@link org.eclipse.emf.compare.diff.merge.service.MergerService} when merging
- * differences.
- * </p>
- *
- * @since 0.8
- */
-package org.eclipse.emf.compare.diff.merge.service; \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AbstractDiffExtension.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AbstractDiffExtension.java
deleted file mode 100644
index 2d03137dc..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AbstractDiffExtension.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Abstract Diff Extension</b></em>'.
- * <!-- end-user-doc --> <!-- begin-model-doc --> These can be used to extend the DiffModel so that
- * DiffElements can be collapsed under a single high level difference <!-- end-model-doc -->
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#getHideElements <em>Hide Elements
- * </em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#isIsCollapsed <em>Is Collapsed
- * </em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAbstractDiffExtension()
- * @model abstract="true"
- * @generated
- */
-public interface AbstractDiffExtension extends EObject {
- /**
- * Returns the value of the '<em><b>Hide Elements</b></em>' reference list. The list contents are of type
- * {@link org.eclipse.emf.compare.diff.metamodel.DiffElement}. It is bidirectional and its opposite is '
- * {@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getIsHiddenBy <em>Is Hidden By</em>}'. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Hide Elements</em>' reference list isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Hide Elements</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAbstractDiffExtension_HideElements()
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getIsHiddenBy
- * @model opposite="isHiddenBy"
- * @generated
- */
- EList<DiffElement> getHideElements();
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- Object getImage();
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- String getText();
-
- /**
- * Returns the value of the '<em><b>Is Collapsed</b></em>' attribute.
- * The default value is <code>"false"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Is Collapsed</em>' attribute isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Is Collapsed</em>' attribute.
- * @see #setIsCollapsed(boolean)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAbstractDiffExtension_IsCollapsed()
- * @model default="false"
- * @generated
- */
- boolean isIsCollapsed();
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @model dataType="org.eclipse.emf.compare.diff.metamodel.IMerger"
- * @generated
- */
- IMerger provideMerger();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#isIsCollapsed <em>Is Collapsed</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Is Collapsed</em>' attribute.
- * @see #isIsCollapsed()
- * @generated
- */
- void setIsCollapsed(boolean value);
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @model
- * @generated
- */
- void visit(DiffModel diffModel);
-
-} // AbstractDiffExtension
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChange.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChange.java
deleted file mode 100644
index 547dca0e6..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChange.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Attribute Change</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Superclass of elements describing difference between the values of a given attribute.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getAttribute <em>Attribute</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getLeftElement <em>Left Element</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getRightElement <em>Right Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChange()
- * @model
- * @generated
- */
-public interface AttributeChange extends DiffElement {
- /**
- * Returns the value of the '<em><b>Attribute</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute</em>' reference isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attribute</em>' reference.
- * @see #setAttribute(EAttribute)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChange_Attribute()
- * @model
- * @generated
- */
- EAttribute getAttribute();
-
- /**
- * Returns the value of the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Element</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Element</em>' reference.
- * @see #setLeftElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChange_LeftElement()
- * @model
- * @generated
- */
- EObject getLeftElement();
-
- /**
- * Returns the value of the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Element</em>' reference isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Element</em>' reference.
- * @see #setRightElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChange_RightElement()
- * @model
- * @generated
- */
- EObject getRightElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getAttribute <em>Attribute</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Attribute</em>' reference.
- * @see #getAttribute()
- * @generated
- */
- void setAttribute(EAttribute value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getLeftElement <em>Left Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Element</em>' reference.
- * @see #getLeftElement()
- * @generated
- */
- void setLeftElement(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getRightElement <em>Right Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Element</em>' reference.
- * @see #getRightElement()
- * @generated
- */
- void setRightElement(EObject value);
-
-} // AttributeChange
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeLeftTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeLeftTarget.java
deleted file mode 100644
index 306112476..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeLeftTarget.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Attribute Change Left Target</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * A "LeftTarget" element change describes a difference involving the left element/resource. In the case of AttributeChanges, these describe differences within multi-valued attributes. Specifically, the addition of a value or the remote removal of a value (for three way comparisons).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget#getLeftTarget <em>Left Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChangeLeftTarget()
- * @model
- * @generated
- */
-public interface AttributeChangeLeftTarget extends AttributeChange {
- /**
- * Returns the value of the '<em><b>Left Target</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Target</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Target</em>' attribute.
- * @see #setLeftTarget(Object)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChangeLeftTarget_LeftTarget()
- * @model
- * @generated
- */
- Object getLeftTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget#getLeftTarget <em>Left Target</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Target</em>' attribute.
- * @see #getLeftTarget()
- * @generated
- */
- void setLeftTarget(Object value);
-
-} // AttributeChangeLeftTarget
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeRightTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeRightTarget.java
deleted file mode 100644
index f6c07c639..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeChangeRightTarget.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Attribute Change Right Target</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * A "RightTarget" element change describes a difference involving the right element/resource. In the case of AttributeChanges, these describe differences within multi-valued attributes. Specifically, the removal of a value or the remote addition of a value (for three way comparisons).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChangeRightTarget()
- * @model
- * @generated
- */
-public interface AttributeChangeRightTarget extends AttributeChange {
- /**
- * Returns the value of the '<em><b>Right Target</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Target</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Target</em>' attribute.
- * @see #setRightTarget(Object)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeChangeRightTarget_RightTarget()
- * @model
- * @generated
- */
- Object getRightTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget#getRightTarget <em>Right Target</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Target</em>' attribute.
- * @see #getRightTarget()
- * @generated
- */
- void setRightTarget(Object value);
-
-} // AttributeChangeRightTarget
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeOrderChange.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeOrderChange.java
deleted file mode 100644
index 0ebc200fe..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/AttributeOrderChange.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Attribute Order Change</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getAttributeOrderChange()
- * @model
- * @generated
- * @since 1.3
- */
-public interface AttributeOrderChange extends AttributeChange {
- // AttributeOrderChange
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSetSnapshot.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSetSnapshot.java
deleted file mode 100644
index 9f1178066..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSetSnapshot.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.compare.match.metamodel.MatchResourceSet;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '
- * <em><b>Comparison Resource Set Snapshot</b></em>'. <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * This can be used to hold the result of ResourceSet-wide comparisons.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getDiffResourceSet <em>Diff Resource Set</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getMatchResourceSet <em>Match Resource Set</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonResourceSetSnapshot()
- * @model
- * @generated
- */
-public interface ComparisonResourceSetSnapshot extends ComparisonSnapshot {
- /**
- * Returns the value of the '<em><b>Diff Resource Set</b></em>' containment reference.
- * <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of the '<em>Diff Resource Set</em>' containment reference isn't clear, there really
- * should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Diff Resource Set</em>' containment reference.
- * @see #setDiffResourceSet(DiffResourceSet)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonResourceSetSnapshot_DiffResourceSet()
- * @model containment="true"
- * @generated
- */
- DiffResourceSet getDiffResourceSet();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getDiffResourceSet <em>Diff Resource Set</em>}' containment reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Diff Resource Set</em>' containment reference.
- * @see #getDiffResourceSet()
- * @generated
- */
- void setDiffResourceSet(DiffResourceSet value);
-
- /**
- * Returns the value of the '<em><b>Match Resource Set</b></em>' containment reference. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Match Resource Set</em>' containment reference isn't clear, there really
- * should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Match Resource Set</em>' containment reference.
- * @see #setMatchResourceSet(MatchResourceSet)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonResourceSetSnapshot_MatchResourceSet()
- * @model containment="true"
- * @generated
- */
- MatchResourceSet getMatchResourceSet();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getMatchResourceSet <em>Match Resource Set</em>}' containment reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Match Resource Set</em>' containment reference.
- * @see #getMatchResourceSet()
- * @generated
- */
- void setMatchResourceSet(MatchResourceSet value);
-
-} // ComparisonResourceSetSnapshot
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSnapshot.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSnapshot.java
deleted file mode 100644
index 97a132c75..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonResourceSnapshot.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Comparison Snapshot</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * This can be used to hold the result of single-elements comparison (Resource with Resource, EObject with EObject, ...).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getDiff <em>Diff</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getMatch <em>Match</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonResourceSnapshot()
- * @model
- * @generated
- */
-public interface ComparisonResourceSnapshot extends ComparisonSnapshot {
- /**
- * Returns the value of the '<em><b>Diff</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Diff</em>' containment reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Diff</em>' containment reference.
- * @see #setDiff(DiffModel)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonResourceSnapshot_Diff()
- * @model containment="true"
- * @generated
- */
- DiffModel getDiff();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getDiff <em>Diff</em>}' containment reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Diff</em>' containment reference.
- * @see #getDiff()
- * @generated
- */
- void setDiff(DiffModel value);
-
- /**
- * Returns the value of the '<em><b>Match</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Match</em>' containment reference isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Match</em>' containment reference.
- * @see #setMatch(MatchModel)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonResourceSnapshot_Match()
- * @model containment="true"
- * @generated
- */
- MatchModel getMatch();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getMatch <em>Match</em>}' containment reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Match</em>' containment reference.
- * @see #getMatch()
- * @generated
- */
- void setMatch(MatchModel value);
-
-} // ComparisonResourceSnapshot
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonSnapshot.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonSnapshot.java
deleted file mode 100644
index 06b9a45d1..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ComparisonSnapshot.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import java.util.Date;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Comparison Snapshot</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Superclass for classes allowing the serialization of comparison results.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot#getDate <em>Date</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonSnapshot()
- * @model interface="true" abstract="true"
- * @generated
- */
-public interface ComparisonSnapshot extends EObject {
- /**
- * Returns the value of the '<em><b>Date</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Date</em>' attribute isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Date</em>' attribute.
- * @see #setDate(Date)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getComparisonSnapshot_Date()
- * @model
- * @generated
- */
- Date getDate();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot#getDate <em>Date</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Date</em>' attribute.
- * @see #getDate()
- * @generated
- */
- void setDate(Date value);
-
-} // ComparisonSnapshot
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ConflictingDiffElement.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ConflictingDiffElement.java
deleted file mode 100644
index 78529b053..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ConflictingDiffElement.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Conflicting Diff Element</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * This will act as a container for conflictual changes.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getLeftParent <em>Left Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getRightParent <em>Right Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getOriginElement <em>Origin Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getConflictingDiffElement()
- * @model
- * @generated
- */
-public interface ConflictingDiffElement extends DiffElement {
- /**
- * Returns the value of the '<em><b>Left Parent</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Parent</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Parent</em>' reference.
- * @see #setLeftParent(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getConflictingDiffElement_LeftParent()
- * @model
- * @generated
- */
- EObject getLeftParent();
-
- /**
- * Returns the value of the '<em><b>Origin Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Origin Element</em>' reference isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Origin Element</em>' reference.
- * @see #setOriginElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getConflictingDiffElement_OriginElement()
- * @model
- * @generated
- */
- EObject getOriginElement();
-
- /**
- * Returns the value of the '<em><b>Right Parent</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Parent</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Parent</em>' reference.
- * @see #setRightParent(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getConflictingDiffElement_RightParent()
- * @model
- * @generated
- */
- EObject getRightParent();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getLeftParent <em>Left Parent</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Parent</em>' reference.
- * @see #getLeftParent()
- * @generated
- */
- void setLeftParent(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getOriginElement <em>Origin Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Origin Element</em>' reference.
- * @see #getOriginElement()
- * @generated
- */
- void setOriginElement(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getRightParent <em>Right Parent</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Parent</em>' reference.
- * @see #getRightParent()
- * @generated
- */
- void setRightParent(EObject value);
-
-} // ConflictingDiffElement
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffElement.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffElement.java
deleted file mode 100644
index 9f8247953..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffElement.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Element</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * This is the superclass of all types of differences EMF Compare can detect.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getSubDiffElements <em>Sub Diff Elements</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getIsHiddenBy <em>Is Hidden By</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#isConflicting <em>Conflicting</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#isRemote <em>Remote</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequires <em>Requires</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequiredBy <em>Required By</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement()
- * @model abstract="true"
- * @generated
- */
-public interface DiffElement extends EObject {
- /**
- * Returns the value of the '<em><b>Is Hidden By</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension}.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#getHideElements <em>Hide Elements</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Is Hidden By</em>' reference list isn't clear, there really should be
- * more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Is Hidden By</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_IsHiddenBy()
- * @see org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#getHideElements
- * @model opposite="hideElements"
- * @generated
- */
- EList<AbstractDiffExtension> getIsHiddenBy();
-
- /**
- * Returns the value of the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * This will return true if this DiffElement is conflicting with another. It will in fact check that the
- * direct container of this element is a {@link ConflictingDiffElement}.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Conflicting</em>' attribute.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_Conflicting()
- * @model transient="true" changeable="false" derived="true"
- * @generated
- */
- boolean isConflicting();
-
- /**
- * Returns the value of the '<em><b>Kind</b></em>' attribute.
- * The default value is <code>""</code>.
- * The literals are from the enumeration {@link org.eclipse.emf.compare.diff.metamodel.DifferenceKind}.
- * <!-- begin-user-doc -->
- * <p>
- * Return the kind of Difference this DiffElement is. AddModelElement and RemoteAddModelElement are both
- * {@link DifferenceKind#ADDITION}, MoveModelElement is a {@link DifferenceKind#MOVE} ...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.emf.compare.diff.metamodel.DifferenceKind
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_Kind()
- * @model default="" transient="true" changeable="false" derived="true"
- * @generated
- */
- DifferenceKind getKind();
-
- /**
- * Returns the value of the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Remote</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Remote</em>' attribute.
- * @see #setRemote(boolean)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_Remote()
- * @model
- * @generated
- */
- boolean isRemote();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#isRemote <em>Remote</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Remote</em>' attribute.
- * @see #isRemote()
- * @generated
- */
- void setRemote(boolean value);
-
- /**
- * Returns the value of the '<em><b>Requires</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.DiffElement}.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequiredBy <em>Required By</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Requires</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Requires</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_Requires()
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequiredBy
- * @model opposite="requiredBy"
- * @generated
- * @since 1.3
- */
- EList<DiffElement> getRequires();
-
- /**
- * Returns the value of the '<em><b>Required By</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.DiffElement}.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequires <em>Requires</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Required By</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Required By</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_RequiredBy()
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequires
- * @model opposite="requires"
- * @generated
- * @since 1.3
- */
- EList<DiffElement> getRequiredBy();
-
- /**
- * Returns the value of the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.DiffElement}.
- * <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of the '<em>Sub Diff Elements</em>' containment reference list isn't clear, there
- * really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sub Diff Elements</em>' containment reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffElement_SubDiffElements()
- * @model containment="true"
- * @generated
- */
- EList<DiffElement> getSubDiffElements();
-
-} // DiffElement
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
deleted file mode 100644
index 2f957bb4b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffFactory.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each
- * non-abstract class of the model. <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage
- * @generated
- */
-public interface DiffFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- DiffFactory eINSTANCE = org.eclipse.emf.compare.diff.metamodel.impl.DiffFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Attribute Change</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Attribute Change</em>'.
- * @generated
- */
- AttributeChange createAttributeChange();
-
- /**
- * Returns a new object of class '<em>Attribute Change Left Target</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Attribute Change Left Target</em>'.
- * @generated
- */
- AttributeChangeLeftTarget createAttributeChangeLeftTarget();
-
- /**
- * Returns a new object of class '<em>Attribute Change Right Target</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Attribute Change Right Target</em>'.
- * @generated
- */
- AttributeChangeRightTarget createAttributeChangeRightTarget();
-
- /**
- * Returns a new object of class '<em>Attribute Order Change</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Attribute Order Change</em>'.
- * @generated
- * @since 1.3
- */
- AttributeOrderChange createAttributeOrderChange();
-
- /**
- * Returns a new object of class '<em>Conflicting Diff Element</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Conflicting Diff Element</em>'.
- * @generated
- */
- ConflictingDiffElement createConflictingDiffElement();
-
- /**
- * Returns a new object of class '<em>Group</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return a new object of class '<em>Group</em>'.
- * @generated
- */
- DiffGroup createDiffGroup();
-
- /**
- * Returns a new object of class '<em>Comparison Resource Snapshot</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Comparison Resource Snapshot</em>'.
- * @generated
- */
- ComparisonResourceSnapshot createComparisonResourceSnapshot();
-
- /**
- * Returns a new object of class '<em>Comparison Resource Set Snapshot</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Comparison Resource Set Snapshot</em>'.
- * @generated
- */
- ComparisonResourceSetSnapshot createComparisonResourceSetSnapshot();
-
- /**
- * Returns a new object of class '<em>Model</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return a new object of class '<em>Model</em>'.
- * @generated
- */
- DiffModel createDiffModel();
-
- /**
- * Returns a new object of class '<em>Resource Set</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Set</em>'.
- * @generated
- */
- DiffResourceSet createDiffResourceSet();
-
- /**
- * Returns a new object of class '<em>Model Element Change</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Model Element Change</em>'.
- * @generated
- */
- ModelElementChange createModelElementChange();
-
- /**
- * Returns a new object of class '<em>Model Element Change Left Target</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Model Element Change Left Target</em>'.
- * @generated
- */
- ModelElementChangeLeftTarget createModelElementChangeLeftTarget();
-
- /**
- * Returns a new object of class '<em>Model Element Change Right Target</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Model Element Change Right Target</em>'.
- * @generated
- */
- ModelElementChangeRightTarget createModelElementChangeRightTarget();
-
- /**
- * Returns a new object of class '<em>Move Model Element</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Move Model Element</em>'.
- * @generated
- */
- MoveModelElement createMoveModelElement();
-
- /**
- * Returns a new object of class '<em>Update Containment Feature</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Update Containment Feature</em>'.
- * @generated
- */
- UpdateContainmentFeature createUpdateContainmentFeature();
-
- /**
- * Returns a new object of class '<em>Reference Change</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Reference Change</em>'.
- * @generated
- */
- ReferenceChange createReferenceChange();
-
- /**
- * Returns a new object of class '<em>Reference Change Left Target</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Reference Change Left Target</em>'.
- * @generated
- */
- ReferenceChangeLeftTarget createReferenceChangeLeftTarget();
-
- /**
- * Returns a new object of class '<em>Reference Change Right Target</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Reference Change Right Target</em>'.
- * @generated
- */
- ReferenceChangeRightTarget createReferenceChangeRightTarget();
-
- /**
- * Returns a new object of class '<em>Resource Diff</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Diff</em>'.
- * @generated
- */
- ResourceDiff createResourceDiff();
-
- /**
- * Returns a new object of class '<em>Resource Dependency Change</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Dependency Change</em>'.
- * @generated
- */
- ResourceDependencyChange createResourceDependencyChange();
-
- /**
- * Returns a new object of class '<em>Resource Dependency Change Left Target</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Dependency Change Left Target</em>'.
- * @generated
- */
- ResourceDependencyChangeLeftTarget createResourceDependencyChangeLeftTarget();
-
- /**
- * Returns a new object of class '<em>Resource Dependency Change Right Target</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Dependency Change Right Target</em>'.
- * @generated
- */
- ResourceDependencyChangeRightTarget createResourceDependencyChangeRightTarget();
-
- /**
- * Returns a new object of class '<em>Update Attribute</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Update Attribute</em>'.
- * @generated
- */
- UpdateAttribute createUpdateAttribute();
-
- /**
- * Returns a new object of class '<em>Update Model Element</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Update Model Element</em>'.
- * @generated
- */
- UpdateModelElement createUpdateModelElement();
-
- /**
- * Returns a new object of class '<em>Update Reference</em>'.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @return a new object of class '<em>Update Reference</em>'.
- * @generated
- */
- UpdateReference createUpdateReference();
-
- /**
- * Returns a new object of class '<em>Reference Order Change</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Reference Order Change</em>'.
- * @generated
- */
- ReferenceOrderChange createReferenceOrderChange();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- DiffPackage getDiffPackage();
-
-} // DiffFactory
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffGroup.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffGroup.java
deleted file mode 100644
index e58e58329..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffGroup.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Group</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * DiffGroups are used as container for differences so that we can maintain the original models' hierarchy within the differences model.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup#getRightParent <em>Right Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup#getSubchanges <em>Subchanges</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffGroup()
- * @model
- * @generated
- */
-public interface DiffGroup extends DiffElement {
- /**
- * Returns the value of the '<em><b>Right Parent</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Parent</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Parent</em>' reference.
- * @see #setRightParent(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffGroup_RightParent()
- * @model
- * @generated
- */
- EObject getRightParent();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup#getRightParent <em>Right Parent</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Parent</em>' reference.
- * @see #getRightParent()
- * @generated
- */
- void setRightParent(EObject value);
-
- /**
- * Returns the value of the '<em><b>Subchanges</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Subchanges</em>' attribute isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Subchanges</em>' attribute.
- * @see #isSetSubchanges()
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffGroup_Subchanges()
- * @model unsettable="true" transient="true" changeable="false" derived="true"
- * @generated
- */
- int getSubchanges();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup#getSubchanges <em>Subchanges</em>}' attribute is set.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return whether the value of the '<em>Subchanges</em>' attribute is set.
- * @see #getSubchanges()
- * @generated
- */
- boolean isSetSubchanges();
-
-} // DiffGroup
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffModel.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffModel.java
deleted file mode 100644
index 8528fdf16..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffModel.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Model</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Root of the differences model for single resources differencing.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getOwnedElements <em>Owned Elements</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getLeftRoots <em>Left Roots</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getRightRoots <em>Right Roots</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getAncestorRoots <em>Ancestor Roots</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffModel()
- * @model
- * @generated
- */
-public interface DiffModel extends EObject {
- /**
- * Returns the value of the '<em><b>Owned Elements</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.DiffElement}.
- * <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of the '<em>Owned Elements</em>' containment reference list isn't clear, there
- * really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Owned Elements</em>' containment reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffModel_OwnedElements()
- * @model containment="true"
- * @generated
- */
- EList<DiffElement> getOwnedElements();
-
- /**
- * Returns the value of the '<em><b>Left Roots</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Roots</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Roots</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffModel_LeftRoots()
- * @model
- * @generated
- */
- EList<EObject> getLeftRoots();
-
- /**
- * Returns the value of the '<em><b>Right Roots</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Roots</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Roots</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffModel_RightRoots()
- * @model
- * @generated
- */
- EList<EObject> getRightRoots();
-
- /**
- * Returns the value of the '<em><b>Ancestor Roots</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Ancestor Roots</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Ancestor Roots</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffModel_AncestorRoots()
- * @model
- * @generated
- */
- EList<EObject> getAncestorRoots();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- int getSubchanges();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<DiffElement> getDifferences(EObject modelElement);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- EList<DiffElement> getDifferences();
-
-} // DiffModel
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
deleted file mode 100644
index eab987345..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffPackage.java
+++ /dev/null
@@ -1,4359 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains accessors for the meta objects to
- * represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DiffFactory
- * @model kind="package"
- * @generated
- */
-public interface DiffPackage extends EPackage {
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl <em>Abstract Diff Extension</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAbstractDiffExtension()
- * @generated
- */
- int ABSTRACT_DIFF_EXTENSION = 24;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl <em>Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffElement()
- * @generated
- */
- int DIFF_ELEMENT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffGroupImpl <em>Group</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffGroupImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffGroup()
- * @generated
- */
- int DIFF_GROUP = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl <em>Model</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffModel()
- * @generated
- */
- int DIFF_MODEL = 0;
-
- /**
- * The feature id for the '<em><b>Owned Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DIFF_MODEL__OWNED_ELEMENTS = 0;
-
- /**
- * The feature id for the '<em><b>Left Roots</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_MODEL__LEFT_ROOTS = 1;
-
- /**
- * The feature id for the '<em><b>Right Roots</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_MODEL__RIGHT_ROOTS = 2;
-
- /**
- * The feature id for the '<em><b>Ancestor Roots</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_MODEL__ANCESTOR_ROOTS = 3;
-
- /**
- * The number of structural features of the '<em>Model</em>' class.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_MODEL_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffResourceSetImpl <em>Resource Set</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffResourceSetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffResourceSet()
- * @generated
- */
- int DIFF_RESOURCE_SET = 1;
-
- /**
- * The feature id for the '<em><b>Diff Models</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_RESOURCE_SET__DIFF_MODELS = 0;
-
- /**
- * The feature id for the '<em><b>Resource Diffs</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_RESOURCE_SET__RESOURCE_DIFFS = 1;
-
- /**
- * The number of structural features of the '<em>Resource Set</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_RESOURCE_SET_FEATURE_COUNT = 2;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DIFF_ELEMENT__SUB_DIFF_ELEMENTS = 0;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_ELEMENT__IS_HIDDEN_BY = 1;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_ELEMENT__CONFLICTING = 2;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int DIFF_ELEMENT__KIND = 3;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_ELEMENT__REMOTE = 4;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int DIFF_ELEMENT__REQUIRES = 5;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int DIFF_ELEMENT__REQUIRED_BY = 6;
-
- /**
- * The number of structural features of the '<em>Element</em>' class.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_ELEMENT_FEATURE_COUNT = 7;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl <em>Conflicting Diff Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getConflictingDiffElement()
- * @generated
- */
- int CONFLICTING_DIFF_ELEMENT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl <em>Attribute Change</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeChange()
- * @generated
- */
- int ATTRIBUTE_CHANGE = 14;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeLeftTargetImpl <em>Attribute Change Left Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeChangeLeftTarget()
- * @generated
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET = 15;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeRightTargetImpl <em>Attribute Change Right Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeChangeRightTarget()
- * @generated
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET = 16;
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- DiffPackage eINSTANCE = org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl.init();
-
- /**
- * The package name.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "diff"; //$NON-NLS-1$
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "diff"; //$NON-NLS-1$
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/emf/compare/diff/1.1"; //$NON-NLS-1$
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__SUB_DIFF_ELEMENTS = DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__IS_HIDDEN_BY = DIFF_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__CONFLICTING = DIFF_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__KIND = DIFF_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__REMOTE = DIFF_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int CONFLICTING_DIFF_ELEMENT__REQUIRES = DIFF_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int CONFLICTING_DIFF_ELEMENT__REQUIRED_BY = DIFF_ELEMENT__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Left Parent</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__LEFT_PARENT = DIFF_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Parent</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT = DIFF_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Origin Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT = DIFF_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Conflicting Diff Element</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CONFLICTING_DIFF_ELEMENT_FEATURE_COUNT = DIFF_ELEMENT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DIFF_GROUP__SUB_DIFF_ELEMENTS = DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_GROUP__IS_HIDDEN_BY = DIFF_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_GROUP__CONFLICTING = DIFF_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int DIFF_GROUP__KIND = DIFF_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_GROUP__REMOTE = DIFF_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int DIFF_GROUP__REQUIRES = DIFF_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int DIFF_GROUP__REQUIRED_BY = DIFF_ELEMENT__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Right Parent</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_GROUP__RIGHT_PARENT = DIFF_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Subchanges</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_GROUP__SUBCHANGES = DIFF_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Group</em>' class.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int DIFF_GROUP_FEATURE_COUNT = DIFF_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot <em>Comparison Snapshot</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getComparisonSnapshot()
- * @generated
- */
- int COMPARISON_SNAPSHOT = 5;
-
- /**
- * The feature id for the '<em><b>Date</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_SNAPSHOT__DATE = 0;
-
- /**
- * The number of structural features of the '<em>Comparison Snapshot</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_SNAPSHOT_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl <em>Comparison Resource Snapshot</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getComparisonResourceSnapshot()
- * @generated
- */
- int COMPARISON_RESOURCE_SNAPSHOT = 6;
-
- /**
- * The feature id for the '<em><b>Date</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SNAPSHOT__DATE = COMPARISON_SNAPSHOT__DATE;
-
- /**
- * The feature id for the '<em><b>Diff</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SNAPSHOT__DIFF = COMPARISON_SNAPSHOT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Match</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SNAPSHOT__MATCH = COMPARISON_SNAPSHOT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Comparison Resource Snapshot</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SNAPSHOT_FEATURE_COUNT = COMPARISON_SNAPSHOT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl <em>Comparison Resource Set Snapshot</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getComparisonResourceSetSnapshot()
- * @generated
- */
- int COMPARISON_RESOURCE_SET_SNAPSHOT = 7;
-
- /**
- * The feature id for the '<em><b>Date</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SET_SNAPSHOT__DATE = COMPARISON_SNAPSHOT__DATE;
-
- /**
- * The feature id for the '<em><b>Diff Resource Set</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET = COMPARISON_SNAPSHOT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Match Resource Set</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET = COMPARISON_SNAPSHOT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Comparison Resource Set Snapshot</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int COMPARISON_RESOURCE_SET_SNAPSHOT_FEATURE_COUNT = COMPARISON_SNAPSHOT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '<em>IMerger</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @see org.eclipse.emf.compare.diff.merge.IMerger
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getIMerger()
- * @generated
- */
- int IMERGER = 30;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeImpl <em>Model Element Change</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelElementChange()
- * @generated
- */
- int MODEL_ELEMENT_CHANGE = 8;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeLeftTargetImpl <em>Model Element Change Left Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelElementChangeLeftTarget()
- * @generated
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET = 9;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeRightTargetImpl <em>Model Element Change Right Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelElementChangeRightTarget()
- * @generated
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET = 10;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE__SUB_DIFF_ELEMENTS = DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE__IS_HIDDEN_BY = DIFF_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE__CONFLICTING = DIFF_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE__KIND = DIFF_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE__REMOTE = DIFF_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MODEL_ELEMENT_CHANGE__REQUIRES = DIFF_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MODEL_ELEMENT_CHANGE__REQUIRED_BY = DIFF_ELEMENT__REQUIRED_BY;
-
- /**
- * The number of structural features of the '<em>Model Element Change</em>' class.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_FEATURE_COUNT = DIFF_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__SUB_DIFF_ELEMENTS = MODEL_ELEMENT_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__IS_HIDDEN_BY = MODEL_ELEMENT_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__CONFLICTING = MODEL_ELEMENT_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__KIND = MODEL_ELEMENT_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__REMOTE = MODEL_ELEMENT_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__REQUIRES = MODEL_ELEMENT_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__REQUIRED_BY = MODEL_ELEMENT_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Right Parent</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Model Element Change Left Target</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_LEFT_TARGET_FEATURE_COUNT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__SUB_DIFF_ELEMENTS = MODEL_ELEMENT_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__IS_HIDDEN_BY = MODEL_ELEMENT_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__CONFLICTING = MODEL_ELEMENT_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__KIND = MODEL_ELEMENT_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__REMOTE = MODEL_ELEMENT_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__REQUIRES = MODEL_ELEMENT_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__REQUIRED_BY = MODEL_ELEMENT_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Left Parent</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Model Element Change Right Target</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_ELEMENT_CHANGE_RIGHT_TARGET_FEATURE_COUNT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl <em>Reference Change</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceChange()
- * @generated
- */
- int REFERENCE_CHANGE = 19;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeLeftTargetImpl <em>Reference Change Left Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceChangeLeftTarget()
- * @generated
- */
- int REFERENCE_CHANGE_LEFT_TARGET = 20;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeRightTargetImpl <em>Reference Change Right Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceChangeRightTarget()
- * @generated
- */
- int REFERENCE_CHANGE_RIGHT_TARGET = 21;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateAttributeImpl <em>Update Attribute</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateAttributeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateAttribute()
- * @generated
- */
- int UPDATE_ATTRIBUTE = 18;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateModelElementImpl <em>Update Model Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateModelElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateModelElement()
- * @generated
- */
- int UPDATE_MODEL_ELEMENT = 11;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__SUB_DIFF_ELEMENTS = MODEL_ELEMENT_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__IS_HIDDEN_BY = MODEL_ELEMENT_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__CONFLICTING = MODEL_ELEMENT_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__KIND = MODEL_ELEMENT_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__REMOTE = MODEL_ELEMENT_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_MODEL_ELEMENT__REQUIRES = MODEL_ELEMENT_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_MODEL_ELEMENT__REQUIRED_BY = MODEL_ELEMENT_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT__LEFT_ELEMENT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Update Model Element</em>' class.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_MODEL_ELEMENT_FEATURE_COUNT = MODEL_ELEMENT_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateReferenceImpl <em>Update Reference</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateReferenceImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateReference()
- * @generated
- */
- int UPDATE_REFERENCE = 22;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.MoveModelElementImpl <em>Move Model Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.MoveModelElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getMoveModelElement()
- * @generated
- */
- int MOVE_MODEL_ELEMENT = 12;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__SUB_DIFF_ELEMENTS = UPDATE_MODEL_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__IS_HIDDEN_BY = UPDATE_MODEL_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__CONFLICTING = UPDATE_MODEL_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__KIND = UPDATE_MODEL_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__REMOTE = UPDATE_MODEL_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MOVE_MODEL_ELEMENT__REQUIRES = UPDATE_MODEL_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int MOVE_MODEL_ELEMENT__REQUIRED_BY = UPDATE_MODEL_ELEMENT__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__RIGHT_ELEMENT = UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__LEFT_ELEMENT = UPDATE_MODEL_ELEMENT__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__LEFT_TARGET = UPDATE_MODEL_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT__RIGHT_TARGET = UPDATE_MODEL_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Move Model Element</em>' class.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MOVE_MODEL_ELEMENT_FEATURE_COUNT = UPDATE_MODEL_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateContainmentFeatureImpl <em>Update Containment Feature</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateContainmentFeatureImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateContainmentFeature()
- * @generated
- */
- int UPDATE_CONTAINMENT_FEATURE = 13;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__SUB_DIFF_ELEMENTS = MOVE_MODEL_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__IS_HIDDEN_BY = MOVE_MODEL_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__CONFLICTING = MOVE_MODEL_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__KIND = MOVE_MODEL_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__REMOTE = MOVE_MODEL_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_CONTAINMENT_FEATURE__REQUIRES = MOVE_MODEL_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_CONTAINMENT_FEATURE__REQUIRED_BY = MOVE_MODEL_ELEMENT__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__RIGHT_ELEMENT = MOVE_MODEL_ELEMENT__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__LEFT_ELEMENT = MOVE_MODEL_ELEMENT__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__LEFT_TARGET = MOVE_MODEL_ELEMENT__LEFT_TARGET;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE__RIGHT_TARGET = MOVE_MODEL_ELEMENT__RIGHT_TARGET;
-
- /**
- * The number of structural features of the '<em>Update Containment Feature</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_CONTAINMENT_FEATURE_FEATURE_COUNT = MOVE_MODEL_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__SUB_DIFF_ELEMENTS = DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__IS_HIDDEN_BY = DIFF_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__CONFLICTING = DIFF_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__KIND = DIFF_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__REMOTE = DIFF_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_CHANGE__REQUIRES = DIFF_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_CHANGE__REQUIRED_BY = DIFF_ELEMENT__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Attribute</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__ATTRIBUTE = DIFF_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__LEFT_ELEMENT = DIFF_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE__RIGHT_ELEMENT = DIFF_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Attribute Change</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_FEATURE_COUNT = DIFF_ELEMENT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__SUB_DIFF_ELEMENTS = ATTRIBUTE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__IS_HIDDEN_BY = ATTRIBUTE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__CONFLICTING = ATTRIBUTE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__KIND = ATTRIBUTE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__REMOTE = ATTRIBUTE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__REQUIRES = ATTRIBUTE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__REQUIRED_BY = ATTRIBUTE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Attribute</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__ATTRIBUTE = ATTRIBUTE_CHANGE__ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_ELEMENT = ATTRIBUTE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__RIGHT_ELEMENT = ATTRIBUTE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Attribute Change Left Target</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_LEFT_TARGET_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__SUB_DIFF_ELEMENTS = ATTRIBUTE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__IS_HIDDEN_BY = ATTRIBUTE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__CONFLICTING = ATTRIBUTE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__KIND = ATTRIBUTE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__REMOTE = ATTRIBUTE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__REQUIRES = ATTRIBUTE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__REQUIRED_BY = ATTRIBUTE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Attribute</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__ATTRIBUTE = ATTRIBUTE_CHANGE__ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__LEFT_ELEMENT = ATTRIBUTE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT = ATTRIBUTE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Attribute Change Right Target</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_CHANGE_RIGHT_TARGET_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeOrderChangeImpl <em>Attribute Order Change</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeOrderChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeOrderChange()
- * @generated
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE = 17;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__SUB_DIFF_ELEMENTS = ATTRIBUTE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__IS_HIDDEN_BY = ATTRIBUTE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__CONFLICTING = ATTRIBUTE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__KIND = ATTRIBUTE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__REMOTE = ATTRIBUTE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__REQUIRES = ATTRIBUTE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__REQUIRED_BY = ATTRIBUTE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Attribute</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__ATTRIBUTE = ATTRIBUTE_CHANGE__ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__LEFT_ELEMENT = ATTRIBUTE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE__RIGHT_ELEMENT = ATTRIBUTE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The number of structural features of the '<em>Attribute Order Change</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int ATTRIBUTE_ORDER_CHANGE_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__SUB_DIFF_ELEMENTS = ATTRIBUTE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__IS_HIDDEN_BY = ATTRIBUTE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__CONFLICTING = ATTRIBUTE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__KIND = ATTRIBUTE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__REMOTE = ATTRIBUTE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_ATTRIBUTE__REQUIRES = ATTRIBUTE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_ATTRIBUTE__REQUIRED_BY = ATTRIBUTE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Attribute</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__ATTRIBUTE = ATTRIBUTE_CHANGE__ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__LEFT_ELEMENT = ATTRIBUTE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE__RIGHT_ELEMENT = ATTRIBUTE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The number of structural features of the '<em>Update Attribute</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_ATTRIBUTE_FEATURE_COUNT = ATTRIBUTE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__SUB_DIFF_ELEMENTS = DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__IS_HIDDEN_BY = DIFF_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__CONFLICTING = DIFF_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__KIND = DIFF_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__REMOTE = DIFF_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_CHANGE__REQUIRES = DIFF_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_CHANGE__REQUIRED_BY = DIFF_ELEMENT__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__REFERENCE = DIFF_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__RIGHT_ELEMENT = DIFF_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE__LEFT_ELEMENT = DIFF_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Reference Change</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_FEATURE_COUNT = DIFF_ELEMENT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__SUB_DIFF_ELEMENTS = REFERENCE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__IS_HIDDEN_BY = REFERENCE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__CONFLICTING = REFERENCE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__KIND = REFERENCE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__REMOTE = REFERENCE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_CHANGE_LEFT_TARGET__REQUIRES = REFERENCE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_CHANGE_LEFT_TARGET__REQUIRED_BY = REFERENCE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__REFERENCE = REFERENCE_CHANGE__REFERENCE;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__RIGHT_ELEMENT = REFERENCE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__LEFT_ELEMENT = REFERENCE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Reference Change Left Target</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_LEFT_TARGET_FEATURE_COUNT = REFERENCE_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__SUB_DIFF_ELEMENTS = REFERENCE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__IS_HIDDEN_BY = REFERENCE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__CONFLICTING = REFERENCE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__KIND = REFERENCE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__REMOTE = REFERENCE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__REQUIRES = REFERENCE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__REQUIRED_BY = REFERENCE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__REFERENCE = REFERENCE_CHANGE__REFERENCE;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT = REFERENCE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__LEFT_ELEMENT = REFERENCE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Reference Change Right Target</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int REFERENCE_CHANGE_RIGHT_TARGET_FEATURE_COUNT = REFERENCE_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__SUB_DIFF_ELEMENTS = REFERENCE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__IS_HIDDEN_BY = REFERENCE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__CONFLICTING = REFERENCE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__KIND = REFERENCE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__REMOTE = REFERENCE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_REFERENCE__REQUIRES = REFERENCE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int UPDATE_REFERENCE__REQUIRED_BY = REFERENCE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__REFERENCE = REFERENCE_CHANGE__REFERENCE;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__RIGHT_ELEMENT = REFERENCE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__LEFT_ELEMENT = REFERENCE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__LEFT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE__RIGHT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Update Reference</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UPDATE_REFERENCE_FEATURE_COUNT = REFERENCE_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceOrderChangeImpl <em>Reference Order Change</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceOrderChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceOrderChange()
- * @generated
- */
- int REFERENCE_ORDER_CHANGE = 23;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__SUB_DIFF_ELEMENTS = REFERENCE_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__IS_HIDDEN_BY = REFERENCE_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__CONFLICTING = REFERENCE_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__KIND = REFERENCE_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__REMOTE = REFERENCE_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_ORDER_CHANGE__REQUIRES = REFERENCE_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int REFERENCE_ORDER_CHANGE__REQUIRED_BY = REFERENCE_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__REFERENCE = REFERENCE_CHANGE__REFERENCE;
-
- /**
- * The feature id for the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__RIGHT_ELEMENT = REFERENCE_CHANGE__RIGHT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__LEFT_ELEMENT = REFERENCE_CHANGE__LEFT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Left Target</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__LEFT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Right Target</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE__RIGHT_TARGET = REFERENCE_CHANGE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Reference Order Change</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int REFERENCE_ORDER_CHANGE_FEATURE_COUNT = REFERENCE_CHANGE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Hide Elements</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS = 0;
-
- /**
- * The feature id for the '<em><b>Is Collapsed</b></em>' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED = 1;
-
- /**
- * The number of structural features of the '<em>Abstract Diff Extension</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ABSTRACT_DIFF_EXTENSION_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDiffImpl <em>Resource Diff</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDiffImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDiff()
- * @generated
- */
- int RESOURCE_DIFF = 25;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DIFF__SUB_DIFF_ELEMENTS = DIFF_ELEMENT__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DIFF__IS_HIDDEN_BY = DIFF_ELEMENT__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DIFF__CONFLICTING = DIFF_ELEMENT__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DIFF__KIND = DIFF_ELEMENT__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DIFF__REMOTE = DIFF_ELEMENT__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DIFF__REQUIRES = DIFF_ELEMENT__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DIFF__REQUIRED_BY = DIFF_ELEMENT__REQUIRED_BY;
-
- /**
- * The number of structural features of the '<em>Resource Diff</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DIFF_FEATURE_COUNT = DIFF_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeImpl <em>Resource Dependency Change</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDependencyChange()
- * @generated
- */
- int RESOURCE_DEPENDENCY_CHANGE = 26;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE__SUB_DIFF_ELEMENTS = RESOURCE_DIFF__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE__IS_HIDDEN_BY = RESOURCE_DIFF__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE__CONFLICTING = RESOURCE_DIFF__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE__KIND = RESOURCE_DIFF__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE__REMOTE = RESOURCE_DIFF__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DEPENDENCY_CHANGE__REQUIRES = RESOURCE_DIFF__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DEPENDENCY_CHANGE__REQUIRED_BY = RESOURCE_DIFF__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Roots</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE__ROOTS = RESOURCE_DIFF_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Resource Dependency Change</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_FEATURE_COUNT = RESOURCE_DIFF_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeLeftTargetImpl <em>Resource Dependency Change Left Target</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDependencyChangeLeftTarget()
- * @generated
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET = 27;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__SUB_DIFF_ELEMENTS = RESOURCE_DEPENDENCY_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__IS_HIDDEN_BY = RESOURCE_DEPENDENCY_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__CONFLICTING = RESOURCE_DEPENDENCY_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__KIND = RESOURCE_DEPENDENCY_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__REMOTE = RESOURCE_DEPENDENCY_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__REQUIRES = RESOURCE_DEPENDENCY_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__REQUIRED_BY = RESOURCE_DEPENDENCY_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Roots</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET__ROOTS = RESOURCE_DEPENDENCY_CHANGE__ROOTS;
-
- /**
- * The number of structural features of the '<em>Resource Dependency Change Left Target</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET_FEATURE_COUNT = RESOURCE_DEPENDENCY_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeRightTargetImpl <em>Resource Dependency Change Right Target</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDependencyChangeRightTarget()
- * @generated
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET = 28;
-
- /**
- * The feature id for the '<em><b>Sub Diff Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__SUB_DIFF_ELEMENTS = RESOURCE_DEPENDENCY_CHANGE__SUB_DIFF_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Is Hidden By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__IS_HIDDEN_BY = RESOURCE_DEPENDENCY_CHANGE__IS_HIDDEN_BY;
-
- /**
- * The feature id for the '<em><b>Conflicting</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__CONFLICTING = RESOURCE_DEPENDENCY_CHANGE__CONFLICTING;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__KIND = RESOURCE_DEPENDENCY_CHANGE__KIND;
-
- /**
- * The feature id for the '<em><b>Remote</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__REMOTE = RESOURCE_DEPENDENCY_CHANGE__REMOTE;
-
- /**
- * The feature id for the '<em><b>Requires</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__REQUIRES = RESOURCE_DEPENDENCY_CHANGE__REQUIRES;
-
- /**
- * The feature id for the '<em><b>Required By</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- * @since 1.3
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__REQUIRED_BY = RESOURCE_DEPENDENCY_CHANGE__REQUIRED_BY;
-
- /**
- * The feature id for the '<em><b>Roots</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET__ROOTS = RESOURCE_DEPENDENCY_CHANGE__ROOTS;
-
- /**
- * The number of structural features of the '<em>Resource Dependency Change Right Target</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET_FEATURE_COUNT = RESOURCE_DEPENDENCY_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.compare.diff.metamodel.DifferenceKind <em>Difference Kind</em>}' enum.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DifferenceKind
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDifferenceKind()
- * @generated
- */
- int DIFFERENCE_KIND = 29;
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension <em>Abstract Diff Extension</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Diff Extension</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension
- * @generated
- */
- EClass getAbstractDiffExtension();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#getHideElements <em>Hide Elements</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Hide Elements</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#getHideElements()
- * @see #getAbstractDiffExtension()
- * @generated
- */
- EReference getAbstractDiffExtension_HideElements();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#isIsCollapsed <em>Is Collapsed</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Is Collapsed</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension#isIsCollapsed()
- * @see #getAbstractDiffExtension()
- * @generated
- */
- EAttribute getAbstractDiffExtension_IsCollapsed();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDiff <em>Resource Diff</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Diff</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDiff
- * @generated
- */
- EClass getResourceDiff();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange <em>Resource Dependency Change</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Dependency Change</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange
- * @generated
- */
- EClass getResourceDependencyChange();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange#getRoots <em>Roots</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Roots</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange#getRoots()
- * @see #getResourceDependencyChange()
- * @generated
- */
- EReference getResourceDependencyChange_Roots();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget <em>Resource Dependency Change Left Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Dependency Change Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget
- * @generated
- */
- EClass getResourceDependencyChangeLeftTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget <em>Resource Dependency Change Right Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Dependency Change Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget
- * @generated
- */
- EClass getResourceDependencyChangeRightTarget();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.emf.compare.diff.metamodel.DifferenceKind <em>Difference Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for enum '<em>Difference Kind</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DifferenceKind
- * @generated
- */
- EEnum getDifferenceKind();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange <em>Attribute Change</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Attribute Change</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChange
- * @generated
- */
- EClass getAttributeChange();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getAttribute <em>Attribute</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Attribute</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChange#getAttribute()
- * @see #getAttributeChange()
- * @generated
- */
- EReference getAttributeChange_Attribute();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getLeftElement <em>Left Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChange#getLeftElement()
- * @see #getAttributeChange()
- * @generated
- */
- EReference getAttributeChange_LeftElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChange#getRightElement <em>Right Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChange#getRightElement()
- * @see #getAttributeChange()
- * @generated
- */
- EReference getAttributeChange_RightElement();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget <em>Attribute Change Left Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Attribute Change Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget
- * @generated
- */
- EClass getAttributeChangeLeftTarget();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget#getLeftTarget <em>Left Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget#getLeftTarget()
- * @see #getAttributeChangeLeftTarget()
- * @generated
- */
- EAttribute getAttributeChangeLeftTarget_LeftTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget <em>Attribute Change Right Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Attribute Change Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget
- * @generated
- */
- EClass getAttributeChangeRightTarget();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget#getRightTarget <em>Right Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget#getRightTarget()
- * @see #getAttributeChangeRightTarget()
- * @generated
- */
- EAttribute getAttributeChangeRightTarget_RightTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange <em>Attribute Order Change</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Attribute Order Change</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange
- * @generated
- * @since 1.3
- */
- EClass getAttributeOrderChange();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement <em>Conflicting Diff Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Conflicting Diff Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement
- * @generated
- */
- EClass getConflictingDiffElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getLeftParent <em>Left Parent</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Parent</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getLeftParent()
- * @see #getConflictingDiffElement()
- * @generated
- */
- EReference getConflictingDiffElement_LeftParent();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getOriginElement <em>Origin Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Origin Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getOriginElement()
- * @see #getConflictingDiffElement()
- * @generated
- */
- EReference getConflictingDiffElement_OriginElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getRightParent <em>Right Parent</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Parent</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement#getRightParent()
- * @see #getConflictingDiffElement()
- * @generated
- */
- EReference getConflictingDiffElement_RightParent();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement <em>Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement
- * @generated
- */
- EClass getDiffElement();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getIsHiddenBy <em>Is Hidden By</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Is Hidden By</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getIsHiddenBy()
- * @see #getDiffElement()
- * @generated
- */
- EReference getDiffElement_IsHiddenBy();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#isConflicting <em>Conflicting</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Conflicting</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#isConflicting()
- * @see #getDiffElement()
- * @generated
- */
- EAttribute getDiffElement_Conflicting();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getKind <em>Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Kind</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getKind()
- * @see #getDiffElement()
- * @generated
- */
- EAttribute getDiffElement_Kind();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#isRemote <em>Remote</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Remote</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#isRemote()
- * @see #getDiffElement()
- * @generated
- */
- EAttribute getDiffElement_Remote();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequires <em>Requires</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Requires</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequires()
- * @see #getDiffElement()
- * @generated
- * @since 1.3
- */
- EReference getDiffElement_Requires();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequiredBy <em>Required By</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Required By</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getRequiredBy()
- * @see #getDiffElement()
- * @generated
- * @since 1.3
- */
- EReference getDiffElement_RequiredBy();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement#getSubDiffElements <em>Sub Diff Elements</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Sub Diff Elements</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement#getSubDiffElements()
- * @see #getDiffElement()
- * @generated
- */
- EReference getDiffElement_SubDiffElements();
-
- /**
- * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @return the factory that creates the instances of the model.
- * @generated
- */
- DiffFactory getDiffFactory();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup <em>Group</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Group</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffGroup
- * @generated
- */
- EClass getDiffGroup();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup#getRightParent <em>Right Parent</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Parent</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffGroup#getRightParent()
- * @see #getDiffGroup()
- * @generated
- */
- EReference getDiffGroup_RightParent();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup#getSubchanges <em>Subchanges</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Subchanges</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffGroup#getSubchanges()
- * @see #getDiffGroup()
- * @generated
- */
- EAttribute getDiffGroup_Subchanges();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot <em>Comparison Snapshot</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Comparison Snapshot</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot
- * @generated
- */
- EClass getComparisonSnapshot();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot#getDate <em>Date</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Date</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot#getDate()
- * @see #getComparisonSnapshot()
- * @generated
- */
- EAttribute getComparisonSnapshot_Date();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot <em>Comparison Resource Snapshot</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Comparison Resource Snapshot</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot
- * @generated
- */
- EClass getComparisonResourceSnapshot();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getDiff <em>Diff</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Diff</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getDiff()
- * @see #getComparisonResourceSnapshot()
- * @generated
- */
- EReference getComparisonResourceSnapshot_Diff();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getMatch <em>Match</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Match</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot#getMatch()
- * @see #getComparisonResourceSnapshot()
- * @generated
- */
- EReference getComparisonResourceSnapshot_Match();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot <em>Comparison Resource Set Snapshot</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Comparison Resource Set Snapshot</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot
- * @generated
- */
- EClass getComparisonResourceSetSnapshot();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getDiffResourceSet <em>Diff Resource Set</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Diff Resource Set</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getDiffResourceSet()
- * @see #getComparisonResourceSetSnapshot()
- * @generated
- */
- EReference getComparisonResourceSetSnapshot_DiffResourceSet();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getMatchResourceSet <em>Match Resource Set</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Match Resource Set</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot#getMatchResourceSet()
- * @see #getComparisonResourceSetSnapshot()
- * @generated
- */
- EReference getComparisonResourceSetSnapshot_MatchResourceSet();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.DiffModel <em>Model</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Model</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffModel
- * @generated
- */
- EClass getDiffModel();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getOwnedElements <em>Owned Elements</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Owned Elements</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffModel#getOwnedElements()
- * @see #getDiffModel()
- * @generated
- */
- EReference getDiffModel_OwnedElements();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getLeftRoots <em>Left Roots</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Left Roots</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffModel#getLeftRoots()
- * @see #getDiffModel()
- * @generated
- */
- EReference getDiffModel_LeftRoots();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getRightRoots <em>Right Roots</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Right Roots</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffModel#getRightRoots()
- * @see #getDiffModel()
- * @generated
- */
- EReference getDiffModel_RightRoots();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffModel#getAncestorRoots <em>Ancestor Roots</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Ancestor Roots</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffModel#getAncestorRoots()
- * @see #getDiffModel()
- * @generated
- */
- EReference getDiffModel_AncestorRoots();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.DiffResourceSet <em>Resource Set</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Set</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffResourceSet
- * @generated
- */
- EClass getDiffResourceSet();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffResourceSet#getDiffModels <em>Diff Models</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Diff Models</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffResourceSet#getDiffModels()
- * @see #getDiffResourceSet()
- * @generated
- */
- EReference getDiffResourceSet_DiffModels();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.diff.metamodel.DiffResourceSet#getResourceDiffs <em>Resource Diffs</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Resource Diffs</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffResourceSet#getResourceDiffs()
- * @see #getDiffResourceSet()
- * @generated
- */
- EReference getDiffResourceSet_ResourceDiffs();
-
- /**
- * Returns the meta object for data type '{@link org.eclipse.emf.compare.diff.merge.IMerger <em>IMerger</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for data type '<em>IMerger</em>'.
- * @see org.eclipse.emf.compare.diff.merge.IMerger
- * @model instanceClass="org.eclipse.emf.compare.diff.merge.IMerger" serializeable="false"
- * @generated
- */
- EDataType getIMerger();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChange <em>Model Element Change</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Model Element Change</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChange
- * @generated
- */
- EClass getModelElementChange();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget <em>Model Element Change Left Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Model Element Change Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget
- * @generated
- */
- EClass getModelElementChangeLeftTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getLeftElement <em>Left Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getLeftElement()
- * @see #getModelElementChangeLeftTarget()
- * @generated
- */
- EReference getModelElementChangeLeftTarget_LeftElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getRightParent <em>Right Parent</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Parent</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getRightParent()
- * @see #getModelElementChangeLeftTarget()
- * @generated
- */
- EReference getModelElementChangeLeftTarget_RightParent();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget <em>Model Element Change Right Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Model Element Change Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget
- * @generated
- */
- EClass getModelElementChangeRightTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getLeftParent <em>Left Parent</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Parent</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getLeftParent()
- * @see #getModelElementChangeRightTarget()
- * @generated
- */
- EReference getModelElementChangeRightTarget_LeftParent();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getRightElement <em>Right Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getRightElement()
- * @see #getModelElementChangeRightTarget()
- * @generated
- */
- EReference getModelElementChangeRightTarget_RightElement();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement <em>Move Model Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Move Model Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.MoveModelElement
- * @generated
- */
- EClass getMoveModelElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getLeftTarget <em>Left Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getLeftTarget()
- * @see #getMoveModelElement()
- * @generated
- */
- EReference getMoveModelElement_LeftTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getRightTarget <em>Right Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getRightTarget()
- * @see #getMoveModelElement()
- * @generated
- */
- EReference getMoveModelElement_RightTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature <em>Update Containment Feature</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Update Containment Feature</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature
- * @generated
- */
- EClass getUpdateContainmentFeature();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange <em>Reference Change</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Reference Change</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChange
- * @generated
- */
- EClass getReferenceChange();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getLeftElement <em>Left Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getLeftElement()
- * @see #getReferenceChange()
- * @generated
- */
- EReference getReferenceChange_LeftElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getReference <em>Reference</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Reference</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getReference()
- * @see #getReferenceChange()
- * @generated
- */
- EReference getReferenceChange_Reference();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getRightElement <em>Right Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getRightElement()
- * @see #getReferenceChange()
- * @generated
- */
- EReference getReferenceChange_RightElement();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget <em>Reference Change Left Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Reference Change Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget
- * @generated
- */
- EClass getReferenceChangeLeftTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getLeftTarget <em>Left Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getLeftTarget()
- * @see #getReferenceChangeLeftTarget()
- * @generated
- */
- EReference getReferenceChangeLeftTarget_LeftTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getRightTarget <em>Right Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getRightTarget()
- * @see #getReferenceChangeLeftTarget()
- * @generated
- */
- EReference getReferenceChangeLeftTarget_RightTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget <em>Reference Change Right Target</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Reference Change Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget
- * @generated
- */
- EClass getReferenceChangeRightTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getRightTarget <em>Right Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getRightTarget()
- * @see #getReferenceChangeRightTarget()
- * @generated
- */
- EReference getReferenceChangeRightTarget_RightTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getLeftTarget <em>Left Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getLeftTarget()
- * @see #getReferenceChangeRightTarget()
- * @generated
- */
- EReference getReferenceChangeRightTarget_LeftTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateAttribute <em>Update Attribute</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Update Attribute</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateAttribute
- * @generated
- */
- EClass getUpdateAttribute();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement <em>Update Model Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Update Model Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateModelElement
- * @generated
- */
- EClass getUpdateModelElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getLeftElement <em>Left Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getLeftElement()
- * @see #getUpdateModelElement()
- * @generated
- */
- EReference getUpdateModelElement_LeftElement();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getRightElement <em>Right Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Element</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getRightElement()
- * @see #getUpdateModelElement()
- * @generated
- */
- EReference getUpdateModelElement_RightElement();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference <em>Update Reference</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for class '<em>Update Reference</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateReference
- * @generated
- */
- EClass getUpdateReference();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference#getLeftTarget <em>Left Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateReference#getLeftTarget()
- * @see #getUpdateReference()
- * @generated
- */
- EReference getUpdateReference_LeftTarget();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference#getRightTarget <em>Right Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateReference#getRightTarget()
- * @see #getUpdateReference()
- * @generated
- */
- EReference getUpdateReference_RightTarget();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange <em>Reference Order Change</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Reference Order Change</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange
- * @generated
- */
- EClass getReferenceOrderChange();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange#getLeftTarget <em>Left Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Left Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange#getLeftTarget()
- * @see #getReferenceOrderChange()
- * @generated
- */
- EReference getReferenceOrderChange_LeftTarget();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange#getRightTarget <em>Right Target</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Right Target</em>'.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange#getRightTarget()
- * @see #getReferenceOrderChange()
- * @generated
- */
- EReference getReferenceOrderChange_RightTarget();
-
- /**
- * <!-- begin-user-doc --> Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("hiding")
- interface Literals {
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl <em>Abstract Diff Extension</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAbstractDiffExtension()
- * @generated
- */
- EClass ABSTRACT_DIFF_EXTENSION = eINSTANCE.getAbstractDiffExtension();
-
- /**
- * The meta object literal for the '<em><b>Hide Elements</b></em>' reference list feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS = eINSTANCE.getAbstractDiffExtension_HideElements();
-
- /**
- * The meta object literal for the '<em><b>Is Collapsed</b></em>' attribute feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED = eINSTANCE.getAbstractDiffExtension_IsCollapsed();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDiffImpl <em>Resource Diff</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDiffImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDiff()
- * @generated
- */
- EClass RESOURCE_DIFF = eINSTANCE.getResourceDiff();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeImpl <em>Resource Dependency Change</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDependencyChange()
- * @generated
- */
- EClass RESOURCE_DEPENDENCY_CHANGE = eINSTANCE.getResourceDependencyChange();
-
- /**
- * The meta object literal for the '<em><b>Roots</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference RESOURCE_DEPENDENCY_CHANGE__ROOTS = eINSTANCE.getResourceDependencyChange_Roots();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeLeftTargetImpl <em>Resource Dependency Change Left Target</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDependencyChangeLeftTarget()
- * @generated
- */
- EClass RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET = eINSTANCE.getResourceDependencyChangeLeftTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeRightTargetImpl <em>Resource Dependency Change Right Target</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getResourceDependencyChangeRightTarget()
- * @generated
- */
- EClass RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET = eINSTANCE.getResourceDependencyChangeRightTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.DifferenceKind <em>Difference Kind</em>}' enum.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DifferenceKind
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDifferenceKind()
- * @generated
- */
- EEnum DIFFERENCE_KIND = eINSTANCE.getDifferenceKind();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl <em>Attribute Change</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeChange()
- * @generated
- */
- EClass ATTRIBUTE_CHANGE = eINSTANCE.getAttributeChange();
-
- /**
- * The meta object literal for the '<em><b>Attribute</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference ATTRIBUTE_CHANGE__ATTRIBUTE = eINSTANCE.getAttributeChange_Attribute();
-
- /**
- * The meta object literal for the '<em><b>Left Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference ATTRIBUTE_CHANGE__LEFT_ELEMENT = eINSTANCE.getAttributeChange_LeftElement();
-
- /**
- * The meta object literal for the '<em><b>Right Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference ATTRIBUTE_CHANGE__RIGHT_ELEMENT = eINSTANCE.getAttributeChange_RightElement();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeLeftTargetImpl <em>Attribute Change Left Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeChangeLeftTarget()
- * @generated
- */
- EClass ATTRIBUTE_CHANGE_LEFT_TARGET = eINSTANCE.getAttributeChangeLeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Left Target</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET = eINSTANCE
- .getAttributeChangeLeftTarget_LeftTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeRightTargetImpl <em>Attribute Change Right Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeChangeRightTarget()
- * @generated
- */
- EClass ATTRIBUTE_CHANGE_RIGHT_TARGET = eINSTANCE.getAttributeChangeRightTarget();
-
- /**
- * The meta object literal for the '<em><b>Right Target</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET = eINSTANCE
- .getAttributeChangeRightTarget_RightTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeOrderChangeImpl <em>Attribute Order Change</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.AttributeOrderChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getAttributeOrderChange()
- * @generated
- * @since 1.3
- */
- EClass ATTRIBUTE_ORDER_CHANGE = eINSTANCE.getAttributeOrderChange();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl <em>Conflicting Diff Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getConflictingDiffElement()
- * @generated
- */
- EClass CONFLICTING_DIFF_ELEMENT = eINSTANCE.getConflictingDiffElement();
-
- /**
- * The meta object literal for the '<em><b>Left Parent</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference CONFLICTING_DIFF_ELEMENT__LEFT_PARENT = eINSTANCE.getConflictingDiffElement_LeftParent();
-
- /**
- * The meta object literal for the '<em><b>Origin Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT = eINSTANCE
- .getConflictingDiffElement_OriginElement();
-
- /**
- * The meta object literal for the '<em><b>Right Parent</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT = eINSTANCE.getConflictingDiffElement_RightParent();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl <em>Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffElement()
- * @generated
- */
- EClass DIFF_ELEMENT = eINSTANCE.getDiffElement();
-
- /**
- * The meta object literal for the '<em><b>Is Hidden By</b></em>' reference list feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference DIFF_ELEMENT__IS_HIDDEN_BY = eINSTANCE.getDiffElement_IsHiddenBy();
-
- /**
- * The meta object literal for the '<em><b>Conflicting</b></em>' attribute feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute DIFF_ELEMENT__CONFLICTING = eINSTANCE.getDiffElement_Conflicting();
-
- /**
- * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @generated
- */
- EAttribute DIFF_ELEMENT__KIND = eINSTANCE.getDiffElement_Kind();
-
- /**
- * The meta object literal for the '<em><b>Remote</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DIFF_ELEMENT__REMOTE = eINSTANCE.getDiffElement_Remote();
-
- /**
- * The meta object literal for the '<em><b>Requires</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @since 1.3
- */
- EReference DIFF_ELEMENT__REQUIRES = eINSTANCE.getDiffElement_Requires();
-
- /**
- * The meta object literal for the '<em><b>Required By</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @since 1.3
- */
- EReference DIFF_ELEMENT__REQUIRED_BY = eINSTANCE.getDiffElement_RequiredBy();
-
- /**
- * The meta object literal for the '<em><b>Sub Diff Elements</b></em>' containment reference list feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_ELEMENT__SUB_DIFF_ELEMENTS = eINSTANCE.getDiffElement_SubDiffElements();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffGroupImpl <em>Group</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffGroupImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffGroup()
- * @generated
- */
- EClass DIFF_GROUP = eINSTANCE.getDiffGroup();
-
- /**
- * The meta object literal for the '<em><b>Right Parent</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_GROUP__RIGHT_PARENT = eINSTANCE.getDiffGroup_RightParent();
-
- /**
- * The meta object literal for the '<em><b>Subchanges</b></em>' attribute feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute DIFF_GROUP__SUBCHANGES = eINSTANCE.getDiffGroup_Subchanges();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot <em>Comparison Snapshot</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getComparisonSnapshot()
- * @generated
- */
- EClass COMPARISON_SNAPSHOT = eINSTANCE.getComparisonSnapshot();
-
- /**
- * The meta object literal for the '<em><b>Date</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute COMPARISON_SNAPSHOT__DATE = eINSTANCE.getComparisonSnapshot_Date();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl <em>Comparison Resource Snapshot</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getComparisonResourceSnapshot()
- * @generated
- */
- EClass COMPARISON_RESOURCE_SNAPSHOT = eINSTANCE.getComparisonResourceSnapshot();
-
- /**
- * The meta object literal for the '<em><b>Diff</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference COMPARISON_RESOURCE_SNAPSHOT__DIFF = eINSTANCE.getComparisonResourceSnapshot_Diff();
-
- /**
- * The meta object literal for the '<em><b>Match</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference COMPARISON_RESOURCE_SNAPSHOT__MATCH = eINSTANCE.getComparisonResourceSnapshot_Match();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl <em>Comparison Resource Set Snapshot</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getComparisonResourceSetSnapshot()
- * @generated
- */
- EClass COMPARISON_RESOURCE_SET_SNAPSHOT = eINSTANCE.getComparisonResourceSetSnapshot();
-
- /**
- * The meta object literal for the '<em><b>Diff Resource Set</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET = eINSTANCE
- .getComparisonResourceSetSnapshot_DiffResourceSet();
-
- /**
- * The meta object literal for the '<em><b>Match Resource Set</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET = eINSTANCE
- .getComparisonResourceSetSnapshot_MatchResourceSet();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl <em>Model</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffModel()
- * @generated
- */
- EClass DIFF_MODEL = eINSTANCE.getDiffModel();
-
- /**
- * The meta object literal for the '<em><b>Owned Elements</b></em>' containment reference list feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_MODEL__OWNED_ELEMENTS = eINSTANCE.getDiffModel_OwnedElements();
-
- /**
- * The meta object literal for the '<em><b>Left Roots</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_MODEL__LEFT_ROOTS = eINSTANCE.getDiffModel_LeftRoots();
-
- /**
- * The meta object literal for the '<em><b>Right Roots</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_MODEL__RIGHT_ROOTS = eINSTANCE.getDiffModel_RightRoots();
-
- /**
- * The meta object literal for the '<em><b>Ancestor Roots</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_MODEL__ANCESTOR_ROOTS = eINSTANCE.getDiffModel_AncestorRoots();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffResourceSetImpl <em>Resource Set</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffResourceSetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getDiffResourceSet()
- * @generated
- */
- EClass DIFF_RESOURCE_SET = eINSTANCE.getDiffResourceSet();
-
- /**
- * The meta object literal for the '<em><b>Diff Models</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_RESOURCE_SET__DIFF_MODELS = eINSTANCE.getDiffResourceSet_DiffModels();
-
- /**
- * The meta object literal for the '<em><b>Resource Diffs</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DIFF_RESOURCE_SET__RESOURCE_DIFFS = eINSTANCE.getDiffResourceSet_ResourceDiffs();
-
- /**
- * The meta object literal for the '<em>IMerger</em>' data type.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @see org.eclipse.emf.compare.diff.merge.IMerger
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getIMerger()
- * @generated
- */
- EDataType IMERGER = eINSTANCE.getIMerger();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeImpl <em>Model Element Change</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelElementChange()
- * @generated
- */
- EClass MODEL_ELEMENT_CHANGE = eINSTANCE.getModelElementChange();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeLeftTargetImpl <em>Model Element Change Left Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelElementChangeLeftTarget()
- * @generated
- */
- EClass MODEL_ELEMENT_CHANGE_LEFT_TARGET = eINSTANCE.getModelElementChangeLeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Left Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT = eINSTANCE
- .getModelElementChangeLeftTarget_LeftElement();
-
- /**
- * The meta object literal for the '<em><b>Right Parent</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT = eINSTANCE
- .getModelElementChangeLeftTarget_RightParent();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeRightTargetImpl <em>Model Element Change Right Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getModelElementChangeRightTarget()
- * @generated
- */
- EClass MODEL_ELEMENT_CHANGE_RIGHT_TARGET = eINSTANCE.getModelElementChangeRightTarget();
-
- /**
- * The meta object literal for the '<em><b>Left Parent</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT = eINSTANCE
- .getModelElementChangeRightTarget_LeftParent();
-
- /**
- * The meta object literal for the '<em><b>Right Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT = eINSTANCE
- .getModelElementChangeRightTarget_RightElement();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.MoveModelElementImpl <em>Move Model Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.MoveModelElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getMoveModelElement()
- * @generated
- */
- EClass MOVE_MODEL_ELEMENT = eINSTANCE.getMoveModelElement();
-
- /**
- * The meta object literal for the '<em><b>Left Target</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference MOVE_MODEL_ELEMENT__LEFT_TARGET = eINSTANCE.getMoveModelElement_LeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Right Target</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference MOVE_MODEL_ELEMENT__RIGHT_TARGET = eINSTANCE.getMoveModelElement_RightTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateContainmentFeatureImpl <em>Update Containment Feature</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateContainmentFeatureImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateContainmentFeature()
- * @generated
- */
- EClass UPDATE_CONTAINMENT_FEATURE = eINSTANCE.getUpdateContainmentFeature();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl <em>Reference Change</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceChange()
- * @generated
- */
- EClass REFERENCE_CHANGE = eINSTANCE.getReferenceChange();
-
- /**
- * The meta object literal for the '<em><b>Left Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference REFERENCE_CHANGE__LEFT_ELEMENT = eINSTANCE.getReferenceChange_LeftElement();
-
- /**
- * The meta object literal for the '<em><b>Reference</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference REFERENCE_CHANGE__REFERENCE = eINSTANCE.getReferenceChange_Reference();
-
- /**
- * The meta object literal for the '<em><b>Right Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference REFERENCE_CHANGE__RIGHT_ELEMENT = eINSTANCE.getReferenceChange_RightElement();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeLeftTargetImpl <em>Reference Change Left Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeLeftTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceChangeLeftTarget()
- * @generated
- */
- EClass REFERENCE_CHANGE_LEFT_TARGET = eINSTANCE.getReferenceChangeLeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Left Target</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET = eINSTANCE
- .getReferenceChangeLeftTarget_LeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Right Target</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET = eINSTANCE
- .getReferenceChangeLeftTarget_RightTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeRightTargetImpl <em>Reference Change Right Target</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeRightTargetImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceChangeRightTarget()
- * @generated
- */
- EClass REFERENCE_CHANGE_RIGHT_TARGET = eINSTANCE.getReferenceChangeRightTarget();
-
- /**
- * The meta object literal for the '<em><b>Right Target</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET = eINSTANCE
- .getReferenceChangeRightTarget_RightTarget();
-
- /**
- * The meta object literal for the '<em><b>Left Target</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET = eINSTANCE
- .getReferenceChangeRightTarget_LeftTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateAttributeImpl <em>Update Attribute</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateAttributeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateAttribute()
- * @generated
- */
- EClass UPDATE_ATTRIBUTE = eINSTANCE.getUpdateAttribute();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateModelElementImpl <em>Update Model Element</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateModelElementImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateModelElement()
- * @generated
- */
- EClass UPDATE_MODEL_ELEMENT = eINSTANCE.getUpdateModelElement();
-
- /**
- * The meta object literal for the '<em><b>Left Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference UPDATE_MODEL_ELEMENT__LEFT_ELEMENT = eINSTANCE.getUpdateModelElement_LeftElement();
-
- /**
- * The meta object literal for the '<em><b>Right Element</b></em>' reference feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT = eINSTANCE.getUpdateModelElement_RightElement();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateReferenceImpl <em>Update Reference</em>}' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.UpdateReferenceImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getUpdateReference()
- * @generated
- */
- EClass UPDATE_REFERENCE = eINSTANCE.getUpdateReference();
-
- /**
- * The meta object literal for the '<em><b>Left Target</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference UPDATE_REFERENCE__LEFT_TARGET = eINSTANCE.getUpdateReference_LeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Right Target</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference UPDATE_REFERENCE__RIGHT_TARGET = eINSTANCE.getUpdateReference_RightTarget();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceOrderChangeImpl <em>Reference Order Change</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.impl.ReferenceOrderChangeImpl
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffPackageImpl#getReferenceOrderChange()
- * @generated
- */
- EClass REFERENCE_ORDER_CHANGE = eINSTANCE.getReferenceOrderChange();
-
- /**
- * The meta object literal for the '<em><b>Left Target</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference REFERENCE_ORDER_CHANGE__LEFT_TARGET = eINSTANCE.getReferenceOrderChange_LeftTarget();
-
- /**
- * The meta object literal for the '<em><b>Right Target</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference REFERENCE_ORDER_CHANGE__RIGHT_TARGET = eINSTANCE.getReferenceOrderChange_RightTarget();
-
- }
-
-} // DiffPackage
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffResourceSet.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffResourceSet.java
deleted file mode 100644
index bc488e8ae..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DiffResourceSet.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Resource Set</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Root of the differences model for ResourceSet-wide differencing.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffResourceSet#getDiffModels <em>Diff Models</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.DiffResourceSet#getResourceDiffs <em>Resource Diffs</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffResourceSet()
- * @model
- * @generated
- */
-public interface DiffResourceSet extends EObject {
- /**
- * Returns the value of the '<em><b>Diff Models</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.DiffModel}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Diff Models</em>' containment reference list isn't clear, there really
- * should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Diff Models</em>' containment reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffResourceSet_DiffModels()
- * @model containment="true"
- * @generated
- */
- EList<DiffModel> getDiffModels();
-
- /**
- * Returns the value of the '<em><b>Resource Diffs</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.diff.metamodel.ResourceDiff}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Resource Diffs</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Resource Diffs</em>' containment reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDiffResourceSet_ResourceDiffs()
- * @model containment="true"
- * @generated
- */
- EList<ResourceDiff> getResourceDiffs();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- int getSubchanges();
-
-} // DiffResourceSet
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DifferenceKind.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DifferenceKind.java
deleted file mode 100644
index 14ee893a0..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/DifferenceKind.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Difference Kind</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * These flags will be used to describe the kind of a DiffElement.
- * <!-- end-model-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getDifferenceKind()
- * @model
- * @generated
- */
-public enum DifferenceKind implements Enumerator {
- /**
- * The '<em><b>Addition</b></em>' literal object.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #ADDITION_VALUE
- * @generated
- * @ordered
- */
- ADDITION(0, "Addition", "Addition"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>Deletion</b></em>' literal object.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #DELETION_VALUE
- * @generated
- * @ordered
- */
- DELETION(1, "Deletion", "Deletion"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>Change</b></em>' literal object.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #CHANGE_VALUE
- * @generated
- * @ordered
- */
- CHANGE(2, "Change", "Change"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>Move</b></em>' literal object.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #MOVE_VALUE
- * @generated
- * @ordered
- */
- MOVE(3, "Move", "Move"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>Addition</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Addition</b></em>' literal object isn't clear, there really should be
- * more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #ADDITION
- * @model name="Addition"
- * @generated
- * @ordered
- */
- public static final int ADDITION_VALUE = 0;
-
- /**
- * The '<em><b>Deletion</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Deletion</b></em>' literal object isn't clear, there really should be
- * more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #DELETION
- * @model name="Deletion"
- * @generated
- * @ordered
- */
- public static final int DELETION_VALUE = 1;
-
- /**
- * The '<em><b>Change</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Change</b></em>' literal object isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #CHANGE
- * @model name="Change"
- * @generated
- * @ordered
- */
- public static final int CHANGE_VALUE = 2;
-
- /**
- * The '<em><b>Move</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Move</b></em>' literal object isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #MOVE
- * @model name="Move"
- * @generated
- * @ordered
- */
- public static final int MOVE_VALUE = 3;
-
- /**
- * An array of all the '<em><b>Difference Kind</b></em>' enumerators.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- */
- private static final DifferenceKind[] VALUES_ARRAY = new DifferenceKind[] {ADDITION, DELETION, CHANGE,
- MOVE, };
-
- /**
- * A public read-only list of all the '<em><b>Difference Kind</b></em>' enumerators. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List<DifferenceKind> VALUES = Collections.unmodifiableList(Arrays
- .asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Difference Kind</b></em>' literal with the specified literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DifferenceKind get(String literal) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DifferenceKind result = VALUES_ARRAY[i];
- if (result.toString().equals(literal)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Difference Kind</b></em>' literal with the specified name.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @generated
- */
- public static DifferenceKind getByName(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DifferenceKind result = VALUES_ARRAY[i];
- if (result.getName().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Difference Kind</b></em>' literal with the specified integer value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DifferenceKind get(int value) {
- switch (value) {
- case ADDITION_VALUE:
- return ADDITION;
- case DELETION_VALUE:
- return DELETION;
- case CHANGE_VALUE:
- return CHANGE;
- case MOVE_VALUE:
- return MOVE;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("hiding")
- private DifferenceKind(int value, String name, String literal) {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public int getValue() {
- return value;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral() {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- return literal;
- }
-
-} // DifferenceKind
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChange.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChange.java
deleted file mode 100644
index b6edf9e33..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChange.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Model Element Change</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Superclass of DiffElements used to describe element additions or removals.
- * <!-- end-model-doc -->
- *
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChange()
- * @model
- * @generated
- */
-public interface ModelElementChange extends DiffElement {
- // This class doesn't need any Overriding to be functional
-} // ModelElementChange
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeLeftTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeLeftTarget.java
deleted file mode 100644
index 530bfd23a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeLeftTarget.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Model Element Change Left Target</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * A "LeftTarget" element change describes a difference involving the left element/resource. In the case of ModelElementChanges, this can describe either the addition of an element or the remote removal of an element (for three way comparisons).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getRightParent <em>Right Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getLeftElement <em>Left Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChangeLeftTarget()
- * @model
- * @generated
- */
-public interface ModelElementChangeLeftTarget extends ModelElementChange {
- /**
- * Returns the value of the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Element</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Element</em>' reference.
- * @see #setLeftElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChangeLeftTarget_LeftElement()
- * @model
- * @generated
- */
- EObject getLeftElement();
-
- /**
- * Returns the value of the '<em><b>Right Parent</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Parent</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Parent</em>' reference.
- * @see #setRightParent(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChangeLeftTarget_RightParent()
- * @model
- * @generated
- */
- EObject getRightParent();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getLeftElement <em>Left Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Element</em>' reference.
- * @see #getLeftElement()
- * @generated
- */
- void setLeftElement(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget#getRightParent <em>Right Parent</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Parent</em>' reference.
- * @see #getRightParent()
- * @generated
- */
- void setRightParent(EObject value);
-
-} // ModelElementChangeLeftTarget
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeRightTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeRightTarget.java
deleted file mode 100644
index 92cf8e97a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ModelElementChangeRightTarget.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Model Element Change Right Target</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * A "RightTarget" element change describes a difference involving the right element/resource. In the case of ModelElementChanges, this can describe either the removal of an element or the remote addition of an element (for three way comparisons).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getLeftParent <em>Left Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getRightElement <em>Right Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChangeRightTarget()
- * @model
- * @generated
- */
-public interface ModelElementChangeRightTarget extends ModelElementChange {
- /**
- * Returns the value of the '<em><b>Left Parent</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Parent</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Parent</em>' reference.
- * @see #setLeftParent(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChangeRightTarget_LeftParent()
- * @model
- * @generated
- */
- EObject getLeftParent();
-
- /**
- * Returns the value of the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Element</em>' reference isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Element</em>' reference.
- * @see #setRightElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getModelElementChangeRightTarget_RightElement()
- * @model
- * @generated
- */
- EObject getRightElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getLeftParent <em>Left Parent</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Parent</em>' reference.
- * @see #getLeftParent()
- * @generated
- */
- void setLeftParent(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget#getRightElement <em>Right Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Element</em>' reference.
- * @see #getRightElement()
- * @generated
- */
- void setRightElement(EObject value);
-
-} // ModelElementChangeRightTarget
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/MoveModelElement.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/MoveModelElement.java
deleted file mode 100644
index de33ba920..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/MoveModelElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Move Model Element</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * These describe a change of container for a given element.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getMoveModelElement()
- * @model
- * @generated
- */
-public interface MoveModelElement extends UpdateModelElement {
- /**
- * Returns the value of the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Target</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Target</em>' reference.
- * @see #setLeftTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getMoveModelElement_LeftTarget()
- * @model
- * @generated
- */
- EObject getLeftTarget();
-
- /**
- * Returns the value of the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Target</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Target</em>' reference.
- * @see #setRightTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getMoveModelElement_RightTarget()
- * @model
- * @generated
- */
- EObject getRightTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getLeftTarget <em>Left Target</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Target</em>' reference.
- * @see #getLeftTarget()
- * @generated
- */
- void setLeftTarget(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement#getRightTarget <em>Right Target</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Target</em>' reference.
- * @see #getRightTarget()
- * @generated
- */
- void setRightTarget(EObject value);
-
-} // MoveModelElement
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChange.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChange.java
deleted file mode 100644
index cedbbbfe0..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChange.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Reference Change</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Superclass of elements describing difference between the values of a given reference.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getReference <em>Reference</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getRightElement <em>Right Element</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getLeftElement <em>Left Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChange()
- * @model
- * @generated
- */
-public interface ReferenceChange extends DiffElement {
- /**
- * Returns the value of the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Element</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Element</em>' reference.
- * @see #setLeftElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChange_LeftElement()
- * @model
- * @generated
- */
- EObject getLeftElement();
-
- /**
- * Returns the value of the '<em><b>Reference</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Reference</em>' reference isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Reference</em>' reference.
- * @see #setReference(EReference)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChange_Reference()
- * @model
- * @generated
- */
- EReference getReference();
-
- /**
- * Returns the value of the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Element</em>' reference isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Element</em>' reference.
- * @see #setRightElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChange_RightElement()
- * @model
- * @generated
- */
- EObject getRightElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getLeftElement <em>Left Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Element</em>' reference.
- * @see #getLeftElement()
- * @generated
- */
- void setLeftElement(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getReference <em>Reference</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Reference</em>' reference.
- * @see #getReference()
- * @generated
- */
- void setReference(EReference value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange#getRightElement <em>Right Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Element</em>' reference.
- * @see #getRightElement()
- * @generated
- */
- void setRightElement(EObject value);
-
-} // ReferenceChange
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeLeftTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeLeftTarget.java
deleted file mode 100644
index e83e29f60..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeLeftTarget.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Reference Change Left Target</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * A "LeftTarget" element change describes a difference involving the left element/resource. In the case of ReferenceChanges, these describe differences within multi-valued references. Specifically, the addition of a value or the remote removal of a value (for three way comparisons).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChangeLeftTarget()
- * @model
- * @generated
- */
-public interface ReferenceChangeLeftTarget extends ReferenceChange {
- /**
- * Returns the value of the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Target</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Target</em>' reference.
- * @see #setLeftTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChangeLeftTarget_LeftTarget()
- * @model
- * @generated
- */
- EObject getLeftTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getLeftTarget <em>Left Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Target</em>' reference.
- * @see #getLeftTarget()
- * @generated
- */
- void setLeftTarget(EObject value);
-
- /**
- * Returns the value of the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Target</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Target</em>' reference.
- * @see #setRightTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChangeLeftTarget_RightTarget()
- * @model
- * @generated
- */
- EObject getRightTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget#getRightTarget <em>Right Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Target</em>' reference.
- * @see #getRightTarget()
- * @generated
- */
- void setRightTarget(EObject value);
-
-} // ReferenceChangeLeftTarget
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeRightTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeRightTarget.java
deleted file mode 100644
index d4c4fc70d..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceChangeRightTarget.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Reference Change Right Target</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * A "RightTarget" element change describes a difference involving the right element/resource. In the case of ReferenceChanges, these describe differences within multi-valued references. Specifically, the removal of a value or the remote addition of a value (for three way comparisons).
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getRightTarget <em>Right Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getLeftTarget <em>Left Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChangeRightTarget()
- * @model
- * @generated
- */
-public interface ReferenceChangeRightTarget extends ReferenceChange {
- /**
- * Returns the value of the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Target</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Target</em>' reference.
- * @see #setRightTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChangeRightTarget_RightTarget()
- * @model
- * @generated
- */
- EObject getRightTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getRightTarget <em>Right Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Target</em>' reference.
- * @see #getRightTarget()
- * @generated
- */
- void setRightTarget(EObject value);
-
- /**
- * Returns the value of the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Target</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Target</em>' reference.
- * @see #setLeftTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceChangeRightTarget_LeftTarget()
- * @model
- * @generated
- */
- EObject getLeftTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget#getLeftTarget <em>Left Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Target</em>' reference.
- * @see #getLeftTarget()
- * @generated
- */
- void setLeftTarget(EObject value);
-
-} // ReferenceChangeRightTarget
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceOrderChange.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceOrderChange.java
deleted file mode 100644
index 82d7ce2a5..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ReferenceOrderChange.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Reference Order Change</b></em>'. <!--
- * end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceOrderChange()
- * @model
- * @generated
- */
-public interface ReferenceOrderChange extends ReferenceChange {
-
- /**
- * Returns the value of the '<em><b>Left Target</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Target</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Target</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceOrderChange_LeftTarget()
- * @model
- * @generated
- */
- EList<EObject> getLeftTarget();
-
- /**
- * Returns the value of the '<em><b>Right Target</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Target</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Target</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getReferenceOrderChange_RightTarget()
- * @model
- * @generated
- */
- EList<EObject> getRightTarget();
- // ReferenceOrderChange
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChange.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChange.java
deleted file mode 100644
index b59d9345b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChange.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Resource Dependency Change</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Superclass of DiffElements representing additions or removals of references towards a third-party resource.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange#getRoots <em>Roots</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getResourceDependencyChange()
- * @model
- * @generated
- */
-public interface ResourceDependencyChange extends ResourceDiff {
- /**
- * Returns the value of the '<em><b>Roots</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Roots</em>' reference list isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Roots</em>' reference list.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getResourceDependencyChange_Roots()
- * @model
- * @generated
- */
- EList<EObject> getRoots();
-
-} // ResourceDependencyChange
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeLeftTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeLeftTarget.java
deleted file mode 100644
index 0f50f3327..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeLeftTarget.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '
- * <em><b>Resource Dependency Change Left Target</b></em>'. <!-- end-user-doc --> <!-- begin-model-doc --> A
- * "LeftTarget" element change describes a difference involving the left ResourceSet. These differences can be
- * used to describe additions or remote removals of third-party resources dependencies. <!-- end-model-doc -->
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getResourceDependencyChangeLeftTarget()
- * @model
- * @generated
- */
-public interface ResourceDependencyChangeLeftTarget extends ResourceDependencyChange {
- // ResourceDependencyChangeLeftTarget
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeRightTarget.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeRightTarget.java
deleted file mode 100644
index 98341089d..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDependencyChangeRightTarget.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '
- * <em><b>Resource Dependency Change Right Target</b></em>'. <!-- end-user-doc --> <!-- begin-model-doc --> A
- * "RightTarget" element change describes a difference involving the right ResourceSet. These differences can
- * be used to describe deletions or remote additions of third-party resources dependencies. <!-- end-model-doc
- * -->
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getResourceDependencyChangeRightTarget()
- * @model
- * @generated
- */
-public interface ResourceDependencyChangeRightTarget extends ResourceDependencyChange {
- // ResourceDependencyChangeRightTarget
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDiff.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDiff.java
deleted file mode 100644
index bc4856a21..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/ResourceDiff.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Resource Diff</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Differences of this kind represent changes regarding a third-party resource.
- * <!-- end-model-doc -->
- *
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getResourceDiff()
- * @model
- * @generated
- */
-public interface ResourceDiff extends DiffElement {
- // ResourceDiff
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateAttribute.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateAttribute.java
deleted file mode 100644
index a9236b192..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateAttribute.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Update Attribute</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Differences of this kind represent modifications of the value of single-valued attributes.
- * <!-- end-model-doc -->
- *
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateAttribute()
- * @model
- * @generated
- */
-
-public interface UpdateAttribute extends AttributeChange {
- // This class doesn't need any Overriding to be functional
-} // UpdateAttribute
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateContainmentFeature.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateContainmentFeature.java
deleted file mode 100644
index 979a74d53..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateContainmentFeature.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Update Containment Feature</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * This particular kind of move operation describe a change of containment reference of a given element within the same container.
- * <!-- end-model-doc -->
- *
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateContainmentFeature()
- * @model
- * @generated
- */
-public interface UpdateContainmentFeature extends MoveModelElement {
- // UpdateContainmentFeature
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateModelElement.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateModelElement.java
deleted file mode 100644
index d4aa693f2..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateModelElement.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Update Model Element</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Superclass of DiffElements used to describe "move" types of differences. This includes both Moving from a container to another and changing the containment reference of an element. These changes imply both an addition and a removal.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getRightElement <em>Right Element</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getLeftElement <em>Left Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateModelElement()
- * @model
- * @generated
- */
-
-public interface UpdateModelElement extends ModelElementChange {
- /**
- * Returns the value of the '<em><b>Left Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Element</em>' reference isn't clear, there really should be more of
- * a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Element</em>' reference.
- * @see #setLeftElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateModelElement_LeftElement()
- * @model
- * @generated
- */
- EObject getLeftElement();
-
- /**
- * Returns the value of the '<em><b>Right Element</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Element</em>' reference isn't clear, there really should be more
- * of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Element</em>' reference.
- * @see #setRightElement(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateModelElement_RightElement()
- * @model
- * @generated
- */
- EObject getRightElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getLeftElement <em>Left Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Element</em>' reference.
- * @see #getLeftElement()
- * @generated
- */
- void setLeftElement(EObject value);
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement#getRightElement <em>Right Element</em>}' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Element</em>' reference.
- * @see #getRightElement()
- * @generated
- */
- void setRightElement(EObject value);
-
-} // UpdateModelElement
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateReference.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateReference.java
deleted file mode 100644
index 75c3dcd6b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/UpdateReference.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Update Reference</b></em>'. <!--
- * end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Differences of this kind represent modifications of the value of single-valued references.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateReference()
- * @model
- * @generated
- */
-
-public interface UpdateReference extends ReferenceChange {
-
- /**
- * Returns the value of the '<em><b>Left Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Left Target</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Left Target</em>' reference.
- * @see #setLeftTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateReference_LeftTarget()
- * @model
- * @generated
- */
- EObject getLeftTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference#getLeftTarget <em>Left Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Left Target</em>' reference.
- * @see #getLeftTarget()
- * @generated
- */
- void setLeftTarget(EObject value);
-
- /**
- * Returns the value of the '<em><b>Right Target</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Right Target</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Right Target</em>' reference.
- * @see #setRightTarget(EObject)
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#getUpdateReference_RightTarget()
- * @model
- * @generated
- */
- EObject getRightTarget();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.diff.metamodel.UpdateReference#getRightTarget <em>Right Target</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Right Target</em>' reference.
- * @see #getRightTarget()
- * @generated
- */
- void setRightTarget(EObject value);
- // This class doesn't need any Overriding to be functional
-} // UpdateReference
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AbstractDiffExtensionImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AbstractDiffExtensionImpl.java
deleted file mode 100644
index 0f559bee6..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AbstractDiffExtensionImpl.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Abstract Diff Extension</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl#getHideElements <em>Hide Elements</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AbstractDiffExtensionImpl#isIsCollapsed <em>Is Collapsed</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public abstract class AbstractDiffExtensionImpl extends EObjectImpl implements AbstractDiffExtension {
- /**
- * The cached value of the '{@link #getHideElements() <em>Hide Elements</em>}' reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getHideElements()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> hideElements;
-
- /**
- * The default value of the '{@link #isIsCollapsed() <em>Is Collapsed</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #isIsCollapsed()
- * @generated
- * @ordered
- */
- protected static final boolean IS_COLLAPSED_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isIsCollapsed() <em>Is Collapsed</em>}' attribute.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #isIsCollapsed()
- * @generated
- * @ordered
- */
- protected boolean isCollapsed = IS_COLLAPSED_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected AbstractDiffExtensionImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS:
- return getHideElements();
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED:
- return isIsCollapsed();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getHideElements()).basicAdd(
- otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS:
- return ((InternalEList<?>)getHideElements()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS:
- return hideElements != null && !hideElements.isEmpty();
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED:
- return isCollapsed != IS_COLLAPSED_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS:
- getHideElements().clear();
- getHideElements().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED:
- setIsCollapsed((Boolean)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS:
- getHideElements().clear();
- return;
- case DiffPackage.ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED:
- setIsCollapsed(IS_COLLAPSED_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffElement> getHideElements() {
- if (hideElements == null) {
- hideElements = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class,
- this, DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS,
- DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY);
- }
- return hideElements;
- }
-
- /**
- * <!-- begin-user-doc --> Should return a org.eclipse.swt.graphics.Image object representing the
- * {@link AbstractDiffExtension}. <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public Object getImage() {
- return null;
- }
-
- /**
- * <!-- begin-user-doc --> Should return the text used to represent the {@link AbstractDiffExtension};
- * <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public String getText() {
- return "Diff Extension"; //$NON-NLS-1$
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public boolean isIsCollapsed() {
- return isCollapsed;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public IMerger provideMerger() {
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setIsCollapsed(boolean newIsCollapsed) {
- boolean oldIsCollapsed = isCollapsed;
- isCollapsed = newIsCollapsed;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED, oldIsCollapsed, isCollapsed));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (isCollapsed: "); //$NON-NLS-1$
- result.append(isCollapsed);
- result.append(')');
- return result.toString();
- }
-
- /**
- * <!-- begin-user-doc --> This method is called by the Diff Engine to let the diff extension a chance to
- * refactor the diff model and plug themselves inside. <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public void visit(DiffModel diffModel) {
- // you should redefine this method
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.ABSTRACT_DIFF_EXTENSION;
- }
-
-} // AbstractDiffExtensionImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeImpl.java
deleted file mode 100644
index df5a5f456..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeImpl.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChange;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Attribute Change</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl#getAttribute <em>Attribute</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl#getLeftElement <em>Left Element</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeImpl#getRightElement <em>Right Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class AttributeChangeImpl extends DiffElementImpl implements AttributeChange {
- /**
- * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getAttribute()
- * @generated
- * @ordered
- */
- protected EAttribute attribute;
-
- /**
- * The cached value of the '{@link #getLeftElement() <em>Left Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getLeftElement()
- * @generated
- * @ordered
- */
- protected EObject leftElement;
-
- /**
- * The cached value of the '{@link #getRightElement() <em>Right Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightElement()
- * @generated
- * @ordered
- */
- protected EObject rightElement;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected AttributeChangeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute basicGetAttribute() {
- return attribute;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftElement() {
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightElement() {
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE__ATTRIBUTE:
- if (resolve)
- return getAttribute();
- return basicGetAttribute();
- case DiffPackage.ATTRIBUTE_CHANGE__LEFT_ELEMENT:
- if (resolve)
- return getLeftElement();
- return basicGetLeftElement();
- case DiffPackage.ATTRIBUTE_CHANGE__RIGHT_ELEMENT:
- if (resolve)
- return getRightElement();
- return basicGetRightElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE__ATTRIBUTE:
- return attribute != null;
- case DiffPackage.ATTRIBUTE_CHANGE__LEFT_ELEMENT:
- return leftElement != null;
- case DiffPackage.ATTRIBUTE_CHANGE__RIGHT_ELEMENT:
- return rightElement != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE__ATTRIBUTE:
- setAttribute((EAttribute)newValue);
- return;
- case DiffPackage.ATTRIBUTE_CHANGE__LEFT_ELEMENT:
- setLeftElement((EObject)newValue);
- return;
- case DiffPackage.ATTRIBUTE_CHANGE__RIGHT_ELEMENT:
- setRightElement((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE__ATTRIBUTE:
- setAttribute((EAttribute)null);
- return;
- case DiffPackage.ATTRIBUTE_CHANGE__LEFT_ELEMENT:
- setLeftElement((EObject)null);
- return;
- case DiffPackage.ATTRIBUTE_CHANGE__RIGHT_ELEMENT:
- setRightElement((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAttribute() {
- if (attribute != null && attribute.eIsProxy()) {
- InternalEObject oldAttribute = (InternalEObject)attribute;
- attribute = (EAttribute)eResolveProxy(oldAttribute);
- if (attribute != oldAttribute) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.ATTRIBUTE_CHANGE__ATTRIBUTE, oldAttribute, attribute));
- }
- }
- return attribute;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftElement() {
- if (leftElement != null && leftElement.eIsProxy()) {
- InternalEObject oldLeftElement = (InternalEObject)leftElement;
- leftElement = eResolveProxy(oldLeftElement);
- if (leftElement != oldLeftElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.ATTRIBUTE_CHANGE__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
- }
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightElement() {
- if (rightElement != null && rightElement.eIsProxy()) {
- InternalEObject oldRightElement = (InternalEObject)rightElement;
- rightElement = eResolveProxy(oldRightElement);
- if (rightElement != oldRightElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.ATTRIBUTE_CHANGE__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
- }
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setAttribute(EAttribute newAttribute) {
- EAttribute oldAttribute = attribute;
- attribute = newAttribute;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.ATTRIBUTE_CHANGE__ATTRIBUTE,
- oldAttribute, attribute));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftElement(EObject newLeftElement) {
- EObject oldLeftElement = leftElement;
- leftElement = newLeftElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.ATTRIBUTE_CHANGE__LEFT_ELEMENT,
- oldLeftElement, leftElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightElement(EObject newRightElement) {
- EObject oldRightElement = rightElement;
- rightElement = newRightElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.ATTRIBUTE_CHANGE__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.ATTRIBUTE_CHANGE;
- }
-
-} // AttributeChangeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeLeftTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeLeftTargetImpl.java
deleted file mode 100644
index 413e6a4b2..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeLeftTargetImpl.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Attribute Change Left Target</b></em>
- * '. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeLeftTargetImpl#getLeftTarget <em>Left Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class AttributeChangeLeftTargetImpl extends AttributeChangeImpl implements AttributeChangeLeftTarget {
- /**
- * The default value of the '{@link #getLeftTarget() <em>Left Target</em>}' attribute.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected static final Object LEFT_TARGET_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' attribute.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected Object leftTarget = LEFT_TARGET_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected AttributeChangeLeftTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- return getLeftTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- return LEFT_TARGET_EDEFAULT == null ? leftTarget != null : !LEFT_TARGET_EDEFAULT
- .equals(leftTarget);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString("RemoteAddReferenceValueImpl.ToString", //$NON-NLS-1$
- leftTarget, attribute.getName(), NameSimilarity.findName(leftElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoteAddReferenceValueImpl.ToString", //$NON-NLS-1$
- leftTarget, attribute.getName(), leftElement.eClass().getName());
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString("RemoveReferenceValueImpl.ToString", //$NON-NLS-1$
- leftTarget, attribute.getName(), NameSimilarity.findName(leftElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoveReferenceValueImpl.ToString", leftTarget, //$NON-NLS-1$
- attribute.getName(), leftElement.eClass().getName());
- }
- }
- return toString;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- setLeftTarget(newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- setLeftTarget(LEFT_TARGET_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public Object getLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(Object newLeftTarget) {
- Object oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.ATTRIBUTE_CHANGE_LEFT_TARGET;
- }
-
-} // AttributeChangeLeftTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeRightTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeRightTargetImpl.java
deleted file mode 100644
index 0fd5d1371..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeChangeRightTargetImpl.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Attribute Change Right Target</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.AttributeChangeRightTargetImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class AttributeChangeRightTargetImpl extends AttributeChangeImpl implements AttributeChangeRightTarget {
- /**
- * The default value of the '{@link #getRightTarget() <em>Right Target</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected static final Object RIGHT_TARGET_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected Object rightTarget = RIGHT_TARGET_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected AttributeChangeRightTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- return getRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- return RIGHT_TARGET_EDEFAULT == null ? rightTarget != null : !RIGHT_TARGET_EDEFAULT
- .equals(rightTarget);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString("RemoteRemoveAttributeValueImpl.ToString", //$NON-NLS-1$
- rightTarget, attribute.getName(), NameSimilarity.findName(rightElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoteRemoveAttributeValueImpl.ToString", //$NON-NLS-1$
- rightTarget, attribute.getName(), rightElement.eClass().getName());
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString("AddAttributeValueImpl.ToString", //$NON-NLS-1$
- rightTarget, attribute.getName(), NameSimilarity.findName(rightElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("AddAttributeValueImpl.ToString", rightTarget, //$NON-NLS-1$
- attribute.getName(), rightElement.eClass().getName());
- }
- }
- return toString;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- setRightTarget(newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- setRightTarget(RIGHT_TARGET_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public Object getRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(Object newRightTarget) {
- Object oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.ATTRIBUTE_CHANGE_RIGHT_TARGET;
- }
-
-} // AttributeChangeRightTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeOrderChangeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeOrderChangeImpl.java
deleted file mode 100644
index 4d304d3b0..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/AttributeOrderChangeImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Attribute Order Change</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- * @since 1.3
- */
-public class AttributeOrderChangeImpl extends AttributeChangeImpl implements AttributeOrderChange {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected AttributeOrderChangeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.ATTRIBUTE_ORDER_CHANGE;
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- return EMFCompareDiffMessages.getString("AttributeOrderChange.ToString", getAttribute().getName()); //$NON-NLS-1$
- }
-
-} // AttributeOrderChangeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSetSnapshotImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSetSnapshotImpl.java
deleted file mode 100644
index d4bfc0471..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSetSnapshotImpl.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.Date;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.match.metamodel.MatchResourceSet;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Comparison Resource Set Snapshot</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl#getDate <em>Date</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl#getDiffResourceSet <em>Diff Resource Set</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSetSnapshotImpl#getMatchResourceSet <em>Match Resource Set</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ComparisonResourceSetSnapshotImpl extends EObjectImpl implements ComparisonResourceSetSnapshot {
- /**
- * The default value of the '{@link #getDate() <em>Date</em>}' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @see #getDate()
- * @generated
- * @ordered
- */
- protected static final Date DATE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDate() <em>Date</em>}' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @see #getDate()
- * @generated
- * @ordered
- */
- protected Date date = DATE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getDiffResourceSet() <em>Diff Resource Set</em>}' containment reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #getDiffResourceSet()
- * @generated
- * @ordered
- */
- protected DiffResourceSet diffResourceSet;
-
- /**
- * The cached value of the '{@link #getMatchResourceSet() <em>Match Resource Set</em>}' containment reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #getMatchResourceSet()
- * @generated
- * @ordered
- */
- protected MatchResourceSet matchResourceSet;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ComparisonResourceSetSnapshotImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.COMPARISON_RESOURCE_SET_SNAPSHOT;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setDate(Date newDate) {
- Date oldDate = date;
- date = newDate;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DATE, oldDate, date));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffResourceSet getDiffResourceSet() {
- return diffResourceSet;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetDiffResourceSet(DiffResourceSet newDiffResourceSet,
- NotificationChain msgs) {
- DiffResourceSet oldDiffResourceSet = diffResourceSet;
- diffResourceSet = newDiffResourceSet;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET, oldDiffResourceSet,
- newDiffResourceSet);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setDiffResourceSet(DiffResourceSet newDiffResourceSet) {
- if (newDiffResourceSet != diffResourceSet) {
- NotificationChain msgs = null;
- if (diffResourceSet != null)
- msgs = ((InternalEObject)diffResourceSet).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET, null, msgs);
- if (newDiffResourceSet != null)
- msgs = ((InternalEObject)newDiffResourceSet).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET, null, msgs);
- msgs = basicSetDiffResourceSet(newDiffResourceSet, msgs);
- if (msgs != null)
- msgs.dispatch();
- } else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET, newDiffResourceSet,
- newDiffResourceSet));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public MatchResourceSet getMatchResourceSet() {
- return matchResourceSet;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMatchResourceSet(MatchResourceSet newMatchResourceSet,
- NotificationChain msgs) {
- MatchResourceSet oldMatchResourceSet = matchResourceSet;
- matchResourceSet = newMatchResourceSet;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET, oldMatchResourceSet,
- newMatchResourceSet);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setMatchResourceSet(MatchResourceSet newMatchResourceSet) {
- if (newMatchResourceSet != matchResourceSet) {
- NotificationChain msgs = null;
- if (matchResourceSet != null)
- msgs = ((InternalEObject)matchResourceSet).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET, null, msgs);
- if (newMatchResourceSet != null)
- msgs = ((InternalEObject)newMatchResourceSet).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET, null, msgs);
- msgs = basicSetMatchResourceSet(newMatchResourceSet, msgs);
- if (msgs != null)
- msgs.dispatch();
- } else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET, newMatchResourceSet,
- newMatchResourceSet));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET:
- return basicSetDiffResourceSet(null, msgs);
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET:
- return basicSetMatchResourceSet(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DATE:
- return getDate();
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET:
- return getDiffResourceSet();
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET:
- return getMatchResourceSet();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DATE:
- setDate((Date)newValue);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET:
- setDiffResourceSet((DiffResourceSet)newValue);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET:
- setMatchResourceSet((MatchResourceSet)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DATE:
- setDate(DATE_EDEFAULT);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET:
- setDiffResourceSet((DiffResourceSet)null);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET:
- setMatchResourceSet((MatchResourceSet)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DATE:
- return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date);
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET:
- return diffResourceSet != null;
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET:
- return matchResourceSet != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (date: "); //$NON-NLS-1$
- result.append(date);
- result.append(')');
- return result.toString();
- }
-
-} // ComparisonResourceSetSnapshotImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSnapshotImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSnapshotImpl.java
deleted file mode 100644
index dfdf421f2..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ComparisonResourceSnapshotImpl.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.Date;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Comparison Snapshot</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl#getDate <em>Date</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl#getDiff <em>Diff</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ComparisonResourceSnapshotImpl#getMatch <em>Match</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ComparisonResourceSnapshotImpl extends EObjectImpl implements ComparisonResourceSnapshot {
- /**
- * The default value of the '{@link #getDate() <em>Date</em>}' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @see #getDate()
- * @generated
- * @ordered
- */
- protected static final Date DATE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDate() <em>Date</em>}' attribute.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @see #getDate()
- * @generated
- * @ordered
- */
- protected Date date = DATE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getDiff() <em>Diff</em>}' containment reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getDiff()
- * @generated
- * @ordered
- */
- protected DiffModel diff;
-
- /**
- * The cached value of the '{@link #getMatch() <em>Match</em>}' containment reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getMatch()
- * @generated
- * @ordered
- */
- protected MatchModel match;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ComparisonResourceSnapshotImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.COMPARISON_RESOURCE_SNAPSHOT;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setDate(Date newDate) {
- Date oldDate = date;
- date = newDate;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DATE, oldDate, date));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffModel getDiff() {
- return diff;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetDiff(DiffModel newDiff, NotificationChain msgs) {
- DiffModel oldDiff = diff;
- diff = newDiff;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF, oldDiff, newDiff);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setDiff(DiffModel newDiff) {
- if (newDiff != diff) {
- NotificationChain msgs = null;
- if (diff != null)
- msgs = ((InternalEObject)diff).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF, null, msgs);
- if (newDiff != null)
- msgs = ((InternalEObject)newDiff).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF, null, msgs);
- msgs = basicSetDiff(newDiff, msgs);
- if (msgs != null)
- msgs.dispatch();
- } else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF, newDiff, newDiff));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public MatchModel getMatch() {
- return match;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetMatch(MatchModel newMatch, NotificationChain msgs) {
- MatchModel oldMatch = match;
- match = newMatch;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH, oldMatch, newMatch);
- if (msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setMatch(MatchModel newMatch) {
- if (newMatch != match) {
- NotificationChain msgs = null;
- if (match != null)
- msgs = ((InternalEObject)match).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH, null, msgs);
- if (newMatch != null)
- msgs = ((InternalEObject)newMatch).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH, null, msgs);
- msgs = basicSetMatch(newMatch, msgs);
- if (msgs != null)
- msgs.dispatch();
- } else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH, newMatch, newMatch));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF:
- return basicSetDiff(null, msgs);
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH:
- return basicSetMatch(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DATE:
- return getDate();
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF:
- return getDiff();
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH:
- return getMatch();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DATE:
- setDate((Date)newValue);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF:
- setDiff((DiffModel)newValue);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH:
- setMatch((MatchModel)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DATE:
- setDate(DATE_EDEFAULT);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF:
- setDiff((DiffModel)null);
- return;
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH:
- setMatch((MatchModel)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DATE:
- return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date);
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__DIFF:
- return diff != null;
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT__MATCH:
- return match != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (date: "); //$NON-NLS-1$
- result.append(date);
- result.append(')');
- return result.toString();
- }
-
-} // ComparisonResourceSnapshotImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ConflictingDiffElementImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ConflictingDiffElementImpl.java
deleted file mode 100644
index d335d8959..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ConflictingDiffElementImpl.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Conflicting Diff Element</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl#getLeftParent <em>Left Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl#getRightParent <em>Right Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ConflictingDiffElementImpl#getOriginElement <em>Origin Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class ConflictingDiffElementImpl extends DiffElementImpl implements ConflictingDiffElement {
- /**
- * The cached value of the '{@link #getLeftParent() <em>Left Parent</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getLeftParent()
- * @generated
- * @ordered
- */
- protected EObject leftParent;
-
- /**
- * The cached value of the '{@link #getRightParent() <em>Right Parent</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightParent()
- * @generated
- * @ordered
- */
- protected EObject rightParent;
-
- /**
- * The cached value of the '{@link #getOriginElement() <em>Origin Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getOriginElement()
- * @generated
- * @ordered
- */
- protected EObject originElement;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ConflictingDiffElementImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftParent() {
- return leftParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetOriginElement() {
- return originElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightParent() {
- return rightParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__LEFT_PARENT:
- if (resolve)
- return getLeftParent();
- return basicGetLeftParent();
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT:
- if (resolve)
- return getRightParent();
- return basicGetRightParent();
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT:
- if (resolve)
- return getOriginElement();
- return basicGetOriginElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__LEFT_PARENT:
- return leftParent != null;
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT:
- return rightParent != null;
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT:
- return originElement != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__LEFT_PARENT:
- setLeftParent((EObject)newValue);
- return;
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT:
- setRightParent((EObject)newValue);
- return;
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT:
- setOriginElement((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__LEFT_PARENT:
- setLeftParent((EObject)null);
- return;
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT:
- setRightParent((EObject)null);
- return;
- case DiffPackage.CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT:
- setOriginElement((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftParent() {
- if (leftParent != null && leftParent.eIsProxy()) {
- InternalEObject oldLeftParent = (InternalEObject)leftParent;
- leftParent = eResolveProxy(oldLeftParent);
- if (leftParent != oldLeftParent) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.CONFLICTING_DIFF_ELEMENT__LEFT_PARENT, oldLeftParent, leftParent));
- }
- }
- return leftParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getOriginElement() {
- if (originElement != null && originElement.eIsProxy()) {
- InternalEObject oldOriginElement = (InternalEObject)originElement;
- originElement = eResolveProxy(oldOriginElement);
- if (originElement != oldOriginElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT, oldOriginElement,
- originElement));
- }
- }
- return originElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightParent() {
- if (rightParent != null && rightParent.eIsProxy()) {
- InternalEObject oldRightParent = (InternalEObject)rightParent;
- rightParent = eResolveProxy(oldRightParent);
- if (rightParent != oldRightParent) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT, oldRightParent, rightParent));
- }
- }
- return rightParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftParent(EObject newLeftParent) {
- EObject oldLeftParent = leftParent;
- leftParent = newLeftParent;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.CONFLICTING_DIFF_ELEMENT__LEFT_PARENT, oldLeftParent, leftParent));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setOriginElement(EObject newOriginElement) {
- EObject oldOriginElement = originElement;
- originElement = newOriginElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT, oldOriginElement, originElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightParent(EObject newRightParent) {
- EObject oldRightParent = rightParent;
- rightParent = newRightParent;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT, oldRightParent, rightParent));
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- try {
- return EMFCompareDiffMessages
- .getString(
- "ConflictingDiffElementImpl.ToString", NameSimilarity.findName(leftParent), NameSimilarity.findName(rightParent)); //$NON-NLS-1$
- } catch (FactoryException e) {
- return EMFCompareDiffMessages
- .getString(
- "ConflictingDiffElementImpl.ToString", leftParent.eClass().getName(), rightParent.eClass().getName()); //$NON-NLS-1$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.CONFLICTING_DIFF_ELEMENT;
- }
-
-} // ConflictingDiffElementImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffElementImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffElementImpl.java
deleted file mode 100644
index 67af431ab..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffElementImpl.java
+++ /dev/null
@@ -1,466 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChange;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DifferenceKind;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Element</b></em>'. <!-- end-user-doc
- * -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#getSubDiffElements <em>Sub Diff
- * Elements</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#getIsHiddenBy <em>Is Hidden By</em>}
- * </li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#isConflicting <em>Conflicting</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#getKind <em>Kind</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public abstract class DiffElementImpl extends EObjectImpl implements DiffElement {
- /**
- * The cached value of the '{@link #getSubDiffElements() <em>Sub Diff Elements</em>}' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getSubDiffElements()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> subDiffElements;
-
- /**
- * The cached value of the '{@link #getIsHiddenBy() <em>Is Hidden By</em>}' reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getIsHiddenBy()
- * @generated
- * @ordered
- */
- protected EList<AbstractDiffExtension> isHiddenBy;
-
- /**
- * The default value of the '{@link #isConflicting() <em>Conflicting</em>}' attribute. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #isConflicting()
- * @generated
- * @ordered
- */
- protected static final boolean CONFLICTING_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isConflicting() <em>Conflicting</em>}' attribute. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #isConflicting()
- * @generated
- * @ordered
- */
- protected boolean conflicting = CONFLICTING_EDEFAULT;
-
- /**
- * The default value of the '{@link #getKind() <em>Kind</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected static final DifferenceKind KIND_EDEFAULT = DifferenceKind.ADDITION;
-
- /**
- * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected DifferenceKind kind = KIND_EDEFAULT;
-
- /**
- * The default value of the '{@link #isRemote() <em>Remote</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #isRemote()
- * @generated
- * @ordered
- */
- protected static final boolean REMOTE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isRemote() <em>Remote</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #isRemote()
- * @generated
- * @ordered
- */
- protected boolean remote = REMOTE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getRequires() <em>Requires</em>}' reference list. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #getRequires()
- * @generated
- * @ordered
- * @since 1.3
- */
- protected EList<DiffElement> requires;
-
- /**
- * The cached value of the '{@link #getRequiredBy() <em>Required By</em>}' reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRequiredBy()
- * @generated
- * @ordered
- * @since 1.3
- */
- protected EList<DiffElement> requiredBy;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DiffElementImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS:
- return getSubDiffElements();
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY:
- return getIsHiddenBy();
- case DiffPackage.DIFF_ELEMENT__CONFLICTING:
- return isConflicting();
- case DiffPackage.DIFF_ELEMENT__KIND:
- return getKind();
- case DiffPackage.DIFF_ELEMENT__REMOTE:
- return isRemote();
- case DiffPackage.DIFF_ELEMENT__REQUIRES:
- return getRequires();
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY:
- return getRequiredBy();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getIsHiddenBy()).basicAdd(otherEnd,
- msgs);
- case DiffPackage.DIFF_ELEMENT__REQUIRES:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getRequires()).basicAdd(otherEnd,
- msgs);
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getRequiredBy()).basicAdd(otherEnd,
- msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS:
- return ((InternalEList<?>)getSubDiffElements()).basicRemove(otherEnd, msgs);
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY:
- return ((InternalEList<?>)getIsHiddenBy()).basicRemove(otherEnd, msgs);
- case DiffPackage.DIFF_ELEMENT__REQUIRES:
- return ((InternalEList<?>)getRequires()).basicRemove(otherEnd, msgs);
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY:
- return ((InternalEList<?>)getRequiredBy()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS:
- return subDiffElements != null && !subDiffElements.isEmpty();
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY:
- return isHiddenBy != null && !isHiddenBy.isEmpty();
- case DiffPackage.DIFF_ELEMENT__CONFLICTING:
- return conflicting != CONFLICTING_EDEFAULT;
- case DiffPackage.DIFF_ELEMENT__KIND:
- return kind != KIND_EDEFAULT;
- case DiffPackage.DIFF_ELEMENT__REMOTE:
- return remote != REMOTE_EDEFAULT;
- case DiffPackage.DIFF_ELEMENT__REQUIRES:
- return requires != null && !requires.isEmpty();
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY:
- return requiredBy != null && !requiredBy.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS:
- getSubDiffElements().clear();
- getSubDiffElements().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY:
- getIsHiddenBy().clear();
- getIsHiddenBy().addAll((Collection<? extends AbstractDiffExtension>)newValue);
- return;
- case DiffPackage.DIFF_ELEMENT__REMOTE:
- setRemote((Boolean)newValue);
- return;
- case DiffPackage.DIFF_ELEMENT__REQUIRES:
- getRequires().clear();
- getRequires().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY:
- getRequiredBy().clear();
- getRequiredBy().addAll((Collection<? extends DiffElement>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS:
- getSubDiffElements().clear();
- return;
- case DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY:
- getIsHiddenBy().clear();
- return;
- case DiffPackage.DIFF_ELEMENT__REMOTE:
- setRemote(REMOTE_EDEFAULT);
- return;
- case DiffPackage.DIFF_ELEMENT__REQUIRES:
- getRequires().clear();
- return;
- case DiffPackage.DIFF_ELEMENT__REQUIRED_BY:
- getRequiredBy().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<AbstractDiffExtension> getIsHiddenBy() {
- if (isHiddenBy == null) {
- isHiddenBy = new EObjectWithInverseResolvingEList.ManyInverse<AbstractDiffExtension>(
- AbstractDiffExtension.class, this, DiffPackage.DIFF_ELEMENT__IS_HIDDEN_BY,
- DiffPackage.ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS);
- }
- return isHiddenBy;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public DifferenceKind getKind() {
- if (this instanceof AttributeChange || this instanceof ReferenceChange) {
- kind = DifferenceKind.CHANGE;
- } else if (this instanceof ModelElementChangeRightTarget
- || this instanceof ResourceDependencyChangeRightTarget) {
- kind = DifferenceKind.DELETION;
- } else if (this instanceof ModelElementChangeLeftTarget
- || this instanceof ResourceDependencyChangeLeftTarget) {
- kind = DifferenceKind.ADDITION;
- } else if (this instanceof UpdateModelElement) {
- kind = DifferenceKind.MOVE;
- } else {
- // default to DifferenceKind.CHANGE
- kind = DifferenceKind.CHANGE;
- }
- return kind;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isRemote() {
- return remote;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setRemote(boolean newRemote) {
- boolean oldRemote = remote;
- remote = newRemote;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.DIFF_ELEMENT__REMOTE,
- oldRemote, remote));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @since 1.3
- */
- public EList<DiffElement> getRequires() {
- if (requires == null) {
- requires = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class, this,
- DiffPackage.DIFF_ELEMENT__REQUIRES, DiffPackage.DIFF_ELEMENT__REQUIRED_BY);
- }
- return requires;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @since 1.3
- */
- public EList<DiffElement> getRequiredBy() {
- if (requiredBy == null) {
- requiredBy = new EObjectWithInverseResolvingEList.ManyInverse<DiffElement>(DiffElement.class,
- this, DiffPackage.DIFF_ELEMENT__REQUIRED_BY, DiffPackage.DIFF_ELEMENT__REQUIRES);
- }
- return requiredBy;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<DiffElement> getSubDiffElements() {
- if (subDiffElements == null) {
- subDiffElements = new EObjectContainmentEList<DiffElement>(DiffElement.class, this,
- DiffPackage.DIFF_ELEMENT__SUB_DIFF_ELEMENTS);
- }
- return subDiffElements;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public boolean isConflicting() {
- if (eContainer() instanceof ConflictingDiffElement || this instanceof ConflictingDiffElement) {
- conflicting = true;
- } else {
- conflicting = CONFLICTING_EDEFAULT;
- }
- return conflicting;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (conflicting: "); //$NON-NLS-1$
- result.append(conflicting);
- result.append(", kind: "); //$NON-NLS-1$
- result.append(kind);
- result.append(", remote: "); //$NON-NLS-1$
- result.append(remote);
- result.append(')');
- return result.toString();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.DIFF_ELEMENT;
- }
-
-} // DiffElementImpl
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
deleted file mode 100644
index 58bf3c9f8..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffFactoryImpl.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.compare.diff.metamodel.*;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChange;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.DifferenceKind;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDiff;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc -->
- * @generated
- */
-public class DiffFactoryImpl extends EFactoryImpl implements DiffFactory {
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static DiffPackage getPackage() {
- return DiffPackage.eINSTANCE;
- }
-
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public static DiffFactory init() {
- try {
- DiffFactory theDiffFactory = (DiffFactory)EPackage.Registry.INSTANCE
- .getEFactory("http://www.eclipse.org/emf/compare/diff/1.1"); //$NON-NLS-1$
- if (theDiffFactory != null) {
- return theDiffFactory;
- }
- } catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new DiffFactoryImpl();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unused")
- public String convertDifferenceKindToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case DiffPackage.DIFFERENCE_KIND:
- return convertDifferenceKindToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException(
- "The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case DiffPackage.DIFF_MODEL:
- return createDiffModel();
- case DiffPackage.DIFF_RESOURCE_SET:
- return createDiffResourceSet();
- case DiffPackage.CONFLICTING_DIFF_ELEMENT:
- return createConflictingDiffElement();
- case DiffPackage.DIFF_GROUP:
- return createDiffGroup();
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT:
- return createComparisonResourceSnapshot();
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT:
- return createComparisonResourceSetSnapshot();
- case DiffPackage.MODEL_ELEMENT_CHANGE:
- return createModelElementChange();
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET:
- return createModelElementChangeLeftTarget();
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET:
- return createModelElementChangeRightTarget();
- case DiffPackage.UPDATE_MODEL_ELEMENT:
- return createUpdateModelElement();
- case DiffPackage.MOVE_MODEL_ELEMENT:
- return createMoveModelElement();
- case DiffPackage.UPDATE_CONTAINMENT_FEATURE:
- return createUpdateContainmentFeature();
- case DiffPackage.ATTRIBUTE_CHANGE:
- return createAttributeChange();
- case DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET:
- return createAttributeChangeLeftTarget();
- case DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET:
- return createAttributeChangeRightTarget();
- case DiffPackage.ATTRIBUTE_ORDER_CHANGE:
- return createAttributeOrderChange();
- case DiffPackage.UPDATE_ATTRIBUTE:
- return createUpdateAttribute();
- case DiffPackage.REFERENCE_CHANGE:
- return createReferenceChange();
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET:
- return createReferenceChangeLeftTarget();
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET:
- return createReferenceChangeRightTarget();
- case DiffPackage.UPDATE_REFERENCE:
- return createUpdateReference();
- case DiffPackage.REFERENCE_ORDER_CHANGE:
- return createReferenceOrderChange();
- case DiffPackage.RESOURCE_DIFF:
- return createResourceDiff();
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE:
- return createResourceDependencyChange();
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET:
- return createResourceDependencyChangeLeftTarget();
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET:
- return createResourceDependencyChangeRightTarget();
- default:
- throw new IllegalArgumentException(
- "The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public AttributeChange createAttributeChange() {
- AttributeChangeImpl attributeChange = new AttributeChangeImpl();
- return attributeChange;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public AttributeChangeLeftTarget createAttributeChangeLeftTarget() {
- AttributeChangeLeftTargetImpl attributeChangeLeftTarget = new AttributeChangeLeftTargetImpl();
- return attributeChangeLeftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public AttributeChangeRightTarget createAttributeChangeRightTarget() {
- AttributeChangeRightTargetImpl attributeChangeRightTarget = new AttributeChangeRightTargetImpl();
- return attributeChangeRightTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @since 1.3
- */
- public AttributeOrderChange createAttributeOrderChange() {
- AttributeOrderChangeImpl attributeOrderChange = new AttributeOrderChangeImpl();
- return attributeOrderChange;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ConflictingDiffElement createConflictingDiffElement() {
- ConflictingDiffElementImpl conflictingDiffElement = new ConflictingDiffElementImpl();
- return conflictingDiffElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DifferenceKind createDifferenceKindFromString(EDataType eDataType, String initialValue) {
- DifferenceKind result = DifferenceKind.get(initialValue);
- if (result == null)
- throw new IllegalArgumentException(
- "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return result;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffGroup createDiffGroup() {
- DiffGroupImpl diffGroup = new DiffGroupImpl();
- return diffGroup;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ComparisonResourceSnapshot createComparisonResourceSnapshot() {
- ComparisonResourceSnapshotImpl comparisonResourceSnapshot = new ComparisonResourceSnapshotImpl();
- return comparisonResourceSnapshot;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ComparisonResourceSetSnapshot createComparisonResourceSetSnapshot() {
- ComparisonResourceSetSnapshotImpl comparisonResourceSetSnapshot = new ComparisonResourceSetSnapshotImpl();
- return comparisonResourceSetSnapshot;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffModel createDiffModel() {
- DiffModelImpl diffModel = new DiffModelImpl();
- return diffModel;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffResourceSet createDiffResourceSet() {
- DiffResourceSetImpl diffResourceSet = new DiffResourceSetImpl();
- return diffResourceSet;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case DiffPackage.DIFFERENCE_KIND:
- return createDifferenceKindFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException(
- "The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ModelElementChange createModelElementChange() {
- ModelElementChangeImpl modelElementChange = new ModelElementChangeImpl();
- return modelElementChange;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ModelElementChangeLeftTarget createModelElementChangeLeftTarget() {
- ModelElementChangeLeftTargetImpl modelElementChangeLeftTarget = new ModelElementChangeLeftTargetImpl();
- return modelElementChangeLeftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ModelElementChangeRightTarget createModelElementChangeRightTarget() {
- ModelElementChangeRightTargetImpl modelElementChangeRightTarget = new ModelElementChangeRightTargetImpl();
- return modelElementChangeRightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public MoveModelElement createMoveModelElement() {
- MoveModelElementImpl moveModelElement = new MoveModelElementImpl();
- return moveModelElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public UpdateContainmentFeature createUpdateContainmentFeature() {
- UpdateContainmentFeatureImpl updateContainmentFeature = new UpdateContainmentFeatureImpl();
- return updateContainmentFeature;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ReferenceChange createReferenceChange() {
- ReferenceChangeImpl referenceChange = new ReferenceChangeImpl();
- return referenceChange;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ReferenceChangeLeftTarget createReferenceChangeLeftTarget() {
- ReferenceChangeLeftTargetImpl referenceChangeLeftTarget = new ReferenceChangeLeftTargetImpl();
- return referenceChangeLeftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ReferenceChangeRightTarget createReferenceChangeRightTarget() {
- ReferenceChangeRightTargetImpl referenceChangeRightTarget = new ReferenceChangeRightTargetImpl();
- return referenceChangeRightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ResourceDiff createResourceDiff() {
- ResourceDiffImpl resourceDiff = new ResourceDiffImpl();
- return resourceDiff;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ResourceDependencyChange createResourceDependencyChange() {
- ResourceDependencyChangeImpl resourceDependencyChange = new ResourceDependencyChangeImpl();
- return resourceDependencyChange;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ResourceDependencyChangeLeftTarget createResourceDependencyChangeLeftTarget() {
- ResourceDependencyChangeLeftTargetImpl resourceDependencyChangeLeftTarget = new ResourceDependencyChangeLeftTargetImpl();
- return resourceDependencyChangeLeftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ResourceDependencyChangeRightTarget createResourceDependencyChangeRightTarget() {
- ResourceDependencyChangeRightTargetImpl resourceDependencyChangeRightTarget = new ResourceDependencyChangeRightTargetImpl();
- return resourceDependencyChangeRightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public UpdateAttribute createUpdateAttribute() {
- UpdateAttributeImpl updateAttribute = new UpdateAttributeImpl();
- return updateAttribute;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public UpdateModelElement createUpdateModelElement() {
- UpdateModelElementImpl updateModelElement = new UpdateModelElementImpl();
- return updateModelElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public UpdateReference createUpdateReference() {
- UpdateReferenceImpl updateReference = new UpdateReferenceImpl();
- return updateReference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public ReferenceOrderChange createReferenceOrderChange() {
- ReferenceOrderChangeImpl referenceOrderChange = new ReferenceOrderChangeImpl();
- return referenceOrderChange;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffPackage getDiffPackage() {
- return (DiffPackage)getEPackage();
- }
-
-} // DiffFactoryImpl
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
deleted file mode 100644
index 80ee9d6b5..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffGroupImpl.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.Iterator;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.util.DiffAdapterFactory;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Group</b></em>'. <!-- end-user-doc
- * -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffGroupImpl#getRightParent <em>Right Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffGroupImpl#getSubchanges <em>Subchanges</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DiffGroupImpl extends DiffElementImpl implements DiffGroup {
- /**
- * The cached value of the '{@link #getRightParent() <em>Right Parent</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightParent()
- * @generated
- * @ordered
- */
- protected EObject rightParent;
-
- /**
- * The default value of the '{@link #getSubchanges() <em>Subchanges</em>}' attribute.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getSubchanges()
- * @generated
- * @ordered
- */
- protected static final int SUBCHANGES_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getSubchanges() <em>Subchanges</em>}' attribute.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getSubchanges()
- * @generated
- * @ordered
- */
- protected int subchanges = SUBCHANGES_EDEFAULT;
-
- /**
- * This is true if the Subchanges attribute has been set.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean subchangesESet;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected DiffGroupImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.DIFF_GROUP__RIGHT_PARENT:
- if (resolve)
- return getRightParent();
- return basicGetRightParent();
- case DiffPackage.DIFF_GROUP__SUBCHANGES:
- return getSubchanges();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_GROUP__RIGHT_PARENT:
- return rightParent != null;
- case DiffPackage.DIFF_GROUP__SUBCHANGES:
- return isSetSubchanges();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.DIFF_GROUP__RIGHT_PARENT:
- setRightParent((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_GROUP__RIGHT_PARENT:
- setRightParent((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public int getSubchanges() {
- final Iterator<DiffElement> it = getSubDiffElements().iterator();
- int result = 0;
- while (it.hasNext()) {
- final DiffElement eObj = it.next();
- if (!DiffAdapterFactory.shouldBeHidden(eObj))
- if (eObj instanceof DiffGroup) {
- result += ((DiffGroup)eObj).getSubchanges();
- } else {
- result += 1;
- }
-
- }
- return result;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetSubchanges() {
- return subchangesESet;
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- if (rightParent == null)
- return super.toString();
- try {
- return EMFCompareDiffMessages
- .getString(
- "DiffGroupImpl.ToString", getSubchanges(), rightParent.eClass().getName(), NameSimilarity.findName(rightParent)); //$NON-NLS-1$
- } catch (final FactoryException e) {
- return EMFCompareDiffMessages.getString(
- "DiffGroupImpl.ToString", getSubchanges(), rightParent.eClass().getName()); //$NON-NLS-1$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.DIFF_GROUP;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightParent() {
- if (rightParent != null && rightParent.eIsProxy()) {
- InternalEObject oldRightParent = (InternalEObject)rightParent;
- rightParent = eResolveProxy(oldRightParent);
- if (rightParent != oldRightParent) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.DIFF_GROUP__RIGHT_PARENT, oldRightParent, rightParent));
- }
- }
- return rightParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightParent() {
- return rightParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightParent(EObject newRightParent) {
- EObject oldRightParent = rightParent;
- rightParent = newRightParent;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.DIFF_GROUP__RIGHT_PARENT,
- oldRightParent, rightParent));
- }
-
-} // DiffGroupImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffModelImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffModelImpl.java
deleted file mode 100644
index b8981fdad..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffModelImpl.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.BasicEList.UnmodifiableEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Model</b></em>'. <!-- end-user-doc
- * -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl#getOwnedElements <em>Owned Elements
- * </em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl#getLeftRoots <em>Left Roots</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl#getRightRoots <em>Right Roots</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffModelImpl#getAncestorRoots <em>Ancestor Roots
- * </em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DiffModelImpl extends EObjectImpl implements DiffModel {
- /**
- * The cached value of the '{@link #getOwnedElements() <em>Owned Elements</em>}' containment reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getOwnedElements()
- * @generated
- * @ordered
- */
- protected EList<DiffElement> ownedElements;
-
- /**
- * The cached value of the '{@link #getLeftRoots() <em>Left Roots</em>}' reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getLeftRoots()
- * @generated
- * @ordered
- */
- protected EList<EObject> leftRoots;
-
- /**
- * The cached value of the '{@link #getRightRoots() <em>Right Roots</em>}' reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightRoots()
- * @generated
- * @ordered
- */
- protected EList<EObject> rightRoots;
-
- /**
- * The cached value of the '{@link #getAncestorRoots() <em>Ancestor Roots</em>}' reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getAncestorRoots()
- * @generated
- * @ordered
- */
- protected EList<EObject> ancestorRoots;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DiffModelImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.DIFF_MODEL__OWNED_ELEMENTS:
- return getOwnedElements();
- case DiffPackage.DIFF_MODEL__LEFT_ROOTS:
- return getLeftRoots();
- case DiffPackage.DIFF_MODEL__RIGHT_ROOTS:
- return getRightRoots();
- case DiffPackage.DIFF_MODEL__ANCESTOR_ROOTS:
- return getAncestorRoots();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.DIFF_MODEL__OWNED_ELEMENTS:
- return ((InternalEList<?>)getOwnedElements()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_MODEL__OWNED_ELEMENTS:
- return ownedElements != null && !ownedElements.isEmpty();
- case DiffPackage.DIFF_MODEL__LEFT_ROOTS:
- return leftRoots != null && !leftRoots.isEmpty();
- case DiffPackage.DIFF_MODEL__RIGHT_ROOTS:
- return rightRoots != null && !rightRoots.isEmpty();
- case DiffPackage.DIFF_MODEL__ANCESTOR_ROOTS:
- return ancestorRoots != null && !ancestorRoots.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.DIFF_MODEL__OWNED_ELEMENTS:
- getOwnedElements().clear();
- getOwnedElements().addAll((Collection<? extends DiffElement>)newValue);
- return;
- case DiffPackage.DIFF_MODEL__LEFT_ROOTS:
- getLeftRoots().clear();
- getLeftRoots().addAll((Collection<? extends EObject>)newValue);
- return;
- case DiffPackage.DIFF_MODEL__RIGHT_ROOTS:
- getRightRoots().clear();
- getRightRoots().addAll((Collection<? extends EObject>)newValue);
- return;
- case DiffPackage.DIFF_MODEL__ANCESTOR_ROOTS:
- getAncestorRoots().clear();
- getAncestorRoots().addAll((Collection<? extends EObject>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_MODEL__OWNED_ELEMENTS:
- getOwnedElements().clear();
- return;
- case DiffPackage.DIFF_MODEL__LEFT_ROOTS:
- getLeftRoots().clear();
- return;
- case DiffPackage.DIFF_MODEL__RIGHT_ROOTS:
- getRightRoots().clear();
- return;
- case DiffPackage.DIFF_MODEL__ANCESTOR_ROOTS:
- getAncestorRoots().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<DiffElement> getOwnedElements() {
- if (ownedElements == null) {
- ownedElements = new EObjectContainmentEList<DiffElement>(DiffElement.class, this,
- DiffPackage.DIFF_MODEL__OWNED_ELEMENTS);
- }
- return ownedElements;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<EObject> getLeftRoots() {
- if (leftRoots == null) {
- leftRoots = new EObjectResolvingEList<EObject>(EObject.class, this,
- DiffPackage.DIFF_MODEL__LEFT_ROOTS);
- }
- return leftRoots;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<EObject> getRightRoots() {
- if (rightRoots == null) {
- rightRoots = new EObjectResolvingEList<EObject>(EObject.class, this,
- DiffPackage.DIFF_MODEL__RIGHT_ROOTS);
- }
- return rightRoots;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<EObject> getAncestorRoots() {
- if (ancestorRoots == null) {
- ancestorRoots = new EObjectResolvingEList<EObject>(EObject.class, this,
- DiffPackage.DIFF_MODEL__ANCESTOR_ROOTS);
- }
- return ancestorRoots;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public int getSubchanges() {
- int subChanges = 0;
- for (DiffElement diff : getOwnedElements()) {
- if (diff instanceof DiffGroup) {
- subChanges += ((DiffGroup)diff).getSubchanges();
- } else {
- // not possible at the time of writing
- subChanges += 1;
- }
- }
- return subChanges;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public EList<DiffElement> getDifferences(EObject modelElement) {
- List<DiffElement> ownedDifferences = new ArrayList<DiffElement>();
-
- for (DiffElement diff : getOwnedElements()) {
- if (diff instanceof DiffGroup || diff instanceof ConflictingDiffElementImpl) {
- ownedDifferences.addAll(getDifferencesFrom(diff, modelElement));
- } else {
- // not possible at the time of writing
- if (isPertinentDiff(diff, modelElement)) {
- ownedDifferences.add(diff);
- }
- }
- }
-
- DiffElement[] differences = ownedDifferences.toArray(new DiffElement[ownedDifferences.size()]);
- Arrays.sort(differences, new DiffElementComparator());
- return new UnmodifiableEList<DiffElement>(ownedDifferences.size(), differences);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public EList<DiffElement> getDifferences() {
- List<DiffElement> ownedDifferences = new ArrayList<DiffElement>();
-
- for (DiffElement diff : getOwnedElements()) {
- if (diff instanceof DiffGroup || diff instanceof ConflictingDiffElementImpl) {
- ownedDifferences.addAll(getDifferencesFrom(diff));
- } else {
- // not possible at the time of writing
- ownedDifferences.add(diff);
- }
- }
-
- DiffElement[] differences = ownedDifferences.toArray(new DiffElement[ownedDifferences.size()]);
- Arrays.sort(differences, new DiffElementComparator());
- return new UnmodifiableEList<DiffElement>(ownedDifferences.size(), differences);
- }
-
- /**
- * Returns the list of all sub-differences of the given DiffGroup recursively.
- *
- * @param group
- * The group we seek the sub-differences of.
- * @return The list of all differences under the given diffgroup, less the sub-DiffGroups themselves.
- * @generated NOT
- */
- private EList<DiffElement> getDifferencesFrom(DiffElement group) {
- EList<DiffElement> ownedDifferences = new BasicEList<DiffElement>();
-
- for (DiffElement diff : group.getSubDiffElements()) {
- if (diff instanceof DiffGroup || diff instanceof ConflictingDiffElementImpl) {
- ownedDifferences.addAll(getDifferencesFrom(diff));
- } else {
- ownedDifferences.add(diff);
- }
- }
-
- return ownedDifferences;
- }
-
- /**
- * Returns the list of all sub-differences of the given DiffGroup that concern the given EObject,
- * recursively.
- *
- * @param group
- * The group we seek the sub-differences of.
- * @param modelElement
- * Model element on which the difference must be detected.
- * @return The list of all differences under the given diffgroup, less the sub-DiffGroups themselves.
- * @generated NOT
- */
- private EList<DiffElement> getDifferencesFrom(DiffElement group, EObject modelElement) {
- EList<DiffElement> ownedDifferences = new BasicEList<DiffElement>();
-
- for (DiffElement diff : group.getSubDiffElements()) {
- if (diff instanceof DiffGroup || diff instanceof ConflictingDiffElementImpl) {
- ownedDifferences.addAll(getDifferencesFrom(diff));
- } else {
- if (isPertinentDiff(diff, modelElement)) {
- ownedDifferences.add(diff);
- }
- }
- }
-
- return ownedDifferences;
- }
-
- /**
- * This will return <code>true</code> iff the given DiffElement concerns the given EObject.
- *
- * @param diff
- * The diff to take into account.
- * @param modelElement
- * Element on which the diff must be applying.
- * @return <code>true</code> if the given DiffElement concerns the given EObject, <code>false</code>
- * otherwise.
- */
- private boolean isPertinentDiff(DiffElement diff, EObject modelElement) {
- boolean isPertinent = false;
- if (diff instanceof ModelElementChangeLeftTargetImpl) {
- isPertinent = ((ModelElementChangeLeftTargetImpl)diff).getLeftElement().equals(modelElement);
- }
- return isPertinent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.DIFF_MODEL;
- }
-
- /**
- * We'll use this in order to sort the differences before returning them through {@link #getDifferences()}
- * . This is neeeded since "ReferenceOrderChange" must always come last, after all additions and removals
- * have been merged.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
- private class DiffElementComparator implements Comparator<DiffElement> {
- /** Increases visibility of the default constructor. */
- public DiffElementComparator() {
- // Enhances visibility
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- public int compare(DiffElement o1, DiffElement o2) {
- int result = -1;
- if (o1 instanceof ReferenceOrderChange || o2 instanceof ReferenceOrderChange) {
- if (o1 instanceof ReferenceOrderChange && o2 instanceof ReferenceOrderChange) {
- result = 0;
- } else if (o2 instanceof ReferenceOrderChange) {
- result = -1;
- } else {
- result = 1;
- }
- }
- return result;
- }
- }
-} // DiffModelImpl
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
deleted file mode 100644
index 042bbc489..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffPackageImpl.java
+++ /dev/null
@@ -1,1551 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.merge.IMerger;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChange;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.DifferenceKind;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDiff;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.match.metamodel.MatchPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EOperation;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
- * @generated
- */
-public class DiffPackageImpl extends EPackageImpl implements DiffPackage {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractDiffExtensionEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass resourceDiffEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass resourceDependencyChangeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass resourceDependencyChangeLeftTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass resourceDependencyChangeRightTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass attributeChangeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass attributeChangeLeftTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass attributeChangeRightTargetEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass attributeOrderChangeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass conflictingDiffElementEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass diffElementEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EEnum differenceKindEEnum = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass diffGroupEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass comparisonSnapshotEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass comparisonResourceSnapshotEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass comparisonResourceSetSnapshotEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass diffModelEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass diffResourceSetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EDataType iMergerEDataType = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass modelElementChangeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass modelElementChangeLeftTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass modelElementChangeRightTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass moveModelElementEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass updateContainmentFeatureEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass referenceChangeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass referenceChangeLeftTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass referenceChangeRightTargetEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass updateAttributeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass updateModelElementEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass updateReferenceEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- private EClass referenceOrderChangeEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>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.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private DiffPackageImpl() {
- super(eNS_URI, DiffFactory.eINSTANCE);
- }
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it
- * depends. Simple dependencies are satisfied by calling this method on all dependent packages before
- * doing anything else. This method drives initialization for interdependent packages directly, in
- * parallel with this package, itself.
- * <p>
- * Of this package and its interdependencies, all packages which have not yet been registered by their URI
- * values are first created and registered. The packages are then initialized in two steps: meta-model
- * objects for all of the packages are created before any are initialized, since one package's meta-model
- * objects may refer to those of another.
- * <p>
- * Invocation of this method will not affect any packages that have already been initialized. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static DiffPackage init() {
- if (isInited)
- return (DiffPackage)EPackage.Registry.INSTANCE.getEPackage(DiffPackage.eNS_URI);
-
- // Obtain or create and register package
- DiffPackageImpl theDiffPackage = (DiffPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DiffPackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI) : new DiffPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
- MatchPackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theDiffPackage.createPackageContents();
-
- // Initialize created meta-data
- theDiffPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theDiffPackage.freeze();
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(DiffPackage.eNS_URI, theDiffPackage);
- return theDiffPackage;
- }
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated)
- return;
- isCreated = true;
-
- // Create classes and their features
- diffModelEClass = createEClass(DIFF_MODEL);
- createEReference(diffModelEClass, DIFF_MODEL__OWNED_ELEMENTS);
- createEReference(diffModelEClass, DIFF_MODEL__LEFT_ROOTS);
- createEReference(diffModelEClass, DIFF_MODEL__RIGHT_ROOTS);
- createEReference(diffModelEClass, DIFF_MODEL__ANCESTOR_ROOTS);
-
- diffResourceSetEClass = createEClass(DIFF_RESOURCE_SET);
- createEReference(diffResourceSetEClass, DIFF_RESOURCE_SET__DIFF_MODELS);
- createEReference(diffResourceSetEClass, DIFF_RESOURCE_SET__RESOURCE_DIFFS);
-
- diffElementEClass = createEClass(DIFF_ELEMENT);
- createEReference(diffElementEClass, DIFF_ELEMENT__SUB_DIFF_ELEMENTS);
- createEReference(diffElementEClass, DIFF_ELEMENT__IS_HIDDEN_BY);
- createEAttribute(diffElementEClass, DIFF_ELEMENT__CONFLICTING);
- createEAttribute(diffElementEClass, DIFF_ELEMENT__KIND);
- createEAttribute(diffElementEClass, DIFF_ELEMENT__REMOTE);
- createEReference(diffElementEClass, DIFF_ELEMENT__REQUIRES);
- createEReference(diffElementEClass, DIFF_ELEMENT__REQUIRED_BY);
-
- conflictingDiffElementEClass = createEClass(CONFLICTING_DIFF_ELEMENT);
- createEReference(conflictingDiffElementEClass, CONFLICTING_DIFF_ELEMENT__LEFT_PARENT);
- createEReference(conflictingDiffElementEClass, CONFLICTING_DIFF_ELEMENT__RIGHT_PARENT);
- createEReference(conflictingDiffElementEClass, CONFLICTING_DIFF_ELEMENT__ORIGIN_ELEMENT);
-
- diffGroupEClass = createEClass(DIFF_GROUP);
- createEReference(diffGroupEClass, DIFF_GROUP__RIGHT_PARENT);
- createEAttribute(diffGroupEClass, DIFF_GROUP__SUBCHANGES);
-
- comparisonSnapshotEClass = createEClass(COMPARISON_SNAPSHOT);
- createEAttribute(comparisonSnapshotEClass, COMPARISON_SNAPSHOT__DATE);
-
- comparisonResourceSnapshotEClass = createEClass(COMPARISON_RESOURCE_SNAPSHOT);
- createEReference(comparisonResourceSnapshotEClass, COMPARISON_RESOURCE_SNAPSHOT__DIFF);
- createEReference(comparisonResourceSnapshotEClass, COMPARISON_RESOURCE_SNAPSHOT__MATCH);
-
- comparisonResourceSetSnapshotEClass = createEClass(COMPARISON_RESOURCE_SET_SNAPSHOT);
- createEReference(comparisonResourceSetSnapshotEClass,
- COMPARISON_RESOURCE_SET_SNAPSHOT__DIFF_RESOURCE_SET);
- createEReference(comparisonResourceSetSnapshotEClass,
- COMPARISON_RESOURCE_SET_SNAPSHOT__MATCH_RESOURCE_SET);
-
- modelElementChangeEClass = createEClass(MODEL_ELEMENT_CHANGE);
-
- modelElementChangeLeftTargetEClass = createEClass(MODEL_ELEMENT_CHANGE_LEFT_TARGET);
- createEReference(modelElementChangeLeftTargetEClass, MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT);
- createEReference(modelElementChangeLeftTargetEClass, MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT);
-
- modelElementChangeRightTargetEClass = createEClass(MODEL_ELEMENT_CHANGE_RIGHT_TARGET);
- createEReference(modelElementChangeRightTargetEClass, MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT);
- createEReference(modelElementChangeRightTargetEClass,
- MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT);
-
- updateModelElementEClass = createEClass(UPDATE_MODEL_ELEMENT);
- createEReference(updateModelElementEClass, UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT);
- createEReference(updateModelElementEClass, UPDATE_MODEL_ELEMENT__LEFT_ELEMENT);
-
- moveModelElementEClass = createEClass(MOVE_MODEL_ELEMENT);
- createEReference(moveModelElementEClass, MOVE_MODEL_ELEMENT__LEFT_TARGET);
- createEReference(moveModelElementEClass, MOVE_MODEL_ELEMENT__RIGHT_TARGET);
-
- updateContainmentFeatureEClass = createEClass(UPDATE_CONTAINMENT_FEATURE);
-
- attributeChangeEClass = createEClass(ATTRIBUTE_CHANGE);
- createEReference(attributeChangeEClass, ATTRIBUTE_CHANGE__ATTRIBUTE);
- createEReference(attributeChangeEClass, ATTRIBUTE_CHANGE__LEFT_ELEMENT);
- createEReference(attributeChangeEClass, ATTRIBUTE_CHANGE__RIGHT_ELEMENT);
-
- attributeChangeLeftTargetEClass = createEClass(ATTRIBUTE_CHANGE_LEFT_TARGET);
- createEAttribute(attributeChangeLeftTargetEClass, ATTRIBUTE_CHANGE_LEFT_TARGET__LEFT_TARGET);
-
- attributeChangeRightTargetEClass = createEClass(ATTRIBUTE_CHANGE_RIGHT_TARGET);
- createEAttribute(attributeChangeRightTargetEClass, ATTRIBUTE_CHANGE_RIGHT_TARGET__RIGHT_TARGET);
-
- attributeOrderChangeEClass = createEClass(ATTRIBUTE_ORDER_CHANGE);
-
- updateAttributeEClass = createEClass(UPDATE_ATTRIBUTE);
-
- referenceChangeEClass = createEClass(REFERENCE_CHANGE);
- createEReference(referenceChangeEClass, REFERENCE_CHANGE__REFERENCE);
- createEReference(referenceChangeEClass, REFERENCE_CHANGE__RIGHT_ELEMENT);
- createEReference(referenceChangeEClass, REFERENCE_CHANGE__LEFT_ELEMENT);
-
- referenceChangeLeftTargetEClass = createEClass(REFERENCE_CHANGE_LEFT_TARGET);
- createEReference(referenceChangeLeftTargetEClass, REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET);
- createEReference(referenceChangeLeftTargetEClass, REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET);
-
- referenceChangeRightTargetEClass = createEClass(REFERENCE_CHANGE_RIGHT_TARGET);
- createEReference(referenceChangeRightTargetEClass, REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET);
- createEReference(referenceChangeRightTargetEClass, REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET);
-
- updateReferenceEClass = createEClass(UPDATE_REFERENCE);
- createEReference(updateReferenceEClass, UPDATE_REFERENCE__LEFT_TARGET);
- createEReference(updateReferenceEClass, UPDATE_REFERENCE__RIGHT_TARGET);
-
- referenceOrderChangeEClass = createEClass(REFERENCE_ORDER_CHANGE);
- createEReference(referenceOrderChangeEClass, REFERENCE_ORDER_CHANGE__LEFT_TARGET);
- createEReference(referenceOrderChangeEClass, REFERENCE_ORDER_CHANGE__RIGHT_TARGET);
-
- abstractDiffExtensionEClass = createEClass(ABSTRACT_DIFF_EXTENSION);
- createEReference(abstractDiffExtensionEClass, ABSTRACT_DIFF_EXTENSION__HIDE_ELEMENTS);
- createEAttribute(abstractDiffExtensionEClass, ABSTRACT_DIFF_EXTENSION__IS_COLLAPSED);
-
- resourceDiffEClass = createEClass(RESOURCE_DIFF);
-
- resourceDependencyChangeEClass = createEClass(RESOURCE_DEPENDENCY_CHANGE);
- createEReference(resourceDependencyChangeEClass, RESOURCE_DEPENDENCY_CHANGE__ROOTS);
-
- resourceDependencyChangeLeftTargetEClass = createEClass(RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET);
-
- resourceDependencyChangeRightTargetEClass = createEClass(RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET);
-
- // Create enums
- differenceKindEEnum = createEEnum(DIFFERENCE_KIND);
-
- // Create data types
- iMergerEDataType = createEDataType(IMERGER);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getAbstractDiffExtension() {
- return abstractDiffExtensionEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getAbstractDiffExtension_HideElements() {
- return (EReference)abstractDiffExtensionEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAbstractDiffExtension_IsCollapsed() {
- return (EAttribute)abstractDiffExtensionEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getResourceDiff() {
- return resourceDiffEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getResourceDependencyChange() {
- return resourceDependencyChangeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getResourceDependencyChange_Roots() {
- return (EReference)resourceDependencyChangeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getResourceDependencyChangeLeftTarget() {
- return resourceDependencyChangeLeftTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getResourceDependencyChangeRightTarget() {
- return resourceDependencyChangeRightTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getAttributeChange() {
- return attributeChangeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getAttributeChange_Attribute() {
- return (EReference)attributeChangeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getAttributeChange_LeftElement() {
- return (EReference)attributeChangeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getAttributeChange_RightElement() {
- return (EReference)attributeChangeEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getAttributeChangeLeftTarget() {
- return attributeChangeLeftTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAttributeChangeLeftTarget_LeftTarget() {
- return (EAttribute)attributeChangeLeftTargetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getAttributeChangeRightTarget() {
- return attributeChangeRightTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAttributeChangeRightTarget_RightTarget() {
- return (EAttribute)attributeChangeRightTargetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @since 1.3
- */
- public EClass getAttributeOrderChange() {
- return attributeOrderChangeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getConflictingDiffElement() {
- return conflictingDiffElementEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getConflictingDiffElement_LeftParent() {
- return (EReference)conflictingDiffElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getConflictingDiffElement_OriginElement() {
- return (EReference)conflictingDiffElementEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getConflictingDiffElement_RightParent() {
- return (EReference)conflictingDiffElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getDiffElement() {
- return diffElementEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDiffElement_Conflicting() {
- return (EAttribute)diffElementEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffElement_IsHiddenBy() {
- return (EReference)diffElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDiffElement_Kind() {
- return (EAttribute)diffElementEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDiffElement_Remote() {
- return (EAttribute)diffElementEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @since 1.3
- */
- public EReference getDiffElement_Requires() {
- return (EReference)diffElementEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @since 1.3
- */
- public EReference getDiffElement_RequiredBy() {
- return (EReference)diffElementEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffElement_SubDiffElements() {
- return (EReference)diffElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EEnum getDifferenceKind() {
- return differenceKindEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffFactory getDiffFactory() {
- return (DiffFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getDiffGroup() {
- return diffGroupEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffGroup_RightParent() {
- return (EReference)diffGroupEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDiffGroup_Subchanges() {
- return (EAttribute)diffGroupEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getComparisonSnapshot() {
- return comparisonSnapshotEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getComparisonSnapshot_Date() {
- return (EAttribute)comparisonSnapshotEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getComparisonResourceSnapshot() {
- return comparisonResourceSnapshotEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getComparisonResourceSnapshot_Diff() {
- return (EReference)comparisonResourceSnapshotEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getComparisonResourceSnapshot_Match() {
- return (EReference)comparisonResourceSnapshotEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getComparisonResourceSetSnapshot() {
- return comparisonResourceSetSnapshotEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getComparisonResourceSetSnapshot_DiffResourceSet() {
- return (EReference)comparisonResourceSetSnapshotEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getComparisonResourceSetSnapshot_MatchResourceSet() {
- return (EReference)comparisonResourceSetSnapshotEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getDiffModel() {
- return diffModelEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffModel_OwnedElements() {
- return (EReference)diffModelEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffModel_LeftRoots() {
- return (EReference)diffModelEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffModel_RightRoots() {
- return (EReference)diffModelEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffModel_AncestorRoots() {
- return (EReference)diffModelEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getDiffResourceSet() {
- return diffResourceSetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffResourceSet_DiffModels() {
- return (EReference)diffResourceSetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getDiffResourceSet_ResourceDiffs() {
- return (EReference)diffResourceSetEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EDataType getIMerger() {
- return iMergerEDataType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getModelElementChange() {
- return modelElementChangeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getModelElementChangeLeftTarget() {
- return modelElementChangeLeftTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getModelElementChangeLeftTarget_LeftElement() {
- return (EReference)modelElementChangeLeftTargetEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getModelElementChangeLeftTarget_RightParent() {
- return (EReference)modelElementChangeLeftTargetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getModelElementChangeRightTarget() {
- return modelElementChangeRightTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getModelElementChangeRightTarget_LeftParent() {
- return (EReference)modelElementChangeRightTargetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getModelElementChangeRightTarget_RightElement() {
- return (EReference)modelElementChangeRightTargetEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getMoveModelElement() {
- return moveModelElementEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getMoveModelElement_LeftTarget() {
- return (EReference)moveModelElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getMoveModelElement_RightTarget() {
- return (EReference)moveModelElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getUpdateContainmentFeature() {
- return updateContainmentFeatureEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getReferenceChange() {
- return referenceChangeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChange_LeftElement() {
- return (EReference)referenceChangeEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChange_Reference() {
- return (EReference)referenceChangeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChange_RightElement() {
- return (EReference)referenceChangeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getReferenceChangeLeftTarget() {
- return referenceChangeLeftTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChangeLeftTarget_LeftTarget() {
- return (EReference)referenceChangeLeftTargetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChangeLeftTarget_RightTarget() {
- return (EReference)referenceChangeLeftTargetEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getReferenceChangeRightTarget() {
- return referenceChangeRightTargetEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChangeRightTarget_RightTarget() {
- return (EReference)referenceChangeRightTargetEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceChangeRightTarget_LeftTarget() {
- return (EReference)referenceChangeRightTargetEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getUpdateAttribute() {
- return updateAttributeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getUpdateModelElement() {
- return updateModelElementEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getUpdateModelElement_LeftElement() {
- return (EReference)updateModelElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getUpdateModelElement_RightElement() {
- return (EReference)updateModelElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getUpdateReference() {
- return updateReferenceEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getUpdateReference_LeftTarget() {
- return (EReference)updateReferenceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getUpdateReference_RightTarget() {
- return (EReference)updateReferenceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EClass getReferenceOrderChange() {
- return referenceOrderChangeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceOrderChange_LeftTarget() {
- return (EReference)referenceOrderChangeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getReferenceOrderChange_RightTarget() {
- return (EReference)referenceOrderChangeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized)
- return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE
- .getEPackage(EcorePackage.eNS_URI);
- MatchPackage theMatchPackage = (MatchPackage)EPackage.Registry.INSTANCE
- .getEPackage(MatchPackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- conflictingDiffElementEClass.getESuperTypes().add(this.getDiffElement());
- diffGroupEClass.getESuperTypes().add(this.getDiffElement());
- comparisonResourceSnapshotEClass.getESuperTypes().add(this.getComparisonSnapshot());
- comparisonResourceSetSnapshotEClass.getESuperTypes().add(this.getComparisonSnapshot());
- modelElementChangeEClass.getESuperTypes().add(this.getDiffElement());
- modelElementChangeLeftTargetEClass.getESuperTypes().add(this.getModelElementChange());
- modelElementChangeRightTargetEClass.getESuperTypes().add(this.getModelElementChange());
- updateModelElementEClass.getESuperTypes().add(this.getModelElementChange());
- moveModelElementEClass.getESuperTypes().add(this.getUpdateModelElement());
- updateContainmentFeatureEClass.getESuperTypes().add(this.getMoveModelElement());
- attributeChangeEClass.getESuperTypes().add(this.getDiffElement());
- attributeChangeLeftTargetEClass.getESuperTypes().add(this.getAttributeChange());
- attributeChangeRightTargetEClass.getESuperTypes().add(this.getAttributeChange());
- attributeOrderChangeEClass.getESuperTypes().add(this.getAttributeChange());
- updateAttributeEClass.getESuperTypes().add(this.getAttributeChange());
- referenceChangeEClass.getESuperTypes().add(this.getDiffElement());
- referenceChangeLeftTargetEClass.getESuperTypes().add(this.getReferenceChange());
- referenceChangeRightTargetEClass.getESuperTypes().add(this.getReferenceChange());
- updateReferenceEClass.getESuperTypes().add(this.getReferenceChange());
- referenceOrderChangeEClass.getESuperTypes().add(this.getReferenceChange());
- resourceDiffEClass.getESuperTypes().add(this.getDiffElement());
- resourceDependencyChangeEClass.getESuperTypes().add(this.getResourceDiff());
- resourceDependencyChangeLeftTargetEClass.getESuperTypes().add(this.getResourceDependencyChange());
- resourceDependencyChangeRightTargetEClass.getESuperTypes().add(this.getResourceDependencyChange());
-
- // Initialize classes and features; add operations and parameters
- initEClass(diffModelEClass, DiffModel.class,
- "DiffModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getDiffModel_OwnedElements(),
- this.getDiffElement(),
- null,
- "ownedElements", null, 0, -1, DiffModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffModel_LeftRoots(),
- theEcorePackage.getEObject(),
- null,
- "leftRoots", null, 0, -1, DiffModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffModel_RightRoots(),
- theEcorePackage.getEObject(),
- null,
- "rightRoots", null, 0, -1, DiffModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffModel_AncestorRoots(),
- theEcorePackage.getEObject(),
- null,
- "ancestorRoots", null, 0, -1, DiffModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- addEOperation(diffModelEClass, theEcorePackage.getEInt(),
- "getSubchanges", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- EOperation op = addEOperation(diffModelEClass, this.getDiffElement(),
- "getDifferences", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- addEParameter(op, theEcorePackage.getEObject(), "modelElement", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- addEOperation(diffModelEClass, this.getDiffElement(), "getDifferences", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(diffResourceSetEClass, DiffResourceSet.class,
- "DiffResourceSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getDiffResourceSet_DiffModels(),
- this.getDiffModel(),
- null,
- "diffModels", null, 0, -1, DiffResourceSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffResourceSet_ResourceDiffs(),
- this.getResourceDiff(),
- null,
- "resourceDiffs", null, 0, -1, DiffResourceSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- addEOperation(diffResourceSetEClass, theEcorePackage.getEInt(),
- "getSubchanges", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(diffElementEClass, DiffElement.class,
- "DiffElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getDiffElement_SubDiffElements(),
- this.getDiffElement(),
- null,
- "subDiffElements", null, 0, -1, DiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffElement_IsHiddenBy(),
- this.getAbstractDiffExtension(),
- this.getAbstractDiffExtension_HideElements(),
- "isHiddenBy", null, 0, -1, DiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getDiffElement_Conflicting(),
- theEcorePackage.getEBoolean(),
- "conflicting", null, 0, 1, DiffElement.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getDiffElement_Kind(),
- this.getDifferenceKind(),
- "kind", "", 0, 1, DiffElement.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
- initEAttribute(
- getDiffElement_Remote(),
- ecorePackage.getEBoolean(),
- "remote", null, 0, 1, DiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffElement_Requires(),
- this.getDiffElement(),
- this.getDiffElement_RequiredBy(),
- "requires", null, 0, -1, DiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getDiffElement_RequiredBy(),
- this.getDiffElement(),
- this.getDiffElement_Requires(),
- "requiredBy", null, 0, -1, DiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(conflictingDiffElementEClass, ConflictingDiffElement.class,
- "ConflictingDiffElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getConflictingDiffElement_LeftParent(),
- ecorePackage.getEObject(),
- null,
- "leftParent", null, 0, 1, ConflictingDiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getConflictingDiffElement_RightParent(),
- ecorePackage.getEObject(),
- null,
- "rightParent", null, 0, 1, ConflictingDiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getConflictingDiffElement_OriginElement(),
- theEcorePackage.getEObject(),
- null,
- "originElement", null, 0, 1, ConflictingDiffElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(diffGroupEClass, DiffGroup.class,
- "DiffGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getDiffGroup_RightParent(),
- ecorePackage.getEObject(),
- null,
- "rightParent", null, 0, 1, DiffGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getDiffGroup_Subchanges(),
- ecorePackage.getEInt(),
- "subchanges", null, 0, 1, DiffGroup.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(comparisonSnapshotEClass, ComparisonSnapshot.class,
- "ComparisonSnapshot", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(
- getComparisonSnapshot_Date(),
- ecorePackage.getEDate(),
- "date", null, 0, 1, ComparisonSnapshot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(comparisonResourceSnapshotEClass, ComparisonResourceSnapshot.class,
- "ComparisonResourceSnapshot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getComparisonResourceSnapshot_Diff(),
- this.getDiffModel(),
- null,
- "diff", null, 0, 1, ComparisonResourceSnapshot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getComparisonResourceSnapshot_Match(),
- theMatchPackage.getMatchModel(),
- null,
- "match", null, 0, 1, ComparisonResourceSnapshot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(comparisonResourceSetSnapshotEClass, ComparisonResourceSetSnapshot.class,
- "ComparisonResourceSetSnapshot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getComparisonResourceSetSnapshot_DiffResourceSet(),
- this.getDiffResourceSet(),
- null,
- "diffResourceSet", null, 0, 1, ComparisonResourceSetSnapshot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getComparisonResourceSetSnapshot_MatchResourceSet(),
- theMatchPackage.getMatchResourceSet(),
- null,
- "matchResourceSet", null, 0, 1, ComparisonResourceSetSnapshot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(modelElementChangeEClass, ModelElementChange.class,
- "ModelElementChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(modelElementChangeLeftTargetEClass, ModelElementChangeLeftTarget.class,
- "ModelElementChangeLeftTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getModelElementChangeLeftTarget_RightParent(),
- ecorePackage.getEObject(),
- null,
- "rightParent", null, 0, 1, ModelElementChangeLeftTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getModelElementChangeLeftTarget_LeftElement(),
- ecorePackage.getEObject(),
- null,
- "leftElement", null, 0, 1, ModelElementChangeLeftTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(modelElementChangeRightTargetEClass, ModelElementChangeRightTarget.class,
- "ModelElementChangeRightTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getModelElementChangeRightTarget_LeftParent(),
- ecorePackage.getEObject(),
- null,
- "leftParent", null, 0, 1, ModelElementChangeRightTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getModelElementChangeRightTarget_RightElement(),
- ecorePackage.getEObject(),
- null,
- "rightElement", null, 0, 1, ModelElementChangeRightTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(updateModelElementEClass, UpdateModelElement.class,
- "UpdateModelElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getUpdateModelElement_RightElement(),
- ecorePackage.getEObject(),
- null,
- "rightElement", null, 0, 1, UpdateModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getUpdateModelElement_LeftElement(),
- ecorePackage.getEObject(),
- null,
- "leftElement", null, 0, 1, UpdateModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(moveModelElementEClass, MoveModelElement.class,
- "MoveModelElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getMoveModelElement_LeftTarget(),
- ecorePackage.getEObject(),
- null,
- "leftTarget", null, 0, 1, MoveModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getMoveModelElement_RightTarget(),
- ecorePackage.getEObject(),
- null,
- "rightTarget", null, 0, 1, MoveModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(updateContainmentFeatureEClass, UpdateContainmentFeature.class,
- "UpdateContainmentFeature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(attributeChangeEClass, AttributeChange.class,
- "AttributeChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getAttributeChange_Attribute(),
- theEcorePackage.getEAttribute(),
- null,
- "attribute", null, 0, 1, AttributeChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getAttributeChange_LeftElement(),
- ecorePackage.getEObject(),
- null,
- "leftElement", null, 0, 1, AttributeChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getAttributeChange_RightElement(),
- ecorePackage.getEObject(),
- null,
- "rightElement", null, 0, 1, AttributeChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(attributeChangeLeftTargetEClass, AttributeChangeLeftTarget.class,
- "AttributeChangeLeftTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(
- getAttributeChangeLeftTarget_LeftTarget(),
- theEcorePackage.getEJavaObject(),
- "leftTarget", null, 0, 1, AttributeChangeLeftTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(attributeChangeRightTargetEClass, AttributeChangeRightTarget.class,
- "AttributeChangeRightTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(
- getAttributeChangeRightTarget_RightTarget(),
- theEcorePackage.getEJavaObject(),
- "rightTarget", null, 0, 1, AttributeChangeRightTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(attributeOrderChangeEClass, AttributeOrderChange.class,
- "AttributeOrderChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(updateAttributeEClass, UpdateAttribute.class,
- "UpdateAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(referenceChangeEClass, ReferenceChange.class,
- "ReferenceChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getReferenceChange_Reference(),
- theEcorePackage.getEReference(),
- null,
- "reference", null, 0, 1, ReferenceChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getReferenceChange_RightElement(),
- ecorePackage.getEObject(),
- null,
- "rightElement", null, 0, 1, ReferenceChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getReferenceChange_LeftElement(),
- ecorePackage.getEObject(),
- null,
- "leftElement", null, 0, 1, ReferenceChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(referenceChangeLeftTargetEClass, ReferenceChangeLeftTarget.class,
- "ReferenceChangeLeftTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getReferenceChangeLeftTarget_LeftTarget(),
- ecorePackage.getEObject(),
- null,
- "leftTarget", null, 0, 1, ReferenceChangeLeftTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getReferenceChangeLeftTarget_RightTarget(),
- ecorePackage.getEObject(),
- null,
- "rightTarget", null, 0, 1, ReferenceChangeLeftTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(referenceChangeRightTargetEClass, ReferenceChangeRightTarget.class,
- "ReferenceChangeRightTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getReferenceChangeRightTarget_RightTarget(),
- ecorePackage.getEObject(),
- null,
- "rightTarget", null, 0, 1, ReferenceChangeRightTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getReferenceChangeRightTarget_LeftTarget(),
- ecorePackage.getEObject(),
- null,
- "leftTarget", null, 0, 1, ReferenceChangeRightTarget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(updateReferenceEClass, UpdateReference.class,
- "UpdateReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getUpdateReference_LeftTarget(),
- ecorePackage.getEObject(),
- null,
- "leftTarget", null, 0, 1, UpdateReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getUpdateReference_RightTarget(),
- ecorePackage.getEObject(),
- null,
- "rightTarget", null, 0, 1, UpdateReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(referenceOrderChangeEClass, ReferenceOrderChange.class,
- "ReferenceOrderChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getReferenceOrderChange_LeftTarget(),
- theEcorePackage.getEObject(),
- null,
- "leftTarget", null, 0, -1, ReferenceOrderChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getReferenceOrderChange_RightTarget(),
- theEcorePackage.getEObject(),
- null,
- "rightTarget", null, 0, -1, ReferenceOrderChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(abstractDiffExtensionEClass, AbstractDiffExtension.class,
- "AbstractDiffExtension", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getAbstractDiffExtension_HideElements(),
- this.getDiffElement(),
- this.getDiffElement_IsHiddenBy(),
- "hideElements", null, 0, -1, AbstractDiffExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getAbstractDiffExtension_IsCollapsed(),
- ecorePackage.getEBoolean(),
- "isCollapsed", "false", 0, 1, AbstractDiffExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
-
- op = addEOperation(abstractDiffExtensionEClass, null, "visit", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- addEParameter(op, this.getDiffModel(), "diffModel", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- addEOperation(abstractDiffExtensionEClass, theEcorePackage.getEString(),
- "getText", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- addEOperation(abstractDiffExtensionEClass, theEcorePackage.getEJavaObject(),
- "getImage", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- addEOperation(abstractDiffExtensionEClass, this.getIMerger(),
- "provideMerger", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(resourceDiffEClass, ResourceDiff.class,
- "ResourceDiff", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(resourceDependencyChangeEClass, ResourceDependencyChange.class,
- "ResourceDependencyChange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getResourceDependencyChange_Roots(),
- theEcorePackage.getEObject(),
- null,
- "roots", null, 0, -1, ResourceDependencyChange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(
- resourceDependencyChangeLeftTargetEClass,
- ResourceDependencyChangeLeftTarget.class,
- "ResourceDependencyChangeLeftTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(
- resourceDependencyChangeRightTargetEClass,
- ResourceDependencyChangeRightTarget.class,
- "ResourceDependencyChangeRightTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- // Initialize enums and add enum literals
- initEEnum(differenceKindEEnum, DifferenceKind.class, "DifferenceKind"); //$NON-NLS-1$
- addEEnumLiteral(differenceKindEEnum, DifferenceKind.ADDITION);
- addEEnumLiteral(differenceKindEEnum, DifferenceKind.DELETION);
- addEEnumLiteral(differenceKindEEnum, DifferenceKind.CHANGE);
- addEEnumLiteral(differenceKindEEnum, DifferenceKind.MOVE);
-
- // Initialize data types
- initEDataType(iMergerEDataType, IMerger.class,
- "IMerger", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} // DiffPackageImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffResourceSetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffResourceSetImpl.java
deleted file mode 100644
index b1d661a03..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/DiffResourceSetImpl.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDiff;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Resource Set</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffResourceSetImpl#getDiffModels <em>Diff Models</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.DiffResourceSetImpl#getResourceDiffs <em>Resource Diffs</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DiffResourceSetImpl extends EObjectImpl implements DiffResourceSet {
- /**
- * The cached value of the '{@link #getDiffModels() <em>Diff Models</em>}' containment reference list.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #getDiffModels()
- * @generated
- * @ordered
- */
- protected EList<DiffModel> diffModels;
-
- /**
- * The cached value of the '{@link #getResourceDiffs() <em>Resource Diffs</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getResourceDiffs()
- * @generated
- * @ordered
- */
- protected EList<ResourceDiff> resourceDiffs;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected DiffResourceSetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.DIFF_RESOURCE_SET;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EList<DiffModel> getDiffModels() {
- if (diffModels == null) {
- diffModels = new EObjectContainmentEList<DiffModel>(DiffModel.class, this,
- DiffPackage.DIFF_RESOURCE_SET__DIFF_MODELS);
- }
- return diffModels;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<ResourceDiff> getResourceDiffs() {
- if (resourceDiffs == null) {
- resourceDiffs = new EObjectContainmentEList<ResourceDiff>(ResourceDiff.class, this,
- DiffPackage.DIFF_RESOURCE_SET__RESOURCE_DIFFS);
- }
- return resourceDiffs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public int getSubchanges() {
- int totalSubchanges = 0;
- for (DiffModel subDiff : getDiffModels()) {
- totalSubchanges += subDiff.getSubchanges();
- }
- return totalSubchanges;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiffPackage.DIFF_RESOURCE_SET__DIFF_MODELS:
- return ((InternalEList<?>)getDiffModels()).basicRemove(otherEnd, msgs);
- case DiffPackage.DIFF_RESOURCE_SET__RESOURCE_DIFFS:
- return ((InternalEList<?>)getResourceDiffs()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.DIFF_RESOURCE_SET__DIFF_MODELS:
- return getDiffModels();
- case DiffPackage.DIFF_RESOURCE_SET__RESOURCE_DIFFS:
- return getResourceDiffs();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.DIFF_RESOURCE_SET__DIFF_MODELS:
- getDiffModels().clear();
- getDiffModels().addAll((Collection<? extends DiffModel>)newValue);
- return;
- case DiffPackage.DIFF_RESOURCE_SET__RESOURCE_DIFFS:
- getResourceDiffs().clear();
- getResourceDiffs().addAll((Collection<? extends ResourceDiff>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_RESOURCE_SET__DIFF_MODELS:
- getDiffModels().clear();
- return;
- case DiffPackage.DIFF_RESOURCE_SET__RESOURCE_DIFFS:
- getResourceDiffs().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.DIFF_RESOURCE_SET__DIFF_MODELS:
- return diffModels != null && !diffModels.isEmpty();
- case DiffPackage.DIFF_RESOURCE_SET__RESOURCE_DIFFS:
- return resourceDiffs != null && !resourceDiffs.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} // DiffResourceSetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeImpl.java
deleted file mode 100644
index 1a540bb45..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Model Element Change</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-
-public class ModelElementChangeImpl extends DiffElementImpl implements ModelElementChange {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ModelElementChangeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.MODEL_ELEMENT_CHANGE;
- }
-
-} // ModelElementChangeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeLeftTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeLeftTargetImpl.java
deleted file mode 100644
index a3f5c7bb6..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeLeftTargetImpl.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Model Element Change Left Target</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeLeftTargetImpl#getRightParent <em>Right Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeLeftTargetImpl#getLeftElement <em>Left Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class ModelElementChangeLeftTargetImpl extends ModelElementChangeImpl implements ModelElementChangeLeftTarget {
- /**
- * The cached value of the '{@link #getRightParent() <em>Right Parent</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightParent()
- * @generated
- * @ordered
- */
- protected EObject rightParent;
-
- /**
- * The cached value of the '{@link #getLeftElement() <em>Left Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getLeftElement()
- * @generated
- * @ordered
- */
- protected EObject leftElement;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ModelElementChangeLeftTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftElement() {
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightParent() {
- return rightParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT:
- if (resolve)
- return getRightParent();
- return basicGetRightParent();
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT:
- if (resolve)
- return getLeftElement();
- return basicGetLeftElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT:
- return rightParent != null;
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT:
- return leftElement != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT:
- setRightParent((EObject)newValue);
- return;
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT:
- setLeftElement((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT:
- setRightParent((EObject)null);
- return;
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT:
- setLeftElement((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftElement() {
- if (leftElement != null && leftElement.eIsProxy()) {
- InternalEObject oldLeftElement = (InternalEObject)leftElement;
- leftElement = eResolveProxy(oldLeftElement);
- if (leftElement != oldLeftElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT, oldLeftElement,
- leftElement));
- }
- }
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightParent() {
- if (rightParent != null && rightParent.eIsProxy()) {
- InternalEObject oldRightParent = (InternalEObject)rightParent;
- rightParent = eResolveProxy(oldRightParent);
- if (rightParent != oldRightParent) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT, oldRightParent,
- rightParent));
- }
- }
- return rightParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftElement(EObject newLeftElement) {
- EObject oldLeftElement = leftElement;
- leftElement = newLeftElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightParent(EObject newRightParent) {
- EObject oldRightParent = rightParent;
- rightParent = newRightParent;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET__RIGHT_PARENT, oldRightParent, rightParent));
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- if (isRemote())
- return EMFCompareDiffMessages.getString("RemoteRemoveModelElementImpl.ToString", leftElement); //$NON-NLS-1$
- return EMFCompareDiffMessages.getString("AddModelElementImpl.ToString", leftElement); //$NON-NLS-1$
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.MODEL_ELEMENT_CHANGE_LEFT_TARGET;
- }
-
-} // ModelElementChangeLeftTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeRightTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeRightTargetImpl.java
deleted file mode 100644
index 17b8ff013..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ModelElementChangeRightTargetImpl.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Model Element Change Right Target</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeRightTargetImpl#getLeftParent <em>Left Parent</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ModelElementChangeRightTargetImpl#getRightElement <em>Right Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class ModelElementChangeRightTargetImpl extends ModelElementChangeImpl implements ModelElementChangeRightTarget {
- /**
- * The cached value of the '{@link #getLeftParent() <em>Left Parent</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftParent()
- * @generated
- * @ordered
- */
- protected EObject leftParent;
-
- /**
- * The cached value of the '{@link #getRightElement() <em>Right Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightElement()
- * @generated
- * @ordered
- */
- protected EObject rightElement;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ModelElementChangeRightTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftParent() {
- return leftParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightElement() {
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT:
- if (resolve)
- return getLeftParent();
- return basicGetLeftParent();
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT:
- if (resolve)
- return getRightElement();
- return basicGetRightElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT:
- return leftParent != null;
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT:
- return rightElement != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT:
- setLeftParent((EObject)newValue);
- return;
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT:
- setRightElement((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT:
- setLeftParent((EObject)null);
- return;
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT:
- setRightElement((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftParent() {
- if (leftParent != null && leftParent.eIsProxy()) {
- InternalEObject oldLeftParent = (InternalEObject)leftParent;
- leftParent = eResolveProxy(oldLeftParent);
- if (leftParent != oldLeftParent) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT, oldLeftParent,
- leftParent));
- }
- }
- return leftParent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightElement() {
- if (rightElement != null && rightElement.eIsProxy()) {
- InternalEObject oldRightElement = (InternalEObject)rightElement;
- rightElement = eResolveProxy(oldRightElement);
- if (rightElement != oldRightElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT, oldRightElement,
- rightElement));
- }
- }
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftParent(EObject newLeftParent) {
- EObject oldLeftParent = leftParent;
- leftParent = newLeftParent;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__LEFT_PARENT, oldLeftParent, leftParent));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightElement(EObject newRightElement) {
- EObject oldRightElement = rightElement;
- rightElement = newRightElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET__RIGHT_ELEMENT, oldRightElement,
- rightElement));
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- if (isRemote())
- return EMFCompareDiffMessages.getString("RemoteAddModelElementImpl.ToString", rightElement); //$NON-NLS-1$
- return EMFCompareDiffMessages.getString("RemoveModelElementImpl.ToString", rightElement); //$NON-NLS-1$
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.MODEL_ELEMENT_CHANGE_RIGHT_TARGET;
- }
-
-} // ModelElementChangeRightTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/MoveModelElementImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/MoveModelElementImpl.java
deleted file mode 100644
index 46a41b99c..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/MoveModelElementImpl.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Move Model Element</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.MoveModelElementImpl#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.MoveModelElementImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class MoveModelElementImpl extends UpdateModelElementImpl implements MoveModelElement {
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EObject leftTarget;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EObject rightTarget;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected MoveModelElementImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET:
- if (resolve)
- return getLeftTarget();
- return basicGetLeftTarget();
- case DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET:
- if (resolve)
- return getRightTarget();
- return basicGetRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET:
- return leftTarget != null;
- case DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET:
- return rightTarget != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET:
- setLeftTarget((EObject)newValue);
- return;
- case DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET:
- setRightTarget((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET:
- setLeftTarget((EObject)null);
- return;
- case DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET:
- setRightTarget((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftTarget() {
- if (leftTarget != null && leftTarget.eIsProxy()) {
- InternalEObject oldLeftTarget = (InternalEObject)leftTarget;
- leftTarget = eResolveProxy(oldLeftTarget);
- if (leftTarget != oldLeftTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightTarget() {
- if (rightTarget != null && rightTarget.eIsProxy()) {
- InternalEObject oldRightTarget = (InternalEObject)rightTarget;
- rightTarget = eResolveProxy(oldRightTarget);
- if (rightTarget != oldRightTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(EObject newLeftTarget) {
- EObject oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.MOVE_MODEL_ELEMENT__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(EObject newRightTarget) {
- EObject oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.MOVE_MODEL_ELEMENT__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString(
- "RemoteMoveModelElementImpl.ToString", //$NON-NLS-1$
- NameSimilarity.findName(leftElement), leftElement.eContainer(),
- rightElement.eContainer());
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoteMoveModelElementImpl.ToString", //$NON-NLS-1$
- leftElement.eClass().getName(), leftElement.eContainer(), rightElement.eContainer());
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString("MoveModelElementImpl.ToString", NameSimilarity //$NON-NLS-1$
- .findName(leftElement), rightElement.eContainer(), leftElement.eContainer());
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("MoveModelElementImpl.ToString", leftElement //$NON-NLS-1$
- .eClass().getName(), rightElement.eContainer(), leftElement.eContainer());
- }
- }
- return toString;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.MOVE_MODEL_ELEMENT;
- }
-} // MoveModelElementImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeImpl.java
deleted file mode 100644
index c6b868f2a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeImpl.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Reference Change</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl#getReference <em>Reference</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl#getRightElement <em>Right Element</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeImpl#getLeftElement <em>Left Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class ReferenceChangeImpl extends DiffElementImpl implements ReferenceChange {
- /**
- * The cached value of the '{@link #getReference() <em>Reference</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getReference()
- * @generated
- * @ordered
- */
- protected EReference reference;
-
- /**
- * The cached value of the '{@link #getRightElement() <em>Right Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightElement()
- * @generated
- * @ordered
- */
- protected EObject rightElement;
-
- /**
- * The cached value of the '{@link #getLeftElement() <em>Left Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getLeftElement()
- * @generated
- * @ordered
- */
- protected EObject leftElement;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ReferenceChangeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftElement() {
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference basicGetReference() {
- return reference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightElement() {
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE__REFERENCE:
- if (resolve)
- return getReference();
- return basicGetReference();
- case DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT:
- if (resolve)
- return getRightElement();
- return basicGetRightElement();
- case DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT:
- if (resolve)
- return getLeftElement();
- return basicGetLeftElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE__REFERENCE:
- return reference != null;
- case DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT:
- return rightElement != null;
- case DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT:
- return leftElement != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE__REFERENCE:
- setReference((EReference)newValue);
- return;
- case DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT:
- setRightElement((EObject)newValue);
- return;
- case DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT:
- setLeftElement((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE__REFERENCE:
- setReference((EReference)null);
- return;
- case DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT:
- setRightElement((EObject)null);
- return;
- case DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT:
- setLeftElement((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftElement() {
- if (leftElement != null && leftElement.eIsProxy()) {
- InternalEObject oldLeftElement = (InternalEObject)leftElement;
- leftElement = eResolveProxy(oldLeftElement);
- if (leftElement != oldLeftElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
- }
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EReference getReference() {
- if (reference != null && reference.eIsProxy()) {
- InternalEObject oldReference = (InternalEObject)reference;
- reference = (EReference)eResolveProxy(oldReference);
- if (reference != oldReference) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE__REFERENCE, oldReference, reference));
- }
- }
- return reference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightElement() {
- if (rightElement != null && rightElement.eIsProxy()) {
- InternalEObject oldRightElement = (InternalEObject)rightElement;
- rightElement = eResolveProxy(oldRightElement);
- if (rightElement != oldRightElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
- }
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftElement(EObject newLeftElement) {
- EObject oldLeftElement = leftElement;
- leftElement = newLeftElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.REFERENCE_CHANGE__LEFT_ELEMENT,
- oldLeftElement, leftElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setReference(EReference newReference) {
- EReference oldReference = reference;
- reference = newReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.REFERENCE_CHANGE__REFERENCE,
- oldReference, reference));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightElement(EObject newRightElement) {
- EObject oldRightElement = rightElement;
- rightElement = newRightElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.REFERENCE_CHANGE__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.REFERENCE_CHANGE;
- }
-
-} // ReferenceChangeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeLeftTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeLeftTargetImpl.java
deleted file mode 100644
index 08d09a652..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeLeftTargetImpl.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Reference Change Left Target</b></em>
- * '. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeLeftTargetImpl#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeLeftTargetImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ReferenceChangeLeftTargetImpl extends ReferenceChangeImpl implements ReferenceChangeLeftTarget {
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EObject leftTarget;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EObject rightTarget;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ReferenceChangeLeftTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- if (resolve)
- return getLeftTarget();
- return basicGetLeftTarget();
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET:
- if (resolve)
- return getRightTarget();
- return basicGetRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- return leftTarget != null;
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET:
- return rightTarget != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- setLeftTarget((EObject)newValue);
- return;
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET:
- setRightTarget((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET:
- setLeftTarget((EObject)null);
- return;
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET:
- setRightTarget((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.REFERENCE_CHANGE_LEFT_TARGET;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftTarget() {
- if (leftTarget != null && leftTarget.eIsProxy()) {
- InternalEObject oldLeftTarget = (InternalEObject)leftTarget;
- leftTarget = eResolveProxy(oldLeftTarget);
- if (leftTarget != oldLeftTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(EObject newLeftTarget) {
- EObject oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightTarget() {
- if (rightTarget != null && rightTarget.eIsProxy()) {
- InternalEObject oldRightTarget = (InternalEObject)rightTarget;
- rightTarget = eResolveProxy(oldRightTarget);
- if (rightTarget != oldRightTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET, oldRightTarget,
- rightTarget));
- }
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(EObject newRightTarget) {
- EObject oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.REFERENCE_CHANGE_LEFT_TARGET__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString(
- "RemoteRemoveReferenceValueImpl.ToString", //$NON-NLS-1$
- NameSimilarity.findName(rightTarget), reference.getName(),
- NameSimilarity.findName(leftElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoteRemoveReferenceValueImpl.ToString", //$NON-NLS-1$
- rightTarget.eClass().getName(), reference.getName(), leftElement.eClass().getName());
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString("AddReferenceValueImpl.ToString", NameSimilarity //$NON-NLS-1$
- .findName(rightTarget), reference.getName(), NameSimilarity.findName(leftElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("AddReferenceValueImpl.ToString", rightTarget //$NON-NLS-1$
- .eClass().getName(), reference.getName(), leftElement.eClass().getName());
- }
- }
- return toString;
- }
-
-} // ReferenceChangeLeftTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeRightTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeRightTargetImpl.java
deleted file mode 100644
index 84056d00b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceChangeRightTargetImpl.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Reference Change Right Target</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeRightTargetImpl#getRightTarget <em>Right Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceChangeRightTargetImpl#getLeftTarget <em>Left Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ReferenceChangeRightTargetImpl extends ReferenceChangeImpl implements ReferenceChangeRightTarget {
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EObject rightTarget;
-
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EObject leftTarget;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ReferenceChangeRightTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- if (resolve)
- return getRightTarget();
- return basicGetRightTarget();
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET:
- if (resolve)
- return getLeftTarget();
- return basicGetLeftTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- return rightTarget != null;
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET:
- return leftTarget != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- setRightTarget((EObject)newValue);
- return;
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET:
- setLeftTarget((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET:
- setRightTarget((EObject)null);
- return;
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET:
- setLeftTarget((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.REFERENCE_CHANGE_RIGHT_TARGET;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightTarget() {
- if (rightTarget != null && rightTarget.eIsProxy()) {
- InternalEObject oldRightTarget = (InternalEObject)rightTarget;
- rightTarget = eResolveProxy(oldRightTarget);
- if (rightTarget != oldRightTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET, oldRightTarget,
- rightTarget));
- }
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(EObject newRightTarget) {
- EObject oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftTarget() {
- if (leftTarget != null && leftTarget.eIsProxy()) {
- InternalEObject oldLeftTarget = (InternalEObject)leftTarget;
- leftTarget = eResolveProxy(oldLeftTarget);
- if (leftTarget != oldLeftTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(EObject newLeftTarget) {
- EObject oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString(
- "RemoteAddReferenceValueImpl.ToString", //$NON-NLS-1$
- NameSimilarity.findName(leftTarget), reference.getName(),
- NameSimilarity.findName(rightElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoteAddReferenceValueImpl.ToString", //$NON-NLS-1$
- leftTarget.eClass().getName(), reference.getName(), rightElement.eClass().getName());
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString(
- "RemoveReferenceValueImpl.ToString", //$NON-NLS-1$
- NameSimilarity.findName(leftTarget), reference.getName(),
- NameSimilarity.findName(rightElement));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("RemoveReferenceValueImpl.ToString", leftTarget //$NON-NLS-1$
- .eClass().getName(), reference.getName(), rightElement.eClass().getName());
- }
- }
- return toString;
- }
-
-} // ReferenceChangeRightTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceOrderChangeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceOrderChangeImpl.java
deleted file mode 100644
index bf0249662..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ReferenceOrderChangeImpl.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-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.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Reference Order Change</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceOrderChangeImpl#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ReferenceOrderChangeImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ReferenceOrderChangeImpl extends ReferenceChangeImpl implements ReferenceOrderChange {
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EList<EObject> leftTarget;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EList<EObject> rightTarget;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ReferenceOrderChangeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.REFERENCE_ORDER_CHANGE;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<EObject> getLeftTarget() {
- if (leftTarget == null) {
- leftTarget = new EObjectResolvingEList<EObject>(EObject.class, this,
- DiffPackage.REFERENCE_ORDER_CHANGE__LEFT_TARGET);
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<EObject> getRightTarget() {
- if (rightTarget == null) {
- rightTarget = new EObjectResolvingEList<EObject>(EObject.class, this,
- DiffPackage.REFERENCE_ORDER_CHANGE__RIGHT_TARGET);
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.REFERENCE_ORDER_CHANGE__LEFT_TARGET:
- return getLeftTarget();
- case DiffPackage.REFERENCE_ORDER_CHANGE__RIGHT_TARGET:
- return getRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.REFERENCE_ORDER_CHANGE__LEFT_TARGET:
- getLeftTarget().clear();
- getLeftTarget().addAll((Collection<? extends EObject>)newValue);
- return;
- case DiffPackage.REFERENCE_ORDER_CHANGE__RIGHT_TARGET:
- getRightTarget().clear();
- getRightTarget().addAll((Collection<? extends EObject>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_ORDER_CHANGE__LEFT_TARGET:
- getLeftTarget().clear();
- return;
- case DiffPackage.REFERENCE_ORDER_CHANGE__RIGHT_TARGET:
- getRightTarget().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.REFERENCE_ORDER_CHANGE__LEFT_TARGET:
- return leftTarget != null && !leftTarget.isEmpty();
- case DiffPackage.REFERENCE_ORDER_CHANGE__RIGHT_TARGET:
- return rightTarget != null && !rightTarget.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- return EMFCompareDiffMessages.getString("ReferenceOrderChange.ToString", getReference().getName()); //$NON-NLS-1$
- }
-} // ReferenceOrderChangeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeImpl.java
deleted file mode 100644
index 8fe142c2a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-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.ResourceDependencyChange;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Resource Dependency Change</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.ResourceDependencyChangeImpl#getRoots <em>Roots</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ResourceDependencyChangeImpl extends ResourceDiffImpl implements ResourceDependencyChange {
- /**
- * The cached value of the '{@link #getRoots() <em>Roots</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRoots()
- * @generated
- * @ordered
- */
- protected EList<EObject> roots;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ResourceDependencyChangeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.RESOURCE_DEPENDENCY_CHANGE;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EList<EObject> getRoots() {
- if (roots == null) {
- roots = new EObjectResolvingEList<EObject>(EObject.class, this,
- DiffPackage.RESOURCE_DEPENDENCY_CHANGE__ROOTS);
- }
- return roots;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE__ROOTS:
- return getRoots();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE__ROOTS:
- getRoots().clear();
- getRoots().addAll((Collection<? extends EObject>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE__ROOTS:
- getRoots().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE__ROOTS:
- return roots != null && !roots.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} // ResourceDependencyChangeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeLeftTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeLeftTargetImpl.java
deleted file mode 100644
index 2fc4d4e41..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeLeftTargetImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Resource Dependency Change Left Target</b></em>'. <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class ResourceDependencyChangeLeftTargetImpl extends ResourceDependencyChangeImpl implements ResourceDependencyChangeLeftTarget {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ResourceDependencyChangeLeftTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET;
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- final String resourceName = getRoots().get(0).eResource().getURI().lastSegment();
- if (isRemote())
- return EMFCompareDiffMessages.getString("RemoteRemoveResourceDependency.ToString", resourceName); //$NON-NLS-1$
- return EMFCompareDiffMessages.getString("AddResourceDependency.ToString", resourceName); //$NON-NLS-1$
- }
-
-} // ResourceDependencyChangeLeftTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeRightTargetImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeRightTargetImpl.java
deleted file mode 100644
index 459bbe1cf..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDependencyChangeRightTargetImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '
- * <em><b>Resource Dependency Change Right Target</b></em>'. <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class ResourceDependencyChangeRightTargetImpl extends ResourceDependencyChangeImpl implements ResourceDependencyChangeRightTarget {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ResourceDependencyChangeRightTargetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET;
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- final String resourceName = getRoots().get(0).eResource().getURI().lastSegment();
- if (isRemote())
- return EMFCompareDiffMessages.getString("RemoteAddResourceDependency.ToString", resourceName); //$NON-NLS-1$
- return EMFCompareDiffMessages.getString("RemoveResourceDependency.ToString", resourceName); //$NON-NLS-1$
- }
-
-} // ResourceDependencyChangeRightTargetImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDiffImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDiffImpl.java
deleted file mode 100644
index 0a33a2a60..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/ResourceDiffImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDiff;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Resource Diff</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class ResourceDiffImpl extends DiffElementImpl implements ResourceDiff {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected ResourceDiffImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.RESOURCE_DIFF;
- }
-
-} // ResourceDiffImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateAttributeImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateAttributeImpl.java
deleted file mode 100644
index ea5605b50..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateAttributeImpl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Update Attribute</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-
-public class UpdateAttributeImpl extends AttributeChangeImpl implements UpdateAttribute {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected UpdateAttributeImpl() {
- super();
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString(
- "RemoteUpdateAttributeImpl.ToString", //$NON-NLS-1$
- NameSimilarity.findName(attribute), NameSimilarity.findName(leftElement),
- leftElement.eGet(attribute), rightElement.eGet(attribute));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString(
- "RemoteUpdateAttributeImpl.ToString", //$NON-NLS-1$
- attribute.eClass().getName(), leftElement.eClass().getName(),
- leftElement.eGet(attribute), rightElement.eGet(attribute));
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString("UpdateAttributeImpl.ToString", NameSimilarity //$NON-NLS-1$
- .findName(attribute), NameSimilarity.findName(leftElement),
- rightElement.eGet(attribute), leftElement.eGet(attribute));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString("UpdateAttributeImpl.ToString", attribute //$NON-NLS-1$
- .eClass().getName(), leftElement.eClass().getName(), rightElement.eGet(attribute),
- leftElement.eGet(attribute));
- }
- }
- return toString;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.UPDATE_ATTRIBUTE;
- }
-} // UpdateAttributeImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateContainmentFeatureImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateContainmentFeatureImpl.java
deleted file mode 100644
index aeef99e7b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateContainmentFeatureImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Update Containment Feature</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class UpdateContainmentFeatureImpl extends MoveModelElementImpl implements UpdateContainmentFeature {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected UpdateContainmentFeatureImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.UPDATE_CONTAINMENT_FEATURE;
- }
-
-} // UpdateContainmentFeatureImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateModelElementImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateModelElementImpl.java
deleted file mode 100644
index 8d08501e0..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateModelElementImpl.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Update Model Element</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateModelElementImpl#getRightElement <em>Right Element</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateModelElementImpl#getLeftElement <em>Left Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class UpdateModelElementImpl extends ModelElementChangeImpl implements UpdateModelElement {
- /**
- * The cached value of the '{@link #getRightElement() <em>Right Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightElement()
- * @generated
- * @ordered
- */
- protected EObject rightElement;
-
- /**
- * The cached value of the '{@link #getLeftElement() <em>Left Element</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getLeftElement()
- * @generated
- * @ordered
- */
- protected EObject leftElement;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected UpdateModelElementImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftElement() {
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightElement() {
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT:
- if (resolve)
- return getRightElement();
- return basicGetRightElement();
- case DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT:
- if (resolve)
- return getLeftElement();
- return basicGetLeftElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT:
- return rightElement != null;
- case DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT:
- return leftElement != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT:
- setRightElement((EObject)newValue);
- return;
- case DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT:
- setLeftElement((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT:
- setRightElement((EObject)null);
- return;
- case DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT:
- setLeftElement((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftElement() {
- if (leftElement != null && leftElement.eIsProxy()) {
- InternalEObject oldLeftElement = (InternalEObject)leftElement;
- leftElement = eResolveProxy(oldLeftElement);
- if (leftElement != oldLeftElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
- }
- return leftElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightElement() {
- if (rightElement != null && rightElement.eIsProxy()) {
- InternalEObject oldRightElement = (InternalEObject)rightElement;
- rightElement = eResolveProxy(oldRightElement);
- if (rightElement != oldRightElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
- }
- return rightElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftElement(EObject newLeftElement) {
- EObject oldLeftElement = leftElement;
- leftElement = newLeftElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.UPDATE_MODEL_ELEMENT__LEFT_ELEMENT, oldLeftElement, leftElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightElement(EObject newRightElement) {
- EObject oldRightElement = rightElement;
- rightElement = newRightElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET,
- DiffPackage.UPDATE_MODEL_ELEMENT__RIGHT_ELEMENT, oldRightElement, rightElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.UPDATE_MODEL_ELEMENT;
- }
-
-} // UpdateModelElementImpl
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateReferenceImpl.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateReferenceImpl.java
deleted file mode 100644
index bae79701f..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/impl/UpdateReferenceImpl.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.FactoryException;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.match.internal.statistic.NameSimilarity;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Update Reference</b></em>'. <!--
- * end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateReferenceImpl#getLeftTarget <em>Left Target</em>}</li>
- * <li>{@link org.eclipse.emf.compare.diff.metamodel.impl.UpdateReferenceImpl#getRightTarget <em>Right Target</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-
-public class UpdateReferenceImpl extends ReferenceChangeImpl implements UpdateReference {
- /**
- * The cached value of the '{@link #getLeftTarget() <em>Left Target</em>}' reference.
- * <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- * @see #getLeftTarget()
- * @generated
- * @ordered
- */
- protected EObject leftTarget;
-
- /**
- * The cached value of the '{@link #getRightTarget() <em>Right Target</em>}' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getRightTarget()
- * @generated
- * @ordered
- */
- protected EObject rightTarget;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected UpdateReferenceImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return DiffPackage.Literals.UPDATE_REFERENCE;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getLeftTarget() {
- if (leftTarget != null && leftTarget.eIsProxy()) {
- InternalEObject oldLeftTarget = (InternalEObject)leftTarget;
- leftTarget = eResolveProxy(oldLeftTarget);
- if (leftTarget != oldLeftTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.UPDATE_REFERENCE__LEFT_TARGET, oldLeftTarget, leftTarget));
- }
- }
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetLeftTarget() {
- return leftTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setLeftTarget(EObject newLeftTarget) {
- EObject oldLeftTarget = leftTarget;
- leftTarget = newLeftTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.UPDATE_REFERENCE__LEFT_TARGET,
- oldLeftTarget, leftTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject getRightTarget() {
- if (rightTarget != null && rightTarget.eIsProxy()) {
- InternalEObject oldRightTarget = (InternalEObject)rightTarget;
- rightTarget = eResolveProxy(oldRightTarget);
- if (rightTarget != oldRightTarget) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET, oldRightTarget, rightTarget));
- }
- }
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetRightTarget() {
- return rightTarget;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public void setRightTarget(EObject newRightTarget) {
- EObject oldRightTarget = rightTarget;
- rightTarget = newRightTarget;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET,
- oldRightTarget, rightTarget));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiffPackage.UPDATE_REFERENCE__LEFT_TARGET:
- if (resolve)
- return getLeftTarget();
- return basicGetLeftTarget();
- case DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET:
- if (resolve)
- return getRightTarget();
- return basicGetRightTarget();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiffPackage.UPDATE_REFERENCE__LEFT_TARGET:
- setLeftTarget((EObject)newValue);
- return;
- case DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET:
- setRightTarget((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case DiffPackage.UPDATE_REFERENCE__LEFT_TARGET:
- setLeftTarget((EObject)null);
- return;
- case DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET:
- setRightTarget((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiffPackage.UPDATE_REFERENCE__LEFT_TARGET:
- return leftTarget != null;
- case DiffPackage.UPDATE_REFERENCE__RIGHT_TARGET:
- return rightTarget != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- * @see org.eclipse.emf.compare.diff.metamodel.impl.DiffElementImpl#toString()
- */
- @Override
- public String toString() {
- String toString = null;
- if (isRemote()) {
- try {
- toString = EMFCompareDiffMessages.getString(
- "RemoteUpdateReferenceImpl.ToString", //$NON-NLS-1$
- reference.getName(), NameSimilarity.findName(leftElement),
- leftElement.eGet(reference), rightElement.eGet(reference));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString(
- "RemoteUpdateReferenceImpl.ToString", //$NON-NLS-1$
- reference.getName(), leftElement.eClass().getName(), leftElement.eGet(reference),
- rightElement.eGet(reference));
- }
- } else {
- try {
- toString = EMFCompareDiffMessages.getString(
- "UpdateReferenceImpl.ToString", //$NON-NLS-1$
- reference.getName(), NameSimilarity.findName(leftElement),
- rightElement.eGet(reference), leftElement.eGet(reference));
- } catch (final FactoryException e) {
- toString = EMFCompareDiffMessages.getString(
- "UpdateReferenceImpl.ToString", //$NON-NLS-1$
- reference.getName(), leftElement.eClass().getName(), rightElement.eGet(reference),
- leftElement.eGet(reference));
- }
- }
- return toString;
- }
-
-} // UpdateReferenceImpl
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
deleted file mode 100644
index 398fec2cc..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffAdapterFactory.java
+++ /dev/null
@@ -1,690 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.metamodel.util;
-
-import java.util.Iterator;
-
-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.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChange;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDiff;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter
- * <code>createXXX</code> method for each class of the model. <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage
- * @generated
- */
-public class DiffAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected static DiffPackage modelPackage;
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- */
- protected DiffSwitch<Adapter> modelSwitch = new DiffSwitch<Adapter>() {
- @Override
- public Adapter caseDiffModel(DiffModel object) {
- return createDiffModelAdapter();
- }
-
- @Override
- public Adapter caseDiffResourceSet(DiffResourceSet object) {
- return createDiffResourceSetAdapter();
- }
-
- @Override
- public Adapter caseDiffElement(DiffElement object) {
- return createDiffElementAdapter();
- }
-
- @Override
- public Adapter caseConflictingDiffElement(ConflictingDiffElement object) {
- return createConflictingDiffElementAdapter();
- }
-
- @Override
- public Adapter caseDiffGroup(DiffGroup object) {
- return createDiffGroupAdapter();
- }
-
- @Override
- public Adapter caseComparisonSnapshot(ComparisonSnapshot object) {
- return createComparisonSnapshotAdapter();
- }
-
- @Override
- public Adapter caseComparisonResourceSnapshot(ComparisonResourceSnapshot object) {
- return createComparisonResourceSnapshotAdapter();
- }
-
- @Override
- public Adapter caseComparisonResourceSetSnapshot(ComparisonResourceSetSnapshot object) {
- return createComparisonResourceSetSnapshotAdapter();
- }
-
- @Override
- public Adapter caseModelElementChange(ModelElementChange object) {
- return createModelElementChangeAdapter();
- }
-
- @Override
- public Adapter caseModelElementChangeLeftTarget(ModelElementChangeLeftTarget object) {
- return createModelElementChangeLeftTargetAdapter();
- }
-
- @Override
- public Adapter caseModelElementChangeRightTarget(ModelElementChangeRightTarget object) {
- return createModelElementChangeRightTargetAdapter();
- }
-
- @Override
- public Adapter caseUpdateModelElement(UpdateModelElement object) {
- return createUpdateModelElementAdapter();
- }
-
- @Override
- public Adapter caseMoveModelElement(MoveModelElement object) {
- return createMoveModelElementAdapter();
- }
-
- @Override
- public Adapter caseUpdateContainmentFeature(UpdateContainmentFeature object) {
- return createUpdateContainmentFeatureAdapter();
- }
-
- @Override
- public Adapter caseAttributeChange(AttributeChange object) {
- return createAttributeChangeAdapter();
- }
-
- @Override
- public Adapter caseAttributeChangeLeftTarget(AttributeChangeLeftTarget object) {
- return createAttributeChangeLeftTargetAdapter();
- }
-
- @Override
- public Adapter caseAttributeChangeRightTarget(AttributeChangeRightTarget object) {
- return createAttributeChangeRightTargetAdapter();
- }
-
- @Override
- public Adapter caseAttributeOrderChange(AttributeOrderChange object) {
- return createAttributeOrderChangeAdapter();
- }
-
- @Override
- public Adapter caseUpdateAttribute(UpdateAttribute object) {
- return createUpdateAttributeAdapter();
- }
-
- @Override
- public Adapter caseReferenceChange(ReferenceChange object) {
- return createReferenceChangeAdapter();
- }
-
- @Override
- public Adapter caseReferenceChangeLeftTarget(ReferenceChangeLeftTarget object) {
- return createReferenceChangeLeftTargetAdapter();
- }
-
- @Override
- public Adapter caseReferenceChangeRightTarget(ReferenceChangeRightTarget object) {
- return createReferenceChangeRightTargetAdapter();
- }
-
- @Override
- public Adapter caseUpdateReference(UpdateReference object) {
- return createUpdateReferenceAdapter();
- }
-
- @Override
- public Adapter caseReferenceOrderChange(ReferenceOrderChange object) {
- return createReferenceOrderChangeAdapter();
- }
-
- @Override
- public Adapter caseAbstractDiffExtension(AbstractDiffExtension object) {
- return createAbstractDiffExtensionAdapter();
- }
-
- @Override
- public Adapter caseResourceDiff(ResourceDiff object) {
- return createResourceDiffAdapter();
- }
-
- @Override
- public Adapter caseResourceDependencyChange(ResourceDependencyChange object) {
- return createResourceDependencyChangeAdapter();
- }
-
- @Override
- public Adapter caseResourceDependencyChangeLeftTarget(ResourceDependencyChangeLeftTarget object) {
- return createResourceDependencyChangeLeftTargetAdapter();
- }
-
- @Override
- public Adapter caseResourceDependencyChangeRightTarget(ResourceDependencyChangeRightTarget object) {
- return createResourceDependencyChangeRightTargetAdapter();
- }
-
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = DiffPackage.eINSTANCE;
- }
- }
-
- /**
- * Check whether this element should be visible or not. A diff element may not be visible when it's hidden
- * by any diff extension and this diff extension is not collapsed.
- *
- * @param element
- * :the diff element we want to know if it's visible or not.
- * @return : true if the element should be hidden in the compare view, false otherwhise.
- */
- public static boolean shouldBeHidden(EObject element) {
- boolean result = false;
- if (element instanceof DiffElement) {
- final DiffElement diff = (DiffElement)element;
- final Iterator<AbstractDiffExtension> it = diff.getIsHiddenBy().iterator();
- while (it.hasNext()) {
- final AbstractDiffExtension extension = it.next();
- if (!extension.isIsCollapsed()) {
- result = true;
- }
- }
- }
- if (element instanceof DiffGroup) {
- final DiffGroup group = (DiffGroup)element;
- if (group.getSubchanges() == 0) {
- result = true;
- }
- }
- return result;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension <em>Abstract Diff Extension</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension
- * @generated
- */
- public Adapter createAbstractDiffExtensionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.ResourceDiff <em>Resource Diff</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDiff
- * @generated
- */
- public Adapter createResourceDiffAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange <em>Resource Dependency Change</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange
- * @generated
- */
- public Adapter createResourceDependencyChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget <em>Resource Dependency Change Left Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget
- * @generated
- */
- public Adapter createResourceDependencyChangeLeftTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget <em>Resource Dependency Change Right Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget
- * @generated
- */
- public Adapter createResourceDependencyChangeRightTargetAdapter() {
- return null;
- }
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.AttributeChange <em>Attribute Change</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChange
- * @generated
- */
- public Adapter createAttributeChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget <em>Attribute Change Left Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget
- * @generated
- */
- public Adapter createAttributeChangeLeftTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget <em>Attribute Change Right Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget
- * @generated
- */
- public Adapter createAttributeChangeRightTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange <em>Attribute Order Change</em>}'.
- * <!-- begin-user-doc -->
- * 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.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.AttributeOrderChange
- * @generated
- * @since 1.3
- */
- public Adapter createAttributeOrderChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement <em>Conflicting Diff Element</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement
- * @generated
- */
- public Adapter createConflictingDiffElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.DiffElement <em>Element</em>}'.
- * <!-- begin-user-doc -->
- * 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffElement
- * @generated
- */
- public Adapter createDiffElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.DiffGroup <em>Group</em>}'.
- * <!-- begin-user-doc --> 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.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffGroup
- * @generated
- */
- public Adapter createDiffGroupAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot <em>Comparison Snapshot</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot
- * @generated
- */
- public Adapter createComparisonSnapshotAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot <em>Comparison Resource Snapshot</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot
- * @generated
- */
- public Adapter createComparisonResourceSnapshotAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot <em>Comparison Resource Set Snapshot</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot
- * @generated
- */
- public Adapter createComparisonResourceSetSnapshotAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.DiffModel <em>Model</em>}'.
- * <!-- begin-user-doc --> 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.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffModel
- * @generated
- */
- public Adapter createDiffModelAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.DiffResourceSet <em>Resource Set</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.DiffResourceSet
- * @generated
- */
- public Adapter createDiffResourceSetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc --> This default implementation returns
- * null. <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.ModelElementChange <em>Model Element Change</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChange
- * @generated
- */
- public Adapter createModelElementChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget <em>Model Element Change Left Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget
- * @generated
- */
- public Adapter createModelElementChangeLeftTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget <em>Model Element Change Right Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget
- * @generated
- */
- public Adapter createModelElementChangeRightTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.MoveModelElement <em>Move Model Element</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.MoveModelElement
- * @generated
- */
- public Adapter createMoveModelElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature <em>Update Containment Feature</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature
- * @generated
- */
- public Adapter createUpdateContainmentFeatureAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.ReferenceChange <em>Reference Change</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChange
- * @generated
- */
- public Adapter createReferenceChangeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget <em>Reference Change Left Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget
- * @generated
- */
- public Adapter createReferenceChangeLeftTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget <em>Reference Change Right Target</em>}'.
- * <!-- begin-user-doc --> 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. <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget
- * @generated
- */
- public Adapter createReferenceChangeRightTargetAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.UpdateAttribute <em>Update Attribute</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateAttribute
- * @generated
- */
- public Adapter createUpdateAttributeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.UpdateModelElement <em>Update Model Element</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateModelElement
- * @generated
- */
- public Adapter createUpdateModelElementAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '
- * {@link org.eclipse.emf.compare.diff.metamodel.UpdateReference <em>Update Reference</em>}'. <!--
- * begin-user-doc --> 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. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.UpdateReference
- * @generated
- */
- public Adapter createUpdateReferenceAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange <em>Reference Order Change</em>}'.
- * <!-- begin-user-doc -->
- * 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.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.compare.diff.metamodel.ReferenceOrderChange
- * @generated
- */
- public Adapter createReferenceOrderChangeAdapter() {
- return null;
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc --> This
- * implementation returns <code>true</code> if the object is either the model's package or is an instance
- * object of the model. <!-- end-user-doc -->
- * @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;
- }
-
-} // DiffAdapterFactory
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
deleted file mode 100644
index abac7cd1a..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/metamodel/util/DiffSwitch.java
+++ /dev/null
@@ -1,846 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-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.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChange;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.AttributeChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSetSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonResourceSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ComparisonSnapshot;
-import org.eclipse.emf.compare.diff.metamodel.ConflictingDiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffGroup;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffPackage;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.MoveModelElement;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDiff;
-import org.eclipse.emf.compare.diff.metamodel.UpdateAttribute;
-import org.eclipse.emf.compare.diff.metamodel.UpdateContainmentFeature;
-import org.eclipse.emf.compare.diff.metamodel.UpdateModelElement;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call
- * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> 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. <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.diff.metamodel.DiffPackage
- * @generated
- */
-
-public class DiffSwitch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected static DiffPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- public DiffSwitch() {
- if (modelPackage == null) {
- modelPackage = DiffPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Diff Extension</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Diff Extension</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseAbstractDiffExtension(AbstractDiffExtension object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Diff</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Diff</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseResourceDiff(ResourceDiff object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Dependency Change</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Dependency Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseResourceDependencyChange(ResourceDependencyChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Dependency Change Left Target</em>'.
- * <!-- begin-user-doc --> This implementation returns
- * null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Dependency Change Left Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseResourceDependencyChangeLeftTarget(ResourceDependencyChangeLeftTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Dependency Change Right Target</em>'.
- * <!-- begin-user-doc --> This implementation returns
- * null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Dependency Change Right Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseResourceDependencyChangeRightTarget(ResourceDependencyChangeRightTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Attribute Change</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Attribute Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseAttributeChange(AttributeChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Attribute Change Left Target</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Attribute Change Left Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseAttributeChangeLeftTarget(AttributeChangeLeftTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Attribute Change Right Target</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Attribute Change Right Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseAttributeChangeRightTarget(AttributeChangeRightTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Attribute Order Change</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Attribute Order Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- * @since 1.3
- */
- public T caseAttributeOrderChange(AttributeOrderChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Conflicting Diff Element</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Conflicting Diff Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseConflictingDiffElement(ConflictingDiffElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Element</em>'.
- * <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch. <!--
- * end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseDiffElement(DiffElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Group</em>'.
- * <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch. <!--
- * end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Group</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseDiffGroup(DiffGroup object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Comparison Snapshot</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Comparison Snapshot</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseComparisonSnapshot(ComparisonSnapshot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Comparison Snapshot</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Comparison Snapshot</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseComparisonResourceSnapshot(ComparisonResourceSnapshot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Comparison Resource Set Snapshot</em>'.
- * <!-- begin-user-doc --> This implementation returns null;
- * returning a non-null result will terminate the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Comparison Resource Set Snapshot</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseComparisonResourceSetSnapshot(ComparisonResourceSetSnapshot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Model</em>'.
- * <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch. <!--
- * end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Model</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseDiffModel(DiffModel object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Set</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Set</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDiffResourceSet(DiffResourceSet object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Model Element Change</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Model Element Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseModelElementChange(ModelElementChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Model Element Change Left Target</em>'.
- * <!-- begin-user-doc --> This implementation returns null;
- * returning a non-null result will terminate the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Model Element Change Left Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseModelElementChangeLeftTarget(ModelElementChangeLeftTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Model Element Change Right Target</em>'.
- * <!-- begin-user-doc --> This implementation returns null;
- * returning a non-null result will terminate the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Model Element Change Right Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseModelElementChangeRightTarget(ModelElementChangeRightTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Move Model Element</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Move Model Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseMoveModelElement(MoveModelElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Update Containment Feature</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Update Containment Feature</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseUpdateContainmentFeature(UpdateContainmentFeature object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Reference Change</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Reference Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseReferenceChange(ReferenceChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Reference Change Left Target</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Reference Change Left Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseReferenceChangeLeftTarget(ReferenceChangeLeftTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Reference Change Right Target</em>'.
- * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate
- * the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Reference Change Right Target</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseReferenceChangeRightTarget(ReferenceChangeRightTarget object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Update Attribute</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Update Attribute</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseUpdateAttribute(UpdateAttribute object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Update Model Element</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Update Model Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseUpdateModelElement(UpdateModelElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Update Reference</em>'. <!--
- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the
- * switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Update Reference</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T caseUpdateReference(UpdateReference object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Reference Order Change</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Reference Order Change</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseReferenceOrderChange(ReferenceOrderChange object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch, but this
- * is the last case anyway. <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- @SuppressWarnings("unused")
- public T defaultCase(EObject object) {
- return null;
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- } else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case DiffPackage.DIFF_MODEL: {
- DiffModel diffModel = (DiffModel)theEObject;
- T result = caseDiffModel(diffModel);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.DIFF_RESOURCE_SET: {
- DiffResourceSet diffResourceSet = (DiffResourceSet)theEObject;
- T result = caseDiffResourceSet(diffResourceSet);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.DIFF_ELEMENT: {
- DiffElement diffElement = (DiffElement)theEObject;
- T result = caseDiffElement(diffElement);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.CONFLICTING_DIFF_ELEMENT: {
- ConflictingDiffElement conflictingDiffElement = (ConflictingDiffElement)theEObject;
- T result = caseConflictingDiffElement(conflictingDiffElement);
- if (result == null)
- result = caseDiffElement(conflictingDiffElement);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.DIFF_GROUP: {
- DiffGroup diffGroup = (DiffGroup)theEObject;
- T result = caseDiffGroup(diffGroup);
- if (result == null)
- result = caseDiffElement(diffGroup);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.COMPARISON_SNAPSHOT: {
- ComparisonSnapshot comparisonSnapshot = (ComparisonSnapshot)theEObject;
- T result = caseComparisonSnapshot(comparisonSnapshot);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.COMPARISON_RESOURCE_SNAPSHOT: {
- ComparisonResourceSnapshot comparisonResourceSnapshot = (ComparisonResourceSnapshot)theEObject;
- T result = caseComparisonResourceSnapshot(comparisonResourceSnapshot);
- if (result == null)
- result = caseComparisonSnapshot(comparisonResourceSnapshot);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.COMPARISON_RESOURCE_SET_SNAPSHOT: {
- ComparisonResourceSetSnapshot comparisonResourceSetSnapshot = (ComparisonResourceSetSnapshot)theEObject;
- T result = caseComparisonResourceSetSnapshot(comparisonResourceSetSnapshot);
- if (result == null)
- result = caseComparisonSnapshot(comparisonResourceSetSnapshot);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.MODEL_ELEMENT_CHANGE: {
- ModelElementChange modelElementChange = (ModelElementChange)theEObject;
- T result = caseModelElementChange(modelElementChange);
- if (result == null)
- result = caseDiffElement(modelElementChange);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.MODEL_ELEMENT_CHANGE_LEFT_TARGET: {
- ModelElementChangeLeftTarget modelElementChangeLeftTarget = (ModelElementChangeLeftTarget)theEObject;
- T result = caseModelElementChangeLeftTarget(modelElementChangeLeftTarget);
- if (result == null)
- result = caseModelElementChange(modelElementChangeLeftTarget);
- if (result == null)
- result = caseDiffElement(modelElementChangeLeftTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.MODEL_ELEMENT_CHANGE_RIGHT_TARGET: {
- ModelElementChangeRightTarget modelElementChangeRightTarget = (ModelElementChangeRightTarget)theEObject;
- T result = caseModelElementChangeRightTarget(modelElementChangeRightTarget);
- if (result == null)
- result = caseModelElementChange(modelElementChangeRightTarget);
- if (result == null)
- result = caseDiffElement(modelElementChangeRightTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.UPDATE_MODEL_ELEMENT: {
- UpdateModelElement updateModelElement = (UpdateModelElement)theEObject;
- T result = caseUpdateModelElement(updateModelElement);
- if (result == null)
- result = caseModelElementChange(updateModelElement);
- if (result == null)
- result = caseDiffElement(updateModelElement);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.MOVE_MODEL_ELEMENT: {
- MoveModelElement moveModelElement = (MoveModelElement)theEObject;
- T result = caseMoveModelElement(moveModelElement);
- if (result == null)
- result = caseUpdateModelElement(moveModelElement);
- if (result == null)
- result = caseModelElementChange(moveModelElement);
- if (result == null)
- result = caseDiffElement(moveModelElement);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.UPDATE_CONTAINMENT_FEATURE: {
- UpdateContainmentFeature updateContainmentFeature = (UpdateContainmentFeature)theEObject;
- T result = caseUpdateContainmentFeature(updateContainmentFeature);
- if (result == null)
- result = caseMoveModelElement(updateContainmentFeature);
- if (result == null)
- result = caseUpdateModelElement(updateContainmentFeature);
- if (result == null)
- result = caseModelElementChange(updateContainmentFeature);
- if (result == null)
- result = caseDiffElement(updateContainmentFeature);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.ATTRIBUTE_CHANGE: {
- AttributeChange attributeChange = (AttributeChange)theEObject;
- T result = caseAttributeChange(attributeChange);
- if (result == null)
- result = caseDiffElement(attributeChange);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.ATTRIBUTE_CHANGE_LEFT_TARGET: {
- AttributeChangeLeftTarget attributeChangeLeftTarget = (AttributeChangeLeftTarget)theEObject;
- T result = caseAttributeChangeLeftTarget(attributeChangeLeftTarget);
- if (result == null)
- result = caseAttributeChange(attributeChangeLeftTarget);
- if (result == null)
- result = caseDiffElement(attributeChangeLeftTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.ATTRIBUTE_CHANGE_RIGHT_TARGET: {
- AttributeChangeRightTarget attributeChangeRightTarget = (AttributeChangeRightTarget)theEObject;
- T result = caseAttributeChangeRightTarget(attributeChangeRightTarget);
- if (result == null)
- result = caseAttributeChange(attributeChangeRightTarget);
- if (result == null)
- result = caseDiffElement(attributeChangeRightTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.ATTRIBUTE_ORDER_CHANGE: {
- AttributeOrderChange attributeOrderChange = (AttributeOrderChange)theEObject;
- T result = caseAttributeOrderChange(attributeOrderChange);
- if (result == null)
- result = caseAttributeChange(attributeOrderChange);
- if (result == null)
- result = caseDiffElement(attributeOrderChange);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.UPDATE_ATTRIBUTE: {
- UpdateAttribute updateAttribute = (UpdateAttribute)theEObject;
- T result = caseUpdateAttribute(updateAttribute);
- if (result == null)
- result = caseAttributeChange(updateAttribute);
- if (result == null)
- result = caseDiffElement(updateAttribute);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.REFERENCE_CHANGE: {
- ReferenceChange referenceChange = (ReferenceChange)theEObject;
- T result = caseReferenceChange(referenceChange);
- if (result == null)
- result = caseDiffElement(referenceChange);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.REFERENCE_CHANGE_LEFT_TARGET: {
- ReferenceChangeLeftTarget referenceChangeLeftTarget = (ReferenceChangeLeftTarget)theEObject;
- T result = caseReferenceChangeLeftTarget(referenceChangeLeftTarget);
- if (result == null)
- result = caseReferenceChange(referenceChangeLeftTarget);
- if (result == null)
- result = caseDiffElement(referenceChangeLeftTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.REFERENCE_CHANGE_RIGHT_TARGET: {
- ReferenceChangeRightTarget referenceChangeRightTarget = (ReferenceChangeRightTarget)theEObject;
- T result = caseReferenceChangeRightTarget(referenceChangeRightTarget);
- if (result == null)
- result = caseReferenceChange(referenceChangeRightTarget);
- if (result == null)
- result = caseDiffElement(referenceChangeRightTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.UPDATE_REFERENCE: {
- UpdateReference updateReference = (UpdateReference)theEObject;
- T result = caseUpdateReference(updateReference);
- if (result == null)
- result = caseReferenceChange(updateReference);
- if (result == null)
- result = caseDiffElement(updateReference);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.REFERENCE_ORDER_CHANGE: {
- ReferenceOrderChange referenceOrderChange = (ReferenceOrderChange)theEObject;
- T result = caseReferenceOrderChange(referenceOrderChange);
- if (result == null)
- result = caseReferenceChange(referenceOrderChange);
- if (result == null)
- result = caseDiffElement(referenceOrderChange);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.ABSTRACT_DIFF_EXTENSION: {
- AbstractDiffExtension abstractDiffExtension = (AbstractDiffExtension)theEObject;
- T result = caseAbstractDiffExtension(abstractDiffExtension);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.RESOURCE_DIFF: {
- ResourceDiff resourceDiff = (ResourceDiff)theEObject;
- T result = caseResourceDiff(resourceDiff);
- if (result == null)
- result = caseDiffElement(resourceDiff);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE: {
- ResourceDependencyChange resourceDependencyChange = (ResourceDependencyChange)theEObject;
- T result = caseResourceDependencyChange(resourceDependencyChange);
- if (result == null)
- result = caseResourceDiff(resourceDependencyChange);
- if (result == null)
- result = caseDiffElement(resourceDependencyChange);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE_LEFT_TARGET: {
- ResourceDependencyChangeLeftTarget resourceDependencyChangeLeftTarget = (ResourceDependencyChangeLeftTarget)theEObject;
- T result = caseResourceDependencyChangeLeftTarget(resourceDependencyChangeLeftTarget);
- if (result == null)
- result = caseResourceDependencyChange(resourceDependencyChangeLeftTarget);
- if (result == null)
- result = caseResourceDiff(resourceDependencyChangeLeftTarget);
- if (result == null)
- result = caseDiffElement(resourceDependencyChangeLeftTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DiffPackage.RESOURCE_DEPENDENCY_CHANGE_RIGHT_TARGET: {
- ResourceDependencyChangeRightTarget resourceDependencyChangeRightTarget = (ResourceDependencyChangeRightTarget)theEObject;
- T result = caseResourceDependencyChangeRightTarget(resourceDependencyChangeRightTarget);
- if (result == null)
- result = caseResourceDependencyChange(resourceDependencyChangeRightTarget);
- if (result == null)
- result = caseResourceDiff(resourceDependencyChangeRightTarget);
- if (result == null)
- result = caseDiffElement(resourceDependencyChangeRightTarget);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- default:
- return defaultCase(theEObject);
- }
- }
-
-} // DiffSwitch
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/package-info.java
deleted file mode 100644
index 3f3497e8e..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * This packages backs up EMF Compare's differencing functionality.
- * <p>
- * It provides services to call for the differencing process on a MatchModel
- * and merging the detected differences in either direction.
- * </p>
- * <p>
- * All the features provided by these services can be called stand-alone.
- * </p>
- */
-package org.eclipse.emf.compare.diff; \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineDescriptor.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineDescriptor.java
deleted file mode 100644
index 2c30f8ce3..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineDescriptor.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.service;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.engine.IDiffEngine;
-import org.eclipse.emf.compare.util.EngineConstants;
-
-/**
- * The engine descriptor represents an engine contribution trough the extension point.
- *
- * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
- */
-public class DiffEngineDescriptor implements Comparable<DiffEngineDescriptor> {
- /** Wildcard character. */
- private static final String WILDCARD = "*"; //$NON-NLS-1$
-
- /**
- * Content type this engine takes into account.
- *
- * @since 1.1
- */
- protected final String contentType;
-
- /** Configuration element of this descriptor. */
- protected final IConfigurationElement element;
-
- /** Class name of this engine. */
- protected final String engineClassName;
-
- /** File extensions this engine takes into account. */
- protected final String fileExtension;
-
- /** Icon of this engine. */
- protected final String icon;
-
- /** Label of this engine. */
- protected final String label;
-
- /**
- * Namespace this engine takes into account.
- *
- * @since 1.1
- */
- protected final String namespace;
-
- /**
- * Namespace pattern this engine takes into account.
- *
- * @since 1.1
- */
- protected final String namespacePattern;
-
- /**
- * Priority of this descriptor. Should be one of
- * <ul>
- * <li>{@link EngineConstants#PRIORITY_HIGHEST}</li>
- * <li>{@link EngineConstants#PRIORITY_HIGH}</li>
- * <li>{@link EngineConstants#PRIORITY_NORMAL}</li>
- * <li>{@link EngineConstants#PRIORITY_LOW}</li>
- * <li>{@link EngineConstants#PRIORITY_LOWEST}</li>
- * </ul>
- */
- protected final String priority;
-
- /** {@link IDiffEngine} this descriptor describes. */
- private IDiffEngine engine;
-
- /** Integer representation of the priority. */
- private int priorityValue = -1;
-
- /**
- * Instantiate the descriptor given its configuration.
- *
- * @param configuration
- * {@link IConfigurationElement configuration element} of this descriptor.
- */
- public DiffEngineDescriptor(IConfigurationElement configuration) {
- element = configuration;
- priority = getAttribute("priority", "low"); //$NON-NLS-1$//$NON-NLS-2$
- engineClassName = getAttribute("engineClass", null); //$NON-NLS-1$
- label = getAttribute("label", ""); //$NON-NLS-1$ //$NON-NLS-2$
- icon = getAttribute("icon", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- contentType = getAttribute("contentType", ""); //$NON-NLS-1$ //$NON-NLS-2$
- namespace = getAttribute("namespace", ""); //$NON-NLS-1$ //$NON-NLS-2$
- namespacePattern = getAttribute("namespacePattern", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if ("".equals(contentType) && "".equals(namespace) && "".equals(namespacePattern)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fileExtension = getAttribute("fileExtension", WILDCARD); //$NON-NLS-1$
- } else {
- fileExtension = getAttribute("fileExtension", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(DiffEngineDescriptor other) {
- final int nombre1 = other.getPriorityValue();
- final int nombre2 = getPriorityValue();
- return nombre2 - nombre1;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- boolean isEqual = true;
- if (this == obj) {
- isEqual = true;
- } else if (obj == null || getClass() != obj.getClass()) {
- isEqual = false;
- } else {
- final DiffEngineDescriptor other = (DiffEngineDescriptor)obj;
- if (engineClassName == null && other.engineClassName != null) {
- isEqual = false;
- } else if (engineClassName != null && !engineClassName.equals(other.engineClassName)) {
- isEqual = false;
- } else if (fileExtension == null && other.fileExtension != null) {
- isEqual = false;
- } else if (fileExtension != null && !fileExtension.equals(other.fileExtension)) {
- isEqual = false;
- } else if (contentType == null && other.contentType != null) {
- isEqual = false;
- } else if (contentType != null && !contentType.equals(other.contentType)) {
- isEqual = false;
- } else if (namespace == null && other.namespace != null) {
- isEqual = false;
- } else if (namespace != null && !namespace.equals(other.namespace)) {
- isEqual = false;
- } else if (priority == null && other.priority != null) {
- isEqual = false;
- } else if (priority != null && !priority.equals(other.priority)) {
- isEqual = false;
- }
- }
- return isEqual;
- }
-
- /**
- * Returns the content type this engine should handle.
- *
- * @return The content type this engine should handle.
- * @since 1.1
- */
- public String getContentType() {
- return contentType;
- }
-
- /**
- * Returns the configuration element.
- *
- * @return The configuration element.
- * @since 1.0
- */
- public IConfigurationElement getElement() {
- return element;
- }
-
- /**
- * Returns the qualified name of the engine's class.
- *
- * @return Qualified name of the engine's class.
- * @since 1.0
- */
- public String getEngineClassName() {
- return engineClassName;
- }
-
- /**
- * Returns the engine instance.
- *
- * @return The engine instance.
- */
- public IDiffEngine getEngineInstance() {
- if (engine == null) {
- try {
- engine = (IDiffEngine)element.createExecutableExtension("engineClass"); //$NON-NLS-1$
- } catch (final CoreException e) {
- EMFComparePlugin.log(e, false);
- }
- }
- // engine could have thrown an exception during its initialization
- if (engine != null) {
- engine.reset();
- }
- return engine;
- }
-
- /**
- * Returns the file extension this engine should handle.
- *
- * @return The file extension this engine should handle.
- */
- public String getFileExtension() {
- return fileExtension;
- }
-
- /**
- * Returns the icon that represents the wrapped engine.
- *
- * @return The icon that represents the wrapped engine.
- * @since 1.0
- */
- public String getIcon() {
- return icon;
- }
-
- /**
- * Returns the label that represents the wrapped engine.
- *
- * @return The label that represents the wrapped engine.
- * @since 1.0
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Returns the namespace this engine should handle.
- *
- * @return The namespace this engine should handle.
- * @since 1.1
- */
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * Returns the namespace pattern this engine should handle.
- *
- * @return The namespace pattern this engine should handle.
- * @since 1.1
- */
- public String getNamespacePattern() {
- return namespacePattern;
- }
-
- /**
- * Returns the engine priority.
- *
- * @return The engine priority.
- */
- public String getPriority() {
- return priority.toLowerCase();
- }
-
- /**
- * Returns the value of the priority of this engine.<br/>
- * Returned values according to <code>priority</code> :
- * <ul>
- * <li>&quot;lowest&quot; =&gt; {@value EngineConstants#PRIORITY_LOWEST}</li>
- * <li>&quot;low&quot; =&gt; {@value EngineConstants#PRIORITY_LOW}</li>
- * <li>&quot;high&quot; =&gt; {@value EngineConstants#PRIORITY_HIGH}</li>
- * <li>&quot;highest&quot; =&gt; {@value EngineConstants#PRIORITY_HIGHEST}</li>
- * <li>anything else =&gt; {@value EngineConstants#PRIORITY_NORMAL}</li>
- * </ul>
- *
- * @return <code>int</code> corresponding to this engine priority.
- */
- public int getPriorityValue() {
- if (priorityValue == -1) {
- priorityValue = EngineConstants.PRIORITY_NORMAL;
- if ("lowest".equals(priority)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_LOWEST;
- } else if ("low".equals(priority)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_LOW;
- } else if ("high".equals(priority)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_HIGH;
- } else if ("highest".equals(priority)) { //$NON-NLS-1$
- priorityValue = EngineConstants.PRIORITY_HIGHEST;
- }
- }
- return priorityValue;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int classNameHash = 0;
- if (engineClassName != null) {
- classNameHash = engineClassName.hashCode();
- }
- int namespaceHash = 0;
- if (namespace != null) {
- namespaceHash = namespace.hashCode();
- }
- int contentTypeHash = 0;
- if (contentType != null) {
- contentTypeHash = contentType.hashCode();
- }
- int extensionHash = 0;
- if (fileExtension != null) {
- extensionHash = fileExtension.hashCode();
- }
- int priorityHash = 0;
- if (priority != null) {
- priorityHash = priority.hashCode();
- }
-
- int hashCode = (prime + classNameHash) * prime;
- hashCode = hashCode << 2;
- hashCode = (hashCode + extensionHash + namespaceHash + contentTypeHash) * prime;
- hashCode = hashCode << 1;
- hashCode = hashCode + priorityHash;
- return hashCode;
- }
-
- /**
- * Returns the value of the attribute <code>name</code> of this descriptor's configuration element. if the
- * attribute hasn't been set, we'll return <code>defaultValue</code> instead.
- *
- * @param name
- * Name of the attribute we seek the value of.
- * @param defaultValue
- * Value to return if the attribute hasn't been set.
- * @return The value of the attribute <code>name</code>, <code>defaultValue</code> if it hasn't been set.
- */
- private String getAttribute(String name, String defaultValue) {
- final String value = element.getAttribute(name);
- if (value != null)
- return value;
- if (defaultValue != null)
- return defaultValue;
- throw new IllegalArgumentException(EMFCompareDiffMessages.getString(
- "Descriptor.MissingAttribute", name)); //$NON-NLS-1$
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineRegistry.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineRegistry.java
deleted file mode 100644
index b63e7359b..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffEngineRegistry.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.compare.diff.EMFCompareDiffMessages;
-import org.eclipse.emf.compare.diff.engine.GenericDiffEngine;
-import org.eclipse.emf.compare.diff.engine.IDiffEngine;
-import org.eclipse.emf.compare.util.ModelIdentifier;
-
-/* (non-javadoc) we make use of the ordering of the engines, do not change Map and List implementations. */
-/**
- * This registry will be initialized with all the diff engines that could be parsed from the extension points
- * if Eclipse is running according to {@link EMFPlugin#IS_ECLIPSE_RUNNING}, else it will contain only the two
- * generic ones. Clients can add their own diff engines in the registry for standalone usage.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public final class DiffEngineRegistry extends HashMap<String, List<Object>> {
- /** Singleton instance of the registry. */
- public static final DiffEngineRegistry INSTANCE = new DiffEngineRegistry();
-
- /** Name of the extension point to parse for engines. */
- private static final String DIFF_ENGINES_EXTENSION_POINT = "org.eclipse.emf.compare.diff.engine"; //$NON-NLS-1$
-
- /** Separator for extension Metadata attributes. */
- private static final String SEPARATOR = ","; //$NON-NLS-1$
-
- /** Serial version UID is used when deserializing Objects. */
- private static final long serialVersionUID = 2237008034183610765L;
-
- /** Externalized here to avoid too many distinct usages. */
- private static final String TAG_ENGINE = "diffengine"; //$NON-NLS-1$
-
- /** Wild card for file extensions. */
- private static final String WILDCARD = "*"; //$NON-NLS-1$
-
- /** Store the engine descriptors associated by a namespace pattern. */
- private final List<DiffEngineDescriptor> nsPatternDescriptors = new ArrayList<DiffEngineDescriptor>();
-
- /**
- * As this is a singleton, hide the default constructor. Access the instance through the field
- * {@link #INSTANCE}.
- */
- private DiffEngineRegistry() {
- if (EMFPlugin.IS_ECLIPSE_RUNNING) {
- parseExtensionMetadata();
- } else {
- // Add both generic engines
- putValue(WILDCARD, new GenericDiffEngine());
- }
- }
-
- /**
- * This will return the list of engine descriptors available for a given model identifier. Engines must
- * have been registered through an extension point for this to return anything else than an empty list.
- * Note that engines registered against {@value #WILDCARD} will always be returned at the end of this
- * list.
- *
- * @param identifier
- * {@link ModelIdentifier} we seek the matching engines for.
- * @return The list of available {@link DiffEngineDescriptor}.
- * @since 1.1
- */
- public List<DiffEngineDescriptor> getDescriptors(ModelIdentifier identifier) {
- final List<Object> candidates = getEnginesForIdentifier(identifier);
-
- candidates.addAll(get(WILDCARD));
-
- final List<DiffEngineDescriptor> engines = new ArrayList<DiffEngineDescriptor>(candidates.size());
- for (final Object value : candidates) {
- if (value instanceof DiffEngineDescriptor) {
- engines.add((DiffEngineDescriptor)value);
- }
- }
-
- return engines;
- }
-
- /**
- * This will return the list of engines available for a given engine identifier. Engines must have been
- * registered through an extension point for this to return anything else than an empty list. Note that
- * engines registered against {@value #WILDCARD} will always be returned at the end of this list.
- *
- * @param engineIdentifier
- * Engine identifier we seek the differencing engines for.<br/>
- * An engine identifier is a String that can describe either a file extension, a content-type
- * or a namespace.
- * @return The list of available engines.
- * @deprecated use {@link DiffEngineRegistry#getDescriptors(ModelIdentifier)} instead.
- */
- @Deprecated
- public List<DiffEngineDescriptor> getDescriptors(String engineIdentifier) {
- final List<Object> specific = get(engineIdentifier);
- final List<Object> candidates = new ArrayList<Object>(get(WILDCARD));
- if (specific != null) {
- candidates.addAll(0, specific);
- }
-
- final List<DiffEngineDescriptor> engines = new ArrayList<DiffEngineDescriptor>(candidates.size());
- for (final Object value : candidates) {
- if (value instanceof DiffEngineDescriptor) {
- engines.add((DiffEngineDescriptor)value);
- }
- }
- return engines;
- }
-
- /**
- * Returns the highest priority {@link IDiffEngine} registered against the given model identifiers.
- * Specific engines will always come before generic ones regardless of their priority. If engines have
- * been manually added to the list, the latest added will be returned.
- *
- * @param identifier
- * {@link ModelIdentifier} to search on the registered {@link IDiffEngine}
- * @return The best {@link IDiffEngine} for the given engine identifiers.
- * @since 1.1
- */
- public IDiffEngine getHighestEngine(ModelIdentifier identifier) {
- IDiffEngine highest = null;
-
- final List<Object> engines = getEnginesForIdentifier(identifier);
-
- if (engines.size() != 0) {
- highest = getSpecificHighestEngine(engines);
- }
-
- // couldn't find a specific engine, search through the generic ones
- if (highest == null) {
- highest = getSpecificHighestEngine(get(WILDCARD));
- }
- return highest;
- }
-
- /**
- * Returns the highest priority {@link IDiffEngine} registered against the given engine identifier.
- * Specific engines will always come before generic ones regardless of their priority. If engines have
- * been manually added to the list, the latest added will be returned.
- *
- * @param engineIdentifier
- * An engine identifier to search on the registered {@link IDiffEngine}.<br/>
- * An engine identifier is a String that can describe either a file extension, a content-type
- * or a namespace.
- * @return The best {@link IDiffEngine} for the given file extension.
- * @deprecated use {@link DiffEngineRegistry#getDescriptors(ModelIdentifier)} instead.
- */
- @Deprecated
- public IDiffEngine getHighestEngine(String engineIdentifier) {
- final List<Object> engines = get(engineIdentifier);
- IDiffEngine highest = null;
- if (engines != null) {
- highest = getSpecificHighestEngine(engines);
- }
-
- // couldn't find a specific engine, search through the generic ones
- if (highest == null) {
- highest = getSpecificHighestEngine(get(WILDCARD));
- }
- return highest;
- }
-
- /**
- * Adds the given value in the list of engines known for the given extension.
- *
- * @param key
- * The file extension we wish to add an engine for.
- * @param value
- * Engine to be added.
- */
- public void putValue(String key, Object value) {
- if (value instanceof IDiffEngine || value instanceof DiffEngineDescriptor) {
- List<Object> values = get(key);
- if (values != null) {
- values.add(value);
- } else {
- values = new ArrayList<Object>();
- values.add(value);
- super.put(key, values);
- }
- } else
- throw new IllegalArgumentException(EMFCompareDiffMessages.getString(
- "DiffEngineRegistry.IllegalEngine", value.getClass().getName())); //$NON-NLS-1$
- }
-
- /**
- * Retrieves the engines that correspond to the given identifier.
- *
- * @param identifier
- * the {@link ModelIdentifier} we seek engines for.
- * @return a list of {@link IDiffEngine} and {@link DiffEngineDescriptor}
- */
- private List<Object> getEnginesForIdentifier(ModelIdentifier identifier) {
- final List<Object> candidates = new ArrayList<Object>();
- List<Object> newCandidates;
-
- if (identifier.getNamespace() != null) {
- newCandidates = get(identifier.getNamespace());
- if (newCandidates != null) {
- candidates.addAll(newCandidates);
- }
-
- for (DiffEngineDescriptor desc : nsPatternDescriptors) {
- if (identifier.getNamespace().matches(desc.getNamespacePattern())) {
- candidates.add(desc);
- }
- }
- }
-
- if (identifier.getContentType() != null) {
- newCandidates = get(identifier.getContentType());
- if (newCandidates != null) {
- candidates.addAll(newCandidates);
- }
- }
-
- if (identifier.getExtension() != null) {
- newCandidates = get(identifier.getExtension());
- if (newCandidates != null) {
- candidates.addAll(newCandidates);
- }
- }
-
- return candidates;
- }
-
- /**
- * Returns the highest priority {@link IDiffEngine} registered among the given engine list. If engines
- * have been manually added to the list, the latest added will be returned.
- *
- * @param engines
- * List of engines.
- * @return The best {@link IDiffEngine} for the given engine list.
- */
- private IDiffEngine getSpecificHighestEngine(List<Object> engines) {
- int highestPriority = -1;
- IDiffEngine highest = null;
-
- for (final Object engine : engines) {
- if (engine instanceof DiffEngineDescriptor) {
- final DiffEngineDescriptor desc = (DiffEngineDescriptor)engine;
- if (desc.getPriorityValue() > highestPriority) {
- highest = desc.getEngineInstance();
- highestPriority = desc.getPriorityValue();
- }
- } else if (engine instanceof IDiffEngine) {
- highest = (IDiffEngine)engine;
- }
- }
-
- return highest;
- }
-
- /**
- * This will parse the given {@link IConfigurationElement configuration element} and return a descriptor
- * for it if it describes an engine.
- *
- * @param configElement
- * Configuration element to parse.
- * @return {@link DiffEngineDescriptor} wrapped around <code>configElement</code> if it describes an
- * engine, <code>null</code> otherwise.
- */
- private DiffEngineDescriptor parseEngine(IConfigurationElement configElement) {
- if (!configElement.getName().equals(TAG_ENGINE))
- return null;
- final DiffEngineDescriptor desc = new DiffEngineDescriptor(configElement);
- return desc;
- }
-
- /**
- * This will parse the currently running platform for extensions and store all the diff engines that can
- * be found.
- */
- private void parseExtensionMetadata() {
- final IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(
- DIFF_ENGINES_EXTENSION_POINT).getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- final IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- final DiffEngineDescriptor desc = parseEngine(configElements[j]);
-
- final String namespacePattern = desc.getNamespacePattern();
- if (!"".equals(namespacePattern)) { //$NON-NLS-1$
- nsPatternDescriptors.add(desc);
- }
-
- final String[] namespaces = desc.getNamespace().split(SEPARATOR);
- for (final String ns : namespaces) {
- if (!"".equals(ns)) { //$NON-NLS-1$
- putValue(ns, desc);
- }
- }
-
- final String[] contentTypes = desc.getContentType().split(SEPARATOR);
- for (final String ct : contentTypes) {
- if (!"".equals(ct)) { //$NON-NLS-1$
- putValue(ct, desc);
- }
- }
-
- final String[] fileExtensions = desc.getFileExtension().split(SEPARATOR);
- for (final String ext : fileExtensions) {
- if (!"".equals(ext)) { //$NON-NLS-1$
- putValue(ext, desc);
- }
- }
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffService.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffService.java
deleted file mode 100644
index ad0e216a7..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/DiffService.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.service;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.compare.EMFComparePlugin;
-import org.eclipse.emf.compare.diff.engine.IDiffEngine;
-import org.eclipse.emf.compare.diff.internal.DiffReferenceUtil;
-import org.eclipse.emf.compare.diff.internal.engine.MatchCrossReferencer;
-import org.eclipse.emf.compare.diff.internal.service.DefaultDiffEngineSelector;
-import org.eclipse.emf.compare.diff.internal.service.DiffExtensionDescriptor;
-import org.eclipse.emf.compare.diff.metamodel.AbstractDiffExtension;
-import org.eclipse.emf.compare.diff.metamodel.DiffElement;
-import org.eclipse.emf.compare.diff.metamodel.DiffFactory;
-import org.eclipse.emf.compare.diff.metamodel.DiffModel;
-import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChange;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChange;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeLeftTarget;
-import org.eclipse.emf.compare.diff.metamodel.ReferenceChangeRightTarget;
-import org.eclipse.emf.compare.diff.metamodel.ResourceDependencyChange;
-import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
-import org.eclipse.emf.compare.match.metamodel.MatchModel;
-import org.eclipse.emf.compare.match.metamodel.MatchResourceSet;
-import org.eclipse.emf.compare.match.metamodel.Side;
-import org.eclipse.emf.compare.match.metamodel.UnmatchModel;
-import org.eclipse.emf.compare.util.EMFCompareMap;
-import org.eclipse.emf.compare.util.EMFComparePreferenceConstants;
-import org.eclipse.emf.compare.util.EclipseModelUtils;
-import org.eclipse.emf.compare.util.ModelIdentifier;
-import org.eclipse.emf.compare.util.ModelUtils;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer;
-
-/**
- * Parses extension meta data to fetch the diff engine to use.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public final class DiffService {
- /** Wild card for file extensions. */
- private static final String ALL_ID = "*"; //$NON-NLS-1$
-
- /** Externalized here to avoid too many distinct usages. */
- private static final String DIFF_EXTENSION_EXTENSION_POINT = "org.eclipse.emf.compare.diff.extension"; //$NON-NLS-1$
-
- /** Currently set diff engine selector. */
- private static IDiffEngineSelector diffEngineSelector = new DefaultDiffEngineSelector();
-
- /** Keeps track of all the diff extensions we've parsed. */
- private static final Map<String, ArrayList<DiffExtensionDescriptor>> PARSED_DIFF_EXTENSIONS = new EMFCompareMap<String, ArrayList<DiffExtensionDescriptor>>();
-
- /** Separator for extension Metadata attributes. */
- private static final String SEPARATOR = ","; //$NON-NLS-1$
-
- /** Externalized here to avoid too many distinct usages. */
- private static final String TAG_DIFF_EXTENSION = "diffExtension"; //$NON-NLS-1$
-
- static {
- // FIXME Should be externalized in a DiffExtensionRegistry
- parseExtensionMetadata();
- }
-
- /**
- * Utility classes don't need to (and shouldn't) be instantiated.
- */
- private DiffService() {
- // prevents instantiation
- }
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * The matching model.
- * @return The corresponding diff model.
- */
- public static DiffModel doDiff(MatchModel match) {
- return doDiff(match, false);
- }
-
- /**
- * Return a diffmodel created using the match model. This implementation is a generic and simple one.
- *
- * @param match
- * the matching model
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @return the corresponding diff model
- */
- public static DiffModel doDiff(MatchModel match, boolean threeWay) {
- final IDiffEngine engine = getBestDiffEngine(match);
- final DiffModel diff = engine.doDiff(match, threeWay);
-
- final Collection<AbstractDiffExtension> extensions = DiffService
- .getCorrespondingDiffExtensions(match);
- for (final AbstractDiffExtension ext : extensions) {
- if (ext != null) {
- ext.visit(diff);
- }
- }
-
- engine.reset();
-
- fillRequiredDifferences(diff);
-
- return diff;
- }
-
- /**
- * Returns a DiffResourceSet created by differencing all MatchModels contained by <code>match</code>. This
- * will call for a two-way differencing.
- *
- * @param matchResourceSet
- * Contains the MatchModels for all compared resources.
- * @return DiffResourceSet created by differencing all MatchModels.
- */
- public static DiffResourceSet doDiff(MatchResourceSet matchResourceSet) {
- return doDiff(matchResourceSet, false);
- }
-
- /**
- * Returns a DiffResourceSet created by differencing all MatchModels contained by <code>match</code>.
- * Depending on the value of <code>threeWay</code>, this will call for either two- or three-way
- * differencing.
- *
- * @param matchResourceSet
- * Contains the MatchModels for all compared resources.
- * @param threeWay
- * <code>True</code> if we're computing a three way comparison, <code>False</code> otherwise.
- * @return DiffResourceSet created by differencing all MatchModels.
- */
- public static DiffResourceSet doDiff(MatchResourceSet matchResourceSet, boolean threeWay) {
- final DiffResourceSet diff = DiffFactory.eINSTANCE.createDiffResourceSet();
- final CrossReferencer crossReferencer = new MatchCrossReferencer(matchResourceSet);
- for (final MatchModel match : matchResourceSet.getMatchModels()) {
- final IDiffEngine engine = getBestDiffEngine(match);
- final DiffModel diffmodel = engine.doDiffResourceSet(match, threeWay, crossReferencer);
-
- final Collection<AbstractDiffExtension> extensions = DiffService
- .getCorrespondingDiffExtensions(match);
- for (final AbstractDiffExtension ext : extensions) {
- if (ext != null) {
- ext.visit(diffmodel);
- }
- }
-
- engine.reset();
- diff.getDiffModels().add(diffmodel);
- }
- for (final UnmatchModel unmatch : matchResourceSet.getUnmatchedModels()) {
- ResourceDependencyChange dependencyChange;
- if (unmatch.getSide() == Side.LEFT) {
- dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeLeftTarget();
- } else {
- dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeRightTarget();
- }
- if (unmatch.isRemote()) {
- dependencyChange.setRemote(true);
- }
- dependencyChange.getRoots().addAll(unmatch.getRoots());
- diff.getResourceDiffs().add(dependencyChange);
- }
-
- fillRequiredDifferences(diff);
-
- return diff;
- }
-
- /**
- * Post-processing on the DiffModel or DiffResourceSet to fill each {@link ModelElementChange} with
- * possible required others differences.
- *
- * @param model
- * The DiffModel or DiffResourceSet.
- */
- private static void fillRequiredDifferences(EObject model) {
- EcoreUtil.CrossReferencer crossReferencer = new EcoreUtil.CrossReferencer(model) {
- /** Generic Serial ID. */
- private static final long serialVersionUID = 1L;
-
- {
- crossReference();
- }
- };
-
- final Iterator<EObject> diffs = model.eAllContents();
- while (diffs.hasNext()) {
- final EObject obj = diffs.next();
- if ((obj instanceof ModelElementChange || obj instanceof ReferenceChange)
- && !(obj instanceof AbstractDiffExtension)) {
- fillRequiredDifferences(crossReferencer, (DiffElement)obj);
- }
- }
- }
-
- /**
- * Fill the specified difference with a possible required other difference.
- *
- * @param crossReferencer
- * Cross referencer on the DiffModel or DiffResourceSet.
- * @param diff
- * The difference to fill.
- */
- private static void fillRequiredDifferences(EcoreUtil.CrossReferencer crossReferencer,
- final DiffElement diff) {
- final Set<EObject> refEObjects = getReferencedEObjects(diff);
- final Iterator<EObject> referencedEObjects = refEObjects.iterator();
- while (referencedEObjects.hasNext()) {
- final EObject referencedEObject = referencedEObjects.next();
- final Collection<Setting> settings = crossReferencer.get(referencedEObject);
- if (settings != null) {
- for (Setting setting : settings) {
- final EObject crossElt = setting.getEObject();
- linkDifferences(diff, crossElt);
- }
- }
- }
-
- }
-
- /**
- * Get the all the referenced model objects from the specified difference.
- *
- * @param diff
- * The difference.
- * @return The list of the model objects.
- */
- private static Set<EObject> getReferencedEObjects(final DiffElement diff) {
- EObject elt = null;
- final Set<EObject> referencedEObjects = new LinkedHashSet<EObject>();
- if (diff instanceof ModelElementChangeLeftTarget) {
- final ModelElementChangeLeftTarget mec = (ModelElementChangeLeftTarget)diff;
- elt = mec.getLeftElement();
- referencedEObjects.addAll(DiffReferenceUtil.getReferencedEObjects(elt, true));
- referencedEObjects.remove(elt);
- } else if (diff instanceof ModelElementChangeRightTarget) {
- final ModelElementChangeRightTarget mec = (ModelElementChangeRightTarget)diff;
- elt = mec.getRightElement();
- referencedEObjects.addAll(DiffReferenceUtil.getReferencedEObjects(elt, true));
- referencedEObjects.remove(elt);
- } else if (diff instanceof ReferenceChangeLeftTarget) {
- final ReferenceChangeLeftTarget rc = (ReferenceChangeLeftTarget)diff;
- final EObject leftTarget = rc.getLeftTarget();
- if (leftTarget != null) {
- referencedEObjects.add(leftTarget);
- }
- } else if (diff instanceof ReferenceChangeRightTarget) {
- final ReferenceChangeRightTarget rc = (ReferenceChangeRightTarget)diff;
- final EObject rightTarget = rc.getRightTarget();
- if (rightTarget != null) {
- referencedEObjects.add(rightTarget);
- }
- } else if (diff instanceof UpdateReference) {
- final UpdateReference ur = (UpdateReference)diff;
- final EObject leftTarget = ur.getLeftTarget();
- final EObject rightTarget = ur.getRightTarget();
- if (leftTarget != null && leftTarget != ur.getLeftElement()) {
- referencedEObjects.add(leftTarget);
- }
- if (rightTarget != null && rightTarget != ur.getRightElement()) {
- referencedEObjects.add(rightTarget);
- }
- }
- return referencedEObjects;
- }
-
- /**
- * Checks if the given difference {@link dest} is a good candidate to be added as required difference the
- * specified difference {@link origin}. A good candidate is a {@link ModelElementChange} which is not an
- * {@link AbstractDiffExtension}.
- *
- * @param origin
- * The difference to fill.
- * @param dest
- * The difference candidate.
- */
- private static void linkDifferences(final DiffElement origin, final EObject dest) {
- if (dest instanceof ModelElementChange && !(dest instanceof AbstractDiffExtension)) {
- final ModelElementChange mec = (ModelElementChange)dest;
- origin.getRequires().add(mec);
- /*
- * In the case of UpdateReference differences, we've set the left and/or right target to an
- * unmatched value. We need to null out that value now in order not to merge it and use the result
- * of the ModelElementChange merging.
- */
- if (origin instanceof UpdateReference) {
- final UpdateReference updateDiff = (UpdateReference)origin;
- final EObject changedElement;
- if (mec instanceof ModelElementChangeLeftTarget) {
- changedElement = ((ModelElementChangeLeftTarget)mec).getLeftElement();
- } else if (mec instanceof ModelElementChangeRightTarget) {
- changedElement = ((ModelElementChangeRightTarget)mec).getRightElement();
- } else {
- changedElement = null;
- }
- if (updateDiff.getLeftTarget() == changedElement) {
- updateDiff.setLeftTarget(null);
- } else if (updateDiff.getRightTarget() == changedElement) {
- updateDiff.setRightTarget(null);
- }
- }
- }
- }
-
- /**
- * Returns the best {@link IDiffEngine} for the given {@link MatchModel}.
- *
- * @param matchModel
- * The match model to differentiate.
- * @return The best {@link IDiffEngine} for the given {@link MatchModel}
- * @since 1.1
- */
- public static IDiffEngine getBestDiffEngine(MatchModel matchModel) {
- IDiffEngine engine = null;
- Resource resource = null;
-
- if (!matchModel.getLeftRoots().isEmpty()) {
- resource = matchModel.getLeftRoots().get(0).eResource();
- }
-
- final ModelIdentifier identifier = new ModelIdentifier(resource);
-
- if (EMFPlugin.IS_ECLIPSE_RUNNING
- && EMFComparePlugin.getDefault().getBoolean(
- EMFComparePreferenceConstants.PREFERENCES_KEY_ENGINE_SELECTION)) {
- final List<DiffEngineDescriptor> engines = DiffEngineRegistry.INSTANCE.getDescriptors(identifier);
-
- if (engines.size() == 1) {
- engine = engines.iterator().next().getEngineInstance();
- } else {
- engine = diffEngineSelector.selectDiffEngine(engines).getEngineInstance();
- }
- } else {
- engine = DiffEngineRegistry.INSTANCE.getHighestEngine(identifier);
- }
- return engine;
- }
-
- /**
- * Returns the best {@link IDiffEngine} for a file given its extension.
- *
- * @param extension
- * The extension of the file we need an {@link IDiffEngine} for.
- * @return The best {@link IDiffEngine} for the given file extension.
- * @deprecated use {@link DiffService#getBestDiffEngine(MatchModel)} instead.
- */
- @Deprecated
- public static IDiffEngine getBestDiffEngine(String extension) {
- if (EMFPlugin.IS_ECLIPSE_RUNNING
- && EMFComparePlugin.getDefault().getBoolean(
- EMFComparePreferenceConstants.PREFERENCES_KEY_ENGINE_SELECTION)) {
- final DiffEngineDescriptor desc = getBestDescriptor(extension);
- return desc.getEngineInstance();
- }
- return DiffEngineRegistry.INSTANCE.getHighestEngine(extension);
- }
-
- /**
- * Returns all {@link AbstractDiffExtension}s registered against the given {@link MatchModel}.
- *
- * @param matchModel
- * The {@link MatchModel} we need the {@link AbstractDiffExtension}s for.
- * @return All of the {@link AbstractDiffExtension}s registered against the {@link MatchModel}.
- * @since 1.1
- */
- public static Collection<AbstractDiffExtension> getCorrespondingDiffExtensions(MatchModel matchModel) {
- final Collection<AbstractDiffExtension> result = new ArrayList<AbstractDiffExtension>();
- if (EMFPlugin.IS_ECLIPSE_RUNNING) {
- Resource resource = null;
- URI uri = null;
-
- if (!matchModel.getLeftRoots().isEmpty()) {
- resource = matchModel.getLeftRoots().get(0).eResource();
- }
- if (resource != null) {
- uri = resource.getURI();
- }
-
- // FIXME engine identifiers should be wrapped into a ModelIdentifier once DiffExtension have their
- // own registry
- final ArrayList<String> engineIdentifiers = new ArrayList<String>();
- final String ns = ModelUtils.getCommonNamespace(resource);
- if (ns != null) {
- engineIdentifiers.add(ns);
- }
- final String ct = EclipseModelUtils.getCommonContentType(uri);
- if (ct != null) {
- engineIdentifiers.add(ct);
- }
- final String ext = ModelUtils.getCommonExtension(uri);
- if (ext != null) {
- engineIdentifiers.add(ext);
- }
-
- if (PARSED_DIFF_EXTENSIONS.containsKey(ALL_ID)) {
- for (final DiffExtensionDescriptor extensionDesc : PARSED_DIFF_EXTENSIONS.get(ALL_ID)) {
- result.add(extensionDesc.getDiffExtensionInstance());
- }
- }
- for (final String engineId : engineIdentifiers) {
- final Collection<DiffExtensionDescriptor> descs = PARSED_DIFF_EXTENSIONS.get(engineId);
- if (descs != null) {
- for (final DiffExtensionDescriptor desc : descs) {
- result.add(desc.getDiffExtensionInstance());
- }
- }
- }
- }
- return result;
- }
-
- /**
- * Returns all {@link AbstractDiffExtension}s registered against the given file <tt>extension</tt>.
- *
- * @param extension
- * The extension of the file we need the {@link AbstractDiffExtension}s for.
- * @return All of the {@link AbstractDiffExtension}s registered against the given file <tt>extension</tt>.
- * @deprecated use {@link DiffService#getCorrespondingDiffExtensions(MatchModel)} instead.
- */
- @Deprecated
- public static Collection<AbstractDiffExtension> getCorrespondingDiffExtensions(String extension) {
- final Collection<AbstractDiffExtension> result = new ArrayList<AbstractDiffExtension>();
- if (EMFPlugin.IS_ECLIPSE_RUNNING) {
-
- if (PARSED_DIFF_EXTENSIONS.containsKey(ALL_ID)) {
- for (final DiffExtensionDescriptor extensionDesc : PARSED_DIFF_EXTENSIONS.get(ALL_ID)) {
- result.add(extensionDesc.getDiffExtensionInstance());
- }
- }
- final Collection<DiffExtensionDescriptor> descs = PARSED_DIFF_EXTENSIONS.get(extension);
- if (descs != null) {
- for (final DiffExtensionDescriptor desc : descs) {
- result.add(desc.getDiffExtensionInstance());
- }
- }
- }
- return result;
- }
-
- /**
- * Sets the diff engine selector that is to be used.
- *
- * @param selector
- * the new engine selector.
- */
- public static void setDiffEngineSelector(IDiffEngineSelector selector) {
- diffEngineSelector = selector;
- }
-
- /**
- * Returns the best {@link DiffEngineDescriptor}.
- *
- * @param extension
- * The file extension we need a diff engine for.
- * @return The best {@link DiffEngineDescriptor}.
- */
- @Deprecated
- private static DiffEngineDescriptor getBestDescriptor(String extension) {
- final List<DiffEngineDescriptor> engines = DiffEngineRegistry.INSTANCE.getDescriptors(extension);
- DiffEngineDescriptor engine = null;
- if (engines.size() == 1) {
- engine = engines.iterator().next();
- } else if (engines.size() > 1) {
- engine = diffEngineSelector.selectDiffEngine(engines);
- }
- return engine;
- }
-
- /**
- * This will parse the given {@link IConfigurationElement configuration element} and return a descriptor
- * for it if it describes a DiffExtension.
- *
- * @param configElement
- * Configuration element to parse.
- * @return {@link DiffExtensionDescriptor} wrapped around <code>configElement</code> if it describes an
- * diff extension, <code>null</code> otherwise.
- */
- private static DiffExtensionDescriptor parseDiffExtension(IConfigurationElement configElement) {
- if (!configElement.getName().equals(TAG_DIFF_EXTENSION))
- return null;
- final DiffExtensionDescriptor desc = new DiffExtensionDescriptor(configElement);
- return desc;
- }
-
- /**
- * This will parse the currently running platform for extensions and store all the diff engines and diff
- * extensions that can be found.
- */
- private static void parseExtensionMetadata() {
- // FIXME Should be externalized in a DiffExtensionRegistry
- if (EMFPlugin.IS_ECLIPSE_RUNNING) {
- final IExtension[] extensions = Platform.getExtensionRegistry()
- .getExtensionPoint(DIFF_EXTENSION_EXTENSION_POINT).getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- final IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- final DiffExtensionDescriptor desc = parseDiffExtension(configElements[j]);
- storeDiffExtensionDescriptor(desc);
- }
- }
- }
- }
-
- /**
- * Stores the given descriptor in the {@link List} of known {@link DiffExtensionDescriptor}s.
- *
- * @param desc
- * Descriptor to be added to the list of all know descriptors.
- */
- private static void storeDiffExtensionDescriptor(DiffExtensionDescriptor desc) {
- // FIXME Should be externalized in a DiffExtensionRegistry
- final String[] namespaces = desc.getNamespace().split(SEPARATOR);
- for (String ns : namespaces) {
- if (!"".equals(ns)) { //$NON-NLS-1$
- if (!PARSED_DIFF_EXTENSIONS.containsKey(ns)) {
- PARSED_DIFF_EXTENSIONS.put(ns, new ArrayList<DiffExtensionDescriptor>());
- }
- final List<DiffExtensionDescriptor> set = PARSED_DIFF_EXTENSIONS.get(ns);
- set.add(desc);
- }
- }
-
- final String[] contentTypes = desc.getContentType().split(SEPARATOR);
- for (String ct : contentTypes) {
- if (!"".equals(ct)) { //$NON-NLS-1$
- if (!PARSED_DIFF_EXTENSIONS.containsKey(ct)) {
- PARSED_DIFF_EXTENSIONS.put(ct, new ArrayList<DiffExtensionDescriptor>());
- }
- final List<DiffExtensionDescriptor> set = PARSED_DIFF_EXTENSIONS.get(ct);
- set.add(desc);
- }
- }
-
- final String[] extensions = desc.getFileExtension().split(SEPARATOR);
- for (String ext : extensions) {
- if (!"".equals(ext)) { //$NON-NLS-1$
- if (!PARSED_DIFF_EXTENSIONS.containsKey(ext)) {
- PARSED_DIFF_EXTENSIONS.put(ext, new ArrayList<DiffExtensionDescriptor>());
- }
- final List<DiffExtensionDescriptor> set = PARSED_DIFF_EXTENSIONS.get(ext);
- set.add(desc);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/IDiffEngineSelector.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/IDiffEngineSelector.java
deleted file mode 100644
index f917e649c..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/IDiffEngineSelector.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diff.service;
-
-import java.util.List;
-
-/**
- * This can be subclassed for clients to display a diff engine selector to users when more than a single diff
- * engine are defined on the same file extension.
- *
- * @author <a href="laurent.goubet@obeo.fr">Laurent Goubet</a>
- * @since 1.0
- */
-public interface IDiffEngineSelector {
- /**
- * Implements the actual engine selection.
- *
- * @param engines
- * List of all candidates.
- * @return Engine the user selected.
- */
- DiffEngineDescriptor selectDiffEngine(List<DiffEngineDescriptor> engines);
-}
diff --git a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/package-info.java b/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/package-info.java
deleted file mode 100644
index 59a3c4c14..000000000
--- a/plugins/org.eclipse.emf.compare.diff/src/org/eclipse/emf/compare/diff/service/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * (non-javadoc)
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-/**
- * Provides differencing service for models.
- * <p>
- * Clients should always use {@link DiffService} when comparing models.
- * </p>
- * <p>
- * The differencing functionality can be used stand-alone.
- * </p>
- */
-package org.eclipse.emf.compare.diff.service; \ No newline at end of file

Back to the top