diff --git a/platform/lang-api/src/com/intellij/navigation/GotoRelatedItem.java b/platform/lang-api/src/com/intellij/navigation/GotoRelatedItem.java index 41e860243bc7..0ecc556d0d3e 100644 --- a/platform/lang-api/src/com/intellij/navigation/GotoRelatedItem.java +++ b/platform/lang-api/src/com/intellij/navigation/GotoRelatedItem.java @@ -75,4 +75,21 @@ public class GotoRelatedItem { } return items; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + GotoRelatedItem item = (GotoRelatedItem)o; + + if (myElement != null ? !myElement.equals(item.myElement) : item.myElement != null) return false; + + return true; + } + + @Override + public int hashCode() { + return myElement != null ? myElement.hashCode() : 0; + } } diff --git a/xml/dom-openapi/src/com/intellij/codeInsight/navigation/DomGotoRelatedItem.java b/xml/dom-openapi/src/com/intellij/codeInsight/navigation/DomGotoRelatedItem.java index 3a96803ce32b..9b699716ab0b 100644 --- a/xml/dom-openapi/src/com/intellij/codeInsight/navigation/DomGotoRelatedItem.java +++ b/xml/dom-openapi/src/com/intellij/codeInsight/navigation/DomGotoRelatedItem.java @@ -32,7 +32,6 @@ public class DomGotoRelatedItem extends GotoRelatedItem { myElement = element; } - @NotNull @Override public String getCustomName() { return myElement.getPresentation().getElementName();