DiffRequestProducer (@NotNull final AbstractFilePatchInProgress patchInProgress) { final String beforePath = patchInProgress.getPatch().getBeforeName(); final String afterPath = patchInProgress.getPatch().getAfterName(); return new DiffRequestProducer() { @NotNull @Override public String getName() { final File ioCurrentBase = patchInProgress.getIoCurrentBase(); return ioCurrentBase == null ? patchInProgress.getCurrentPath() : ioCurrentBase.getPath(); } @NotNull @Override public DiffRequest process(@NotNull UserDataHolder context, @NotNull ProgressIndicator indicator) throws DiffRequestProducerException, ProcessCanceledException { throw new DiffRequestProducerException( VcsBundle.message("changes.error.cannot.find.base.for.path", beforePath != null ? beforePath : afterPath)); } }; }