Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/api/config/IConfigurablePolicy.java2
-rw-r--r--plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/impl/policies/ConfigurableMatchPolicy.java9
-rw-r--r--plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java9
-rw-r--r--plugins/org.eclipse.emf.diffmerge.sirius/src/org/eclipse/emf/diffmerge/sirius/SiriusMatchPolicy.java9
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui.sirius/src/org/eclipse/emf/diffmerge/ui/sirius/SiriusTechnicalDifferenceCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/specification/ext/ComparisonConfiguration.java14
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryManager.java8
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/IDifferenceCategory.java6
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/AbstractDifferenceCategory.java9
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ConflictCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/IgnoredDifferenceCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MergedDifferenceCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MoveCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/OrderDifferenceCategory.java12
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/PropertyChangeCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ThreeWayOriginCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/UnmatchedElementCategory.java11
-rw-r--r--plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableDiffPolicy.java9
-rw-r--r--plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableMatchPolicy.java9
19 files changed, 110 insertions, 74 deletions
diff --git a/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/api/config/IConfigurablePolicy.java b/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/api/config/IConfigurablePolicy.java
index 0001765a..0733177e 100644
--- a/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/api/config/IConfigurablePolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/api/config/IConfigurablePolicy.java
@@ -17,7 +17,7 @@ package org.eclipse.emf.diffmerge.generic.api.config;
* and that can notify about configuration changes.
* @author Olivier Constant
*/
-public interface IConfigurablePolicy extends Cloneable {
+public interface IConfigurablePolicy {
/**
* Register the given listener on this notifier
diff --git a/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/impl/policies/ConfigurableMatchPolicy.java b/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/impl/policies/ConfigurableMatchPolicy.java
index 815c7f9e..0d028a30 100644
--- a/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/impl/policies/ConfigurableMatchPolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge.generic/src/org/eclipse/emf/diffmerge/generic/impl/policies/ConfigurableMatchPolicy.java
@@ -66,15 +66,6 @@ implements IConfigurablePolicy {
}
/**
- * @see java.lang.Object#clone()
- */
- @Override
- public ConfigurableMatchPolicy<E> clone() throws CloneNotSupportedException {
- // Override in subclasses if the configurable state is extended or modified
- return new ConfigurableMatchPolicy<E>(this);
- }
-
- /**
* Notify all registered listeners that the configuration changed
* @param property_p an optional object that describes the configuration property that changed
*/
diff --git a/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java b/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java
index 0b88325b..afc29ced 100644
--- a/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge.gmf/src/org/eclipse/emf/diffmerge/gmf/GMFMatchPolicy.java
@@ -104,15 +104,6 @@ public class GMFMatchPolicy extends ConfigurableMatchPolicy {
}
/**
- * @see java.lang.Object#clone()
- */
- @Override
- public GMFMatchPolicy clone() throws CloneNotSupportedException {
- // Override in subclasses if the configurable state is extended or modified
- return new GMFMatchPolicy(this);
- }
-
- /**
* Return a semantic ID for the given annotation
* @param annotation_p a non-null element
* @param scope_p a non-null scope that covers annotation_p
diff --git a/plugins/org.eclipse.emf.diffmerge.sirius/src/org/eclipse/emf/diffmerge/sirius/SiriusMatchPolicy.java b/plugins/org.eclipse.emf.diffmerge.sirius/src/org/eclipse/emf/diffmerge/sirius/SiriusMatchPolicy.java
index a395004d..d252fc36 100644
--- a/plugins/org.eclipse.emf.diffmerge.sirius/src/org/eclipse/emf/diffmerge/sirius/SiriusMatchPolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge.sirius/src/org/eclipse/emf/diffmerge/sirius/SiriusMatchPolicy.java
@@ -79,15 +79,6 @@ public class SiriusMatchPolicy extends GMFMatchPolicy {
}
/**
- * @see java.lang.Object#clone()
- */
- @Override
- public SiriusMatchPolicy clone() throws CloneNotSupportedException {
- // Override in subclasses if the configurable state is extended or modified
- return new SiriusMatchPolicy(this);
- }
-
- /**
* Return a semantic ID for the given annotation entry
* @param element_p a non-null element
* @param scope_p a non-null scope that covers element_p
diff --git a/plugins/org.eclipse.emf.diffmerge.ui.sirius/src/org/eclipse/emf/diffmerge/ui/sirius/SiriusTechnicalDifferenceCategory.java b/plugins/org.eclipse.emf.diffmerge.ui.sirius/src/org/eclipse/emf/diffmerge/ui/sirius/SiriusTechnicalDifferenceCategory.java
index 4e97802a..f5aca9bb 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui.sirius/src/org/eclipse/emf/diffmerge/ui/sirius/SiriusTechnicalDifferenceCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui.sirius/src/org/eclipse/emf/diffmerge/ui/sirius/SiriusTechnicalDifferenceCategory.java
@@ -17,6 +17,7 @@ import java.util.Collection;
import org.eclipse.emf.diffmerge.generic.api.diff.IDifference;
import org.eclipse.emf.diffmerge.generic.api.diff.IValuePresence;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.emf.diffmerge.ui.viewers.categories.AbstractDifferenceCategory;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.sirius.viewpoint.ViewpointPackage;
@@ -105,5 +106,15 @@ public class SiriusTechnicalDifferenceCategory extends AbstractDifferenceCategor
protected boolean isSiriusTechnicalFeature(EStructuralFeature feature_p) {
return SIRIUS_TECHNICAL_FEATURES.contains(feature_p);
}
+
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ SiriusTechnicalDifferenceCategory copied = new SiriusTechnicalDifferenceCategory();
+ copied.copyState(this);
+ return copied;
+ }
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/specification/ext/ComparisonConfiguration.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/specification/ext/ComparisonConfiguration.java
index 9eff30f9..cb1aee05 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/specification/ext/ComparisonConfiguration.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/specification/ext/ComparisonConfiguration.java
@@ -63,20 +63,14 @@ IComparisonConfigurator.Provider {
IMatchPolicy<EObject> matchPolicy = comparisonMethod_p.getMatchPolicy();
_keepMatchIDs = (matchPolicy == null)? false: matchPolicy.keepMatchIDs();
if (matchPolicy instanceof ConfigurableMatchPolicy) {
- try {
- _matchPolicy = ((ConfigurableMatchPolicy)matchPolicy).clone();
- } catch (CloneNotSupportedException e) {
- // Keep null value
- }
+ _matchPolicy = new ConfigurableMatchPolicy(
+ (ConfigurableMatchPolicy) matchPolicy);
}
// Diff policy
IDiffPolicy<EObject> diffPolicy = comparisonMethod_p.getDiffPolicy();
if (diffPolicy instanceof ConfigurableDiffPolicy) {
- try {
- _diffPolicy = ((ConfigurableDiffPolicy)diffPolicy).clone();
- } catch (CloneNotSupportedException e) {
- // Keep null value
- }
+ _diffPolicy = new ConfigurableDiffPolicy(
+ (ConfigurableDiffPolicy) diffPolicy);
}
// Merge policy
IMergePolicy<EObject> mergePolicy = comparisonMethod_p.getMergePolicy();
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryManager.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryManager.java
index cfa04422..36ff47df 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryManager.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryManager.java
@@ -961,12 +961,8 @@ public class CategoryManager {
public void setDefaultConfiguration() {
_defaultConfiguration.clear();
for (IDifferenceCategory category : getCategories()) {
- try {
- IDifferenceCategory clone = category.clone();
- _defaultConfiguration.add(clone);
- } catch (CloneNotSupportedException e) {
- // Exclude from default configuration and proceed
- }
+ IDifferenceCategory clone = category.copy();
+ _defaultConfiguration.add(clone);
}
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/IDifferenceCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/IDifferenceCategory.java
index 64f05ce0..5916917c 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/IDifferenceCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/IDifferenceCategory.java
@@ -18,12 +18,12 @@ import org.eclipse.emf.diffmerge.generic.api.diff.IDifference;
* A category of differences for UI purposes.
* @author Olivier Constant
*/
-public interface IDifferenceCategory extends IDifferenceCategoryItem, Cloneable {
+public interface IDifferenceCategory extends IDifferenceCategoryItem {
/**
- * @see Object#clone()
+ * Return a cloned object
*/
- IDifferenceCategory clone() throws CloneNotSupportedException;
+ IDifferenceCategory copy();
/**
* Set the state of this category to reflect the state of the given category
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/AbstractDifferenceCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/AbstractDifferenceCategory.java
index 678db6b3..908f7a25 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/AbstractDifferenceCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/AbstractDifferenceCategory.java
@@ -51,15 +51,6 @@ implements IDifferenceCategory {
}
/**
- * @see java.lang.Object#clone()
- */
- @Override
- public IDifferenceCategory clone() throws CloneNotSupportedException {
- // Increase visibility, see Cloneable
- return (IDifferenceCategory)super.clone();
- }
-
- /**
* @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copyState(org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory)
*/
public void copyState(IDifferenceCategory peer_p) {
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ConflictCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ConflictCategory.java
index b950c0f6..8c6016b1 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ConflictCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ConflictCategory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.diffmerge.generic.api.diff.IReferenceValuePresence;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -86,5 +87,15 @@ public class ConflictCategory extends AbstractDifferenceCategory {
public String getDescription(EMFDiffNode node_p) {
return Messages.ConflictCategory_Description;
}
+
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ ConflictCategory copied = new ConflictCategory();
+ copied.copyState(this);
+ return copied;
+ }
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/IgnoredDifferenceCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/IgnoredDifferenceCategory.java
index 40d88172..96eb3309 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/IgnoredDifferenceCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/IgnoredDifferenceCategory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -83,4 +84,14 @@ public class IgnoredDifferenceCategory extends AbstractDifferenceCategory {
return false;
}
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ IgnoredDifferenceCategory copied = new IgnoredDifferenceCategory();
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MergedDifferenceCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MergedDifferenceCategory.java
index 85ad34fa..8fdc510a 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MergedDifferenceCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MergedDifferenceCategory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -86,4 +87,14 @@ public class MergedDifferenceCategory extends AbstractDifferenceCategory {
return false;
}
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ MergedDifferenceCategory copied = new MergedDifferenceCategory();
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MoveCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MoveCategory.java
index 038df179..a2365cf5 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MoveCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/MoveCategory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -74,4 +75,14 @@ public class MoveCategory extends AbstractDifferenceCategory {
return Messages.MoveCategory_Text;
}
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ MoveCategory copied = new MoveCategory();
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/OrderDifferenceCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/OrderDifferenceCategory.java
index 74845aa5..03e792f7 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/OrderDifferenceCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/OrderDifferenceCategory.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -75,4 +76,15 @@ public class OrderDifferenceCategory extends AbstractDifferenceCategory {
return Messages.OrderDifferenceCategory_Text;
}
+
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ OrderDifferenceCategory copied = new OrderDifferenceCategory();
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/PropertyChangeCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/PropertyChangeCategory.java
index 2971ca55..071b1c65 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/PropertyChangeCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/PropertyChangeCategory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.diffmerge.generic.api.diff.IValuePresence;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -76,4 +77,14 @@ public class PropertyChangeCategory extends AbstractDifferenceCategory {
return Messages.PropertyChangeCategory_Text;
}
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ PropertyChangeCategory copied = new PropertyChangeCategory();
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ThreeWayOriginCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ThreeWayOriginCategory.java
index dd8dbd0a..899ee6d0 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ThreeWayOriginCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/ThreeWayOriginCategory.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.diffmerge.generic.api.diff.IPresenceDifference;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -107,4 +108,14 @@ public class ThreeWayOriginCategory extends AbstractSideRelatedDifferenceCategor
return node_p.isThreeWay();
}
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ ThreeWayOriginCategory copied = new ThreeWayOriginCategory(this.isLeftSide());
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/UnmatchedElementCategory.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/UnmatchedElementCategory.java
index 3362526d..2f7f673d 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/UnmatchedElementCategory.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/categories/UnmatchedElementCategory.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.diffmerge.generic.api.diff.IReferenceValuePresence;
import org.eclipse.emf.diffmerge.ui.EMFDiffMergeUIPlugin.ImageID;
import org.eclipse.emf.diffmerge.ui.Messages;
import org.eclipse.emf.diffmerge.ui.viewers.EMFDiffNode;
+import org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory;
import org.eclipse.swt.graphics.Image;
@@ -120,4 +121,14 @@ public class UnmatchedElementCategory extends AbstractSideRelatedDifferenceCateg
return result;
}
+ /**
+ * @see org.eclipse.emf.diffmerge.ui.viewers.IDifferenceCategory#copy()
+ */
+ @Override
+ public IDifferenceCategory copy() {
+ UnmatchedElementCategory copied = new UnmatchedElementCategory(this.isLeftSide());
+ copied.copyState(this);
+ return copied;
+ }
+
}
diff --git a/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableDiffPolicy.java b/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableDiffPolicy.java
index 214f403b..e0330093 100644
--- a/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableDiffPolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableDiffPolicy.java
@@ -57,15 +57,6 @@ implements IConfigurablePolicy {
}
/**
- * @see java.lang.Object#clone()
- */
- @Override
- public ConfigurableDiffPolicy clone() throws CloneNotSupportedException {
- // Override in subclasses if the configurable state is extended or modified
- return new ConfigurableDiffPolicy(this);
- }
-
- /**
* @see org.eclipse.emf.diffmerge.impl.policies.DefaultDiffPolicy#considerOrderedFeature(org.eclipse.emf.ecore.EStructuralFeature)
*/
@Override
diff --git a/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableMatchPolicy.java b/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableMatchPolicy.java
index 42627aef..2371c40c 100644
--- a/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableMatchPolicy.java
+++ b/plugins/org.eclipse.emf.diffmerge/src/org/eclipse/emf/diffmerge/impl/policies/ConfigurableMatchPolicy.java
@@ -163,15 +163,6 @@ org.eclipse.emf.diffmerge.generic.impl.policies.ConfigurableMatchPolicy<EObject>
}
/**
- * @see java.lang.Object#clone()
- */
- @Override
- public ConfigurableMatchPolicy clone() throws CloneNotSupportedException {
- // Override in subclasses if the configurable state is extended or modified
- return new ConfigurableMatchPolicy(this);
- }
-
- /**
* Get the exact set of fine-grained match criteria that must be used according to this policy
* @return a non-null, potentially empty, unmodifiable collection
*/

Back to the top