private ConversionListener createConversionListener(StringBuilder errorBuffer) {
    return new ConversionListener() {
      @Override
      public void conversionNeeded() {
        reportMessage(1, InspectionsBundle.message("inspection.application.project.has.older.format.and.will.be.converted"));
      }

      @Override
      public void successfullyConverted(@NotNull Path backupDir) {
        reportMessage(1, InspectionsBundle.message(
          "inspection.application.project.was.successfully.converted.old.project.files.were.saved.to.0",
          backupDir.toString()));
      }

      @Override
      public void error(@NotNull String message) {
        errorBuffer.append(InspectionsBundle.message("inspection.application.cannot.convert.project.0", message))
          .append(System.lineSeparator());
      }

      @Override
      public void cannotWriteToFiles(@NotNull List<? extends Path> readonlyFiles) {
        StringBuilder files = new StringBuilder();
        for (Path file : readonlyFiles) {
          files.append(file.toString()).append("; ");
        }
        errorBuffer.append(InspectionsBundle
                             .message("inspection.application.cannot.convert.the.project.the.following.files.are.read.only.0",
                                      files.toString()))
          .append(System.lineSeparator());
      }
    };
  }
private ConversionListener createConversionListener(StringBuilder errorBuffer)