PsiElement (@NotNull PsiElement element) { PsiMember member = getStubOrPsiParentOfType(element, PsiMember.class); if (member == null && element instanceof PsiMember) { member = ((PsiMember)element).getContainingClass(); } return member != null ? member : element.getContainingFile(); }