Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/views/org.eclipse.papyrus.views.search')
-rw-r--r--plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AbstractResultEntry.java2
-rw-r--r--plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AttributeMatch.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AbstractResultEntry.java b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AbstractResultEntry.java
index 31050fa5112..1db41bb7c31 100644
--- a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AbstractResultEntry.java
+++ b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AbstractResultEntry.java
@@ -155,7 +155,7 @@ public abstract class AbstractResultEntry extends Match {
// support comparison against EObjects
// FIXME: This violates the symmetry contract of Object::equals!
if (obj instanceof EObject && this.getSource() instanceof EObject) {
- if (EcoreUtil.equals((EObject) this.getSource(), (EObject) obj)) {
+ if (EcoreUtil.getURI((EObject) this.getSource()).equals(EcoreUtil.getURI((EObject) obj))) {
if (((AbstractResultEntry) obj).getOffset() == this.getOffset()) {
if (((AbstractResultEntry) obj).getLength() == this.getLength()) {
return true;
diff --git a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AttributeMatch.java b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AttributeMatch.java
index 3331139faab..e3ed8e09156 100644
--- a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AttributeMatch.java
+++ b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/results/AttributeMatch.java
@@ -100,7 +100,7 @@ public class AttributeMatch extends ModelMatch {
if (obj instanceof AttributeMatch) {
if (super.equals(obj)) {
if (((AttributeMatch) obj).getSource() instanceof EObject && this.getSource() instanceof EObject) {
- if (EcoreUtil.equals((EObject) ((AttributeMatch) obj).getSource(), (EObject) this.getSource())) {
+ if (EcoreUtil.getURI((EObject) ((AttributeMatch) obj).getSource()).equals(EcoreUtil.getURI((EObject) this.getSource()))) {
if (obj.hashCode() == this.hashCode()) {
return true;
}

Back to the top