@Override
    protected @Nullable ValidationInfo doValidate() {
      String name = getName();
      PsiDirectory rootDir = getRootDir();
      LanguageLevel level = rootDir != null ? PsiUtil.getLanguageLevel(rootDir) : LanguageLevel.HIGHEST;

      if (PsiNameHelper.getInstance(myProject).isIdentifier(name, level)) {
        return null;
      }
      return new ValidationInfo(JavaBundle.message("error.text.this.is.not.a.valid.java.class.name"), myNameTextField);
    }
@Override
    protected @Nullable ValidationInfo doValidate()