void (AnActionButton button) { List<QuickList> items = model.getItems(); ChooseActionsDialog dialog = new ChooseActionsDialog(myActionsList, KeymapManager.getInstance().getActiveKeymap(), items.toArray( new QuickList[0])); if (dialog.showAndGet()) { String[] ids = dialog.getTreeSelectedActionIds(); for (String id : ids) { includeActionId(id); } List<String> list = myActionsModel.getItems(); int size = list.size(); ListSelectionModel selectionModel = myActionsList.getSelectionModel(); if (size > 0) { selectionModel.removeIndexInterval(0, size - 1); } for (String id1 : ids) { int idx = list.lastIndexOf(id1); if (idx >= 0) { selectionModel.addSelectionInterval(idx, idx); } } } }