Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Goubet2013-02-13 05:54:35 -0500
committerLaurent Goubet2013-02-13 05:54:35 -0500
commitdbb9d0adbf6908a99821a0a9e101fa264aebbf1d (patch)
tree88c40d0ad339751184dc118710e54daedc1b966d
parent0441460822b8c07f38e73b7d0e4c6d47217ad610 (diff)
downloadorg.eclipse.emf.compare-dbb9d0adbf6908a99821a0a9e101fa264aebbf1d.tar.gz
org.eclipse.emf.compare-dbb9d0adbf6908a99821a0a9e101fa264aebbf1d.tar.xz
org.eclipse.emf.compare-dbb9d0adbf6908a99821a0a9e101fa264aebbf1d.zip
Fixing/suppressing warnings.
-rw-r--r--plugins/org.eclipse.emf.compare/src-gen/org/eclipse/emf/compare/impl/MatchResourceImpl.java2
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/emfcomparemessages.properties4
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java6
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IMerger.java6
4 files changed, 12 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.compare/src-gen/org/eclipse/emf/compare/impl/MatchResourceImpl.java b/plugins/org.eclipse.emf.compare/src-gen/org/eclipse/emf/compare/impl/MatchResourceImpl.java
index 66d9efaf3..1e31cb775 100644
--- a/plugins/org.eclipse.emf.compare/src-gen/org/eclipse/emf/compare/impl/MatchResourceImpl.java
+++ b/plugins/org.eclipse.emf.compare/src-gen/org/eclipse/emf/compare/impl/MatchResourceImpl.java
@@ -44,6 +44,8 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
*
* @generated
*/
+//Supressing warnings : generated code
+@SuppressWarnings("all")
public class MatchResourceImpl extends MinimalEObjectImpl implements MatchResource {
/**
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/emfcomparemessages.properties b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/emfcomparemessages.properties
index ebbe76290..cd1784e52 100644
--- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/emfcomparemessages.properties
+++ b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/emfcomparemessages.properties
@@ -21,4 +21,6 @@ DiffUtil.IllegalDiff=Cannot determine an insertion index for {0} differences.
DiffUtil.IllegalFeature=Feature {0} is not multi-valued.
ResourceAttachmentChangeSpec.MissingMatch = Could not locate resource match for {0}
-ResourceAttachmentChangeSpec.MissingRS = Could not locate resource set to create {0} \ No newline at end of file
+ResourceAttachmentChangeSpec.MissingRS = Could not locate resource set to create {0}
+
+IMerger.MissingMerger = No merger found for diff {0} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java
index 8fe9485bd..6befb7146 100644
--- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java
+++ b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java
@@ -86,6 +86,7 @@ public class ComparisonSpec extends ComparisonImpl {
eAdapters().add(diffCrossReferencer);
}
+ final EList<Diff> result;
Iterable<Diff> diffOnElement = filter(getInverse(element, diffCrossReferencer), Diff.class);
final Match match = getMatch(element);
if (match != null) {
@@ -102,10 +103,11 @@ public class ComparisonSpec extends ComparisonImpl {
origin = filter(getInverse(match.getOrigin(), diffCrossReferencer), Diff.class);
}
Set<Diff> crossRefs = ImmutableSet.copyOf(Iterables.concat(diffOnElement, left, right, origin));
- return new BasicEList<Diff>(crossRefs);
+ result = new BasicEList<Diff>(crossRefs);
} else {
- return new BasicEList<Diff>(ImmutableSet.copyOf(diffOnElement));
+ result = new BasicEList<Diff>(ImmutableSet.copyOf(diffOnElement));
}
+ return result;
}
/**
diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IMerger.java b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IMerger.java
index 707b8c5b6..0bd2f3d4e 100644
--- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IMerger.java
+++ b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/merge/IMerger.java
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.emf.common.util.Monitor;
import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.EMFCompareMessages;
/**
* Mergers are used by EMF Compare to merge specific differences from one side to the other. A number of
@@ -267,9 +268,8 @@ public interface IMerger {
}
if (ret == null) {
- // TODO externalize and use accurate Exception.
- throw new IllegalStateException("No merger found for diff "
- + target.getClass().getSimpleName());
+ throw new IllegalStateException(EMFCompareMessages.getString("IMerger.MissingMerger", target //$NON-NLS-1$
+ .getClass().getSimpleName()));
}
return ret;

Back to the top