diff options
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusAdvancedQuery.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusAdvancedQuery.java index 1d48bac8449..b4f7ccda8fd 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusAdvancedQuery.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusAdvancedQuery.java @@ -227,7 +227,7 @@ public class PapyrusAdvancedQuery extends AbstractPapyrusQuery { if (numberOfStereotypeToBeApplied == ((Element) participants).getAppliedStereotypes().size()) { for (Stereotype stereotypeToBeApplied : stereotypeList.keySet()) { for (Stereotype stereotypeApplied : ((Element) participants).getAppliedStereotypes()) { - if (EcoreUtil.equals(stereotypeToBeApplied, stereotypeApplied)) { + if (EcoreUtil.getURI(stereotypeToBeApplied).equals(EcoreUtil.getURI(stereotypeApplied))) { numberOfStereotypeMatching++; } } @@ -250,7 +250,7 @@ public class PapyrusAdvancedQuery extends AbstractPapyrusQuery { for (Stereotype stereotypeToBeApplied : stereotypeList.keySet()) { for (Stereotype stereotypeApplied : ((Element) participants).getAppliedStereotypes()) { - if (EcoreUtil.equals(stereotypeToBeApplied, stereotypeApplied)) { + if (EcoreUtil.getURI(stereotypeToBeApplied).equals(EcoreUtil.getURI(stereotypeApplied))) { participantsToKeep.add(participants); added = true; break; @@ -384,7 +384,7 @@ public class PapyrusAdvancedQuery extends AbstractPapyrusQuery { EList<Stereotype> stereotypesApplied = ((Element) participant).getAppliedStereotypes(); for (Stereotype stereotype : stereotypesApplied) { for (Stereotype stereotypeSelected : stereotypeList.keySet()) { - if (EcoreUtil.equals(stereotype, stereotypeSelected)) { + if (EcoreUtil.getURI(stereotype).equals(EcoreUtil.getURI(stereotypeSelected))) { propertyList = this.getStereotypesAttributes(stereotype); for (Property property : propertyList) { @@ -393,7 +393,7 @@ public class PapyrusAdvancedQuery extends AbstractPapyrusQuery { evaluateAndAddToResult(value, property, pattern, participant, scopeEntry, stereotype); } else { for (Property property2 : (stereotypeList.get(stereotypeSelected))) { - if (EcoreUtil.equals(property, property2)) { // We loop through all selected attributes of all stereotypes, therefore this test is necessary to compare to currently searched stereotype's attributes + if (EcoreUtil.getURI(property).equals(EcoreUtil.getURI(property2))) { // We loop through all selected attributes of all stereotypes, therefore this test is necessary to compare to currently searched stereotype's attributes String value = StereotypeUtil.displayPropertyValueOnly(stereotype, property, (Element) participant, ""); evaluateAndAddToResult(value, property, pattern, participant, scopeEntry, stereotype); } 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; } |