void (ActionEvent e) { Set<String> currentIds = myReposModel.getItems().stream().map(RemoteRepositoryDescription::getId).collect(Collectors.toSet()); int bindLibrariesCount = countBindLibraries(myMutableEntityStorage, currentIds); if (bindLibrariesCount == 0) { resetReposModel(RemoteRepositoryDescription.DEFAULT_REPOSITORIES); return; } boolean resetConfirmed = MessageDialogBuilder.yesNo( JavaUiBundle.message("jar.repository.manager.confirm.reset.default.repositories.dialog.title"), JavaUiBundle.message("jar.repository.manager.confirm.reset.default.repositories.dialog.text", bindLibrariesCount) ).ask(myProject); if (resetConfirmed) { updateLibrariesRepositoryId(myMutableEntityStorage, currentIds, null); resetReposModel(RemoteRepositoryDescription.DEFAULT_REPOSITORIES); } }