void (T oldSelectedValue, int oldSelectedIndex) { ApplicationManager.getApplication() .executeOnPooledThread(() -> DumbService.getInstance(myProject).runReadActionInSmartMode(() -> { try { List<T> listItems = getListItems(); List<ListItemPresentation> presentations = ContainerUtil.map(listItems, this::getPresentation); ApplicationManager.getApplication().invokeLater(() -> { updateList(oldSelectedValue, oldSelectedIndex, listItems, presentations); }); } finally { myList.setPaintBusy(false); } })); }