Search in sources :

Example 1 with HgPullDialog

use of org.zmlx.hg4idea.ui.HgPullDialog in project intellij-community by JetBrains.

the class HgPullAction method execute.

@Override
protected void execute(@NotNull final Project project, @NotNull Collection<HgRepository> repos, @Nullable HgRepository selectedRepo) {
    final HgPullDialog dialog = new HgPullDialog(project, repos, selectedRepo);
    if (dialog.showAndGet()) {
        final String source = dialog.getSource();
        final HgRepository hgRepository = dialog.getRepository();
        new Task.Backgroundable(project, "Pulling changes from " + source, false) {

            @Override
            public void run(@NotNull ProgressIndicator indicator) {
                executePull(project, hgRepository, source);
                HgErrorUtil.markDirtyAndHandleErrors(project, hgRepository.getRoot());
            }
        }.queue();
    }
}
Also used : Task(com.intellij.openapi.progress.Task) ProgressIndicator(com.intellij.openapi.progress.ProgressIndicator) HgRepository(org.zmlx.hg4idea.repo.HgRepository) HgPullDialog(org.zmlx.hg4idea.ui.HgPullDialog)

Aggregations

ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 Task (com.intellij.openapi.progress.Task)1 HgRepository (org.zmlx.hg4idea.repo.HgRepository)1 HgPullDialog (org.zmlx.hg4idea.ui.HgPullDialog)1