public static boolean isAlreadyStaticallyImported(PsiJavaCodeReferenceElement reference) {
    if (reference instanceof PsiMethodReferenceExpression) return false;
    PsiJavaCodeReferenceElement qualifier = ObjectUtils.tryCast(reference.getQualifier(), PsiJavaCodeReferenceElement.class);
    if (qualifier == null) return false;
    if (PsiTreeUtil.getParentOfType(reference, PsiImportStatementBase.class) != null) return false;
    if (GenericsUtil.isGenericReference(reference, qualifier)) return false;
    final PsiMember member = ObjectUtils.tryCast(reference.resolve(), PsiMember.class);
    if (member == null) return false;
    if (!(qualifier.resolve() instanceof PsiClass)) return false;
    return isStaticallyImported(member, reference) && isReferenceCorrectWithoutQualifier(reference, member);
  }
public static boolean isAlreadyStaticallyImported(PsiJavaCodeReferenceElement reference)