ProgressTracker (@NotNull ProgressIndicator indicator, @NotNull File path, @NotNull WorkingCopyFormat format) { return new ProgressTracker() { @Override public void consume(ProgressEvent event) { if (event.getFile() != null) { if (EventAction.UPGRADED_PATH.equals(event.getAction())) { indicator.setText2(message("progress.details.upgraded.path", VcsUtil.getPathForProgressPresentation(event.getFile()))); } // fake event indicating cleanup start if (EventAction.UPDATE_STARTED.equals(event.getAction())) { indicator.setText(message("progress.text.performing.path.cleanup", path.getAbsolutePath())); } // fake event indicating upgrade start if (EventAction.UPDATE_COMPLETED.equals(event.getAction())) { indicator.setText(message("progress.text.converting.working.copy.format", path.getAbsolutePath(), format, myNewFormat)); } } } @Override public void checkCancelled() throws ProcessCanceledException { indicator.checkCanceled(); } }; }