diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java index 316aaa655917..df6677444a42 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java @@ -194,7 +194,7 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec @Override public boolean askIfShouldRemoveChangeLists(@NotNull List toAsk) { return myConfig.REMOVE_EMPTY_INACTIVE_CHANGELISTS != VcsShowConfirmationOption.Value.SHOW_CONFIRMATION || - showRemoveEmptyChangeListsProposal(myConfig, toAsk); + showRemoveEmptyChangeListsProposal(myProject, myConfig, toAsk); } }); } @@ -204,7 +204,9 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec * * @return true if the changelists have to be deleted, false if not. */ - private boolean showRemoveEmptyChangeListsProposal(@NotNull final VcsConfiguration config, @NotNull Collection lists) { + public static boolean showRemoveEmptyChangeListsProposal(@NotNull Project project, + @NotNull final VcsConfiguration config, + @NotNull Collection lists) { if (lists.isEmpty()) { return false; } @@ -216,10 +218,10 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec } else { question = String.format("Empty changelists
%s are no longer active.
Do you want to remove them?", - StringUtil.join(lists, (Function)list -> StringUtil.first(list.getName(), 30, true), "
")); + StringUtil.join(lists, (Function)list -> StringUtil.first(list.getName(), 30, true), "
")); } - VcsConfirmationDialog dialog = new VcsConfirmationDialog(myProject, "Remove Empty Changelist", "Remove", "Cancel", new VcsShowConfirmationOption() { + VcsConfirmationDialog dialog = new VcsConfirmationDialog(project, "Remove Empty Changelist", "Remove", "Cancel", new VcsShowConfirmationOption() { @Override public Value getValue() { return config.REMOVE_EMPTY_INACTIVE_CHANGELISTS;