@Nullable
  @Override
  protected ValidationInfo doValidate() {
    updateOkAction();
    if (myUseCustomShelfDirectory.isSelected()) {
      File toFile = new File(myShelfDirectoryPath.getText());
      if (!toFile.exists()) return null;   // check that file can be created after OK button pressed;
      String validationError = null;
      if (!toFile.canRead()) {
        validationError = VcsBundle.message("configurable.shelf.storage.destination.shelf.directory.should.have.read.access");
      }
      if (!toFile.canWrite()) {
        validationError = VcsBundle.message("configurable.shelf.storage.destination.shelf.directory.should.have.write.access");
      }
      if (validationError != null) return new ValidationInfo(validationError, myShelfDirectoryPath);
    }
    return super.doValidate();
  }
@Nullable
  @Override
  protected ValidationInfo doValidate()