private void checkName() {
    final String name = getLibraryName();
    if (name.isEmpty()) {
      if (!myAllowEmptyName) {
        setErrorText(JavaUiBundle.message("error.message.library.name.is.not.specified"), myNameField);
      }
      return;
    }
    if (LibraryEditingUtil.libraryAlreadyExists(myModifiableModel, name)) {
      setErrorText(JavaUiBundle.message("error.message.library.0.already.exists", name), myNameField);
      return;
    }
    setErrorText(null);
  }
private void checkName()