public static boolean isValidName(@NotNull String name, @NotNull PsiElement scopeElement, PsiElement call) {
    if (isValidNameDown(name, scopeElement, call)) {
      if (!(scopeElement instanceof GroovyFileBase)) {
        return isValidNameUp(name, scopeElement, call);
      } else {
        return true;
      }
    } else {
      return false;
    }
  }
public static boolean isValidName(@NotNull String name, @NotNull PsiElement scopeElement, PsiElement call)