From 5259e979bdce0c4132f994998c36e3babc523de5 Mon Sep 17 00:00:00 2001 From: Serega Vasiliev Date: Tue, 8 May 2012 15:10:29 +0200 Subject: [PATCH] IDEA-83757 Play framework: navigate from views back to controller methods --- .../intellij/navigation/GotoRelatedItem.java | 17 +++++++++++++++++ .../navigation/DomGotoRelatedItem.java | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) 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();