PsiElement () { final PsiElement navElement = getNavigationElement(); if (navElement != this) { return navElement; } final PsiClass cls = getContainingClass(); if (cls != null) { return cls; } return getContainingFile(); }