void (@NotNull List<? extends HgRepository> repositories, @NotNull @NlsSafe String name, boolean isActive) { final Project project = Objects.requireNonNull(ContainerUtil.getFirstItem(repositories)).getProject(); if (StringUtil.isEmptyOrSpaces(name)) { VcsNotifier.getInstance(project).notifyError(BOOKMARK_NAME, HgBundle.message("hg4idea.hg.error"), HgBundle.message("hg4idea.bookmark.name.empty")); return; } new Task.Backgroundable(project, HgBundle.message("hg4idea.progress.bookmark", name)) { @Override public void run(@NotNull ProgressIndicator indicator) { for (HgRepository repository : repositories) { executeBookmarkCommandSynchronously(project, repository.getRoot(), name, isActive ? emptyList() : singletonList("--inactive")); } } }.queue(); }