PsiElement (@NotNull PsiElement element) { element = super.getPresentableElement(element); if (element instanceof PsiReferenceExpression) { final PsiElement parent = element.getParent(); if (parent instanceof PsiMethodCallExpression) { return parent; } } else if (element instanceof PsiJavaCodeReferenceElement) { final PsiElement parent = element.getParent(); if (parent instanceof PsiTypeElement || parent instanceof PsiNewExpression || parent instanceof PsiAnnotation || parent instanceof PsiAnonymousClass) { return parent; } } return element; }