boolean (@NotNull PsiJavaCodeReferenceElement ref) { if (PsiTreeUtil.getParentOfType(ref, PsiImportStatementBase.class) != null) return false; if (ref instanceof PsiReferenceExpression) { PsiElement parent = ref.getParent(); return parent instanceof PsiReferenceExpression || parent instanceof PsiExpressionStatement; } return !inReturnTypeOfIncompleteGenericMethod(ref); }