use of com.intellij.openapi.vcs.merge.MergeDialogCustomizer in project intellij-community by JetBrains.
the class GitPreservingProcess method configureSaver.
/**
* Configures the saver: i.e. notifications and texts for the GitConflictResolver used inside.
*/
@NotNull
private GitChangesSaver configureSaver(@NotNull GitVcsSettings.UpdateChangesPolicy saveMethod) {
GitChangesSaver saver = GitChangesSaver.getSaver(myProject, myGit, myProgressIndicator, myStashMessage, saveMethod);
MergeDialogCustomizer mergeDialogCustomizer = new MergeDialogCustomizer() {
@Override
public String getMultipleFileMergeDescription(@NotNull Collection<VirtualFile> files) {
return String.format("<html>Uncommitted changes that were saved before %s have conflicts with files from <code>%s</code></html>", myOperationTitle, myDestinationName);
}
@Override
public String getLeftPanelTitle(@NotNull VirtualFile file) {
return "Uncommitted changes from stash";
}
@Override
public String getRightPanelTitle(@NotNull VirtualFile file, VcsRevisionNumber revisionNumber) {
return String.format("<html>Changes from <b><code>%s</code></b></html>", myDestinationName);
}
};
GitConflictResolver.Params params = new GitConflictResolver.Params().setReverse(true).setMergeDialogCustomizer(mergeDialogCustomizer).setErrorNotificationTitle("Local changes were not restored");
saver.setConflictResolverParams(params);
return saver;
}
Aggregations