void (@NotNull List<? extends Change> changes, boolean rollbackChanges) { final List<ShelvedChangeList> result = new ArrayList<>(); new Task.Backgroundable(myProject, VcsBundle.message("shelve.changes.progress.title"), true) { @Override public void run(@NotNull ProgressIndicator indicator) { result.addAll(shelveChangesInSeparatedLists(changes, rollbackChanges)); } @Override public void onSuccess() { VcsNotifier.getInstance(myProject).notifySuccess(SHELVE_SUCCESSFUL, "", VcsBundle.message("shelve.successful.message")); if (result.size() == 1 && isShelfContentActive()) { ShelvedChangesViewManager.getInstance(myProject).startEditing(result.get(0)); } } }.queue(); }