private static boolean isTopLevelCall(PsiElement e) {
    if (e instanceof PsiReferenceExpression && e.getParent() instanceof PsiCallExpression) return true;
    return e instanceof PsiJavaCodeReferenceElement && !(e instanceof PsiExpression);
  }
private static boolean isTopLevelCall(PsiElement e)