ProgressTracker (final @NotNull List<? super VcsException> exceptions, @NotNull final RollbackProgressListener listener) { return new ProgressTracker() { @Override public void consume(ProgressEvent event) { if (event.getAction() == EventAction.REVERT) { final File file = event.getFile(); if (file != null) { listener.accept(file); } } if (event.getAction() == EventAction.FAILED_REVERT) { exceptions.add(new VcsException(message("error.revert.failed"))); } } @Override public void checkCancelled() throws ProcessCanceledException { listener.checkCanceled(); } }; }