void (@NotNull Project project, @NotNull JBList<RecentLocationItem> list, @NotNull RecentLocationsDataModel data, boolean showChanged) { List<RecentLocationItem> selectedValue = list.getSelectedValuesList(); if (selectedValue.isEmpty()) { return; } int index = list.getSelectedIndex(); data.removeItems(project, showChanged, selectedValue); updateModel(list, data, showChanged); if (list.getModel().getSize() > 0) { ScrollingUtil.selectItem(list, index < list.getModel().getSize() ? index : index - 1); } }