use of git4idea.rebase.GitRebaseActionDialog in project intellij-community by JetBrains.
the class GitAbstractRebaseAction method chooseRepository.
@Nullable
private GitRepository chooseRepository(@NotNull Project project, @NotNull Collection<GitRepository> repositories) {
GitRepository firstRepo = assertNotNull(ContainerUtil.getFirstItem(repositories));
if (repositories.size() == 1)
return firstRepo;
ArrayList<VirtualFile> roots = newArrayList(getRootsFromRepositories(repositories));
GitRebaseActionDialog dialog = new GitRebaseActionDialog(project, getTemplatePresentation().getText(), roots, firstRepo.getRoot());
dialog.show();
VirtualFile root = dialog.selectRoot();
if (root == null)
return null;
// TODO avoid root <-> GitRepository double conversion
return getRepositoryManager(project).getRepositoryForRootQuick(root);
}
Aggregations