boolean (@NotNull Project project, @NotNull final VcsConfiguration config, @NotNull Collection<? extends ChangeList> lists) { if (lists.isEmpty()) { return false; } String changeListName = lists.size() == 1 ? StringUtil.first(lists.iterator().next().getName(), 30, true) : StringUtil.join(lists, list -> StringUtil.first(list.getName(), 30, true), BR); String question = VcsBundle.message("changes.empty.changelists.no.longer.active", lists.size(), changeListName); VcsConfirmationDialog dialog = new VcsConfirmationDialog(project, VcsBundle.message("dialog.title.remove.empty.changelist"), VcsBundle.message("button.remove"), CommonBundle.getCancelButtonText(), new VcsShowConfirmationOption() { @Override public Value getValue() { return config.REMOVE_EMPTY_INACTIVE_CHANGELISTS; } @Override public void setValue(Value value) { config.REMOVE_EMPTY_INACTIVE_CHANGELISTS = value; } @Override public boolean isPersistent() { return true; } }, XmlStringUtil.wrapInHtml(question), VcsBundle.message("checkbox.remember.my.choice")); return dialog.showAndGet(); }