From dee971c2f1ee835224b4e7a261c92b216328dd2e Mon Sep 17 00:00:00 2001 From: Eugene Kudelevsky Date: Tue, 29 Mar 2011 17:27:54 +0400 Subject: [PATCH] do not show duplicate containing file when navigation element is a file itself --- .../src/com/intellij/navigation/PsiGotoRelatedItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-api/src/com/intellij/navigation/PsiGotoRelatedItem.java b/platform/lang-api/src/com/intellij/navigation/PsiGotoRelatedItem.java index 2b3c9e75c151..7980a22c6386 100644 --- a/platform/lang-api/src/com/intellij/navigation/PsiGotoRelatedItem.java +++ b/platform/lang-api/src/com/intellij/navigation/PsiGotoRelatedItem.java @@ -50,6 +50,6 @@ public class PsiGotoRelatedItem extends GotoRelatedItem { @Override public PsiFile getContainingFile() { - return myElement.getContainingFile(); + return myElement instanceof PsiFile ? null : myElement.getContainingFile(); } }