use of git4idea.merge.GitMergeDialog in project intellij-community by JetBrains.
the class GitMerge method displayDialog.
@Nullable
@Override
protected DialogState displayDialog(@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) {
GitVcs vcs = GitVcs.getInstance(project);
if (vcs == null) {
return null;
}
final GitMergeDialog dialog = new GitMergeDialog(project, gitRoots, defaultRoot);
try {
dialog.updateBranches();
} catch (VcsException e) {
if (vcs.getExecutableValidator().checkExecutableAndShowMessageIfNeeded(null)) {
vcs.showErrors(Collections.singletonList(e), GitBundle.getString("merge.retrieving.branches"));
}
return null;
}
if (!dialog.showAndGet()) {
return null;
}
return new DialogState(dialog.getSelectedRoot(), GitBundle.message("merging.title", dialog.getSelectedRoot().getPath()), new Computable<GitLineHandler>() {
@Override
public GitLineHandler compute() {
return dialog.handler();
}
});
}
Aggregations