void (int[] indices, JList<VirtualFile> list) { List<Pair<VirtualFile, Integer>> removed = new ArrayList<>(); for (int i : indices) { removed.add(Pair.create(getListModel().get(i), i)); } ListUtil.removeIndices(list, myPathListModel.remove(removed)); list.updateUI(); setModified(true); }