use of git4idea.ui.branch.GitCompareBranchesDialog in project intellij-community by JetBrains.
the class GithubCreatePullRequestWorker method showDiffDialog.
public void showDiffDialog(@Nullable final BranchInfo branch) {
if (branch == null) {
GithubNotifications.showWarningDialog(myProject, "Can't Show Diff", "Target branch is not selected");
return;
}
DiffInfo info;
try {
info = GithubUtil.computeValueInModalIO(myProject, "Collecting diff data...", indicator -> GithubUtil.runInterruptable(indicator, () -> getDiffInfo(branch)));
} catch (IOException e) {
GithubNotifications.showError(myProject, "Can't collect diff data", e);
return;
}
if (info == null) {
GithubNotifications.showErrorDialog(myProject, "Can't Show Diff", "Can't collect diff data");
return;
}
GitCompareBranchesDialog dialog = new GitCompareBranchesDialog(myProject, info.getTo(), info.getFrom(), info.getInfo(), myGitRepository, true);
dialog.show();
}
Aggregations