void () { ReadAction.nonBlocking(() -> { DataContext dataContext = getDataContext(); Object value = myResultsList.getSelectedValue(); String text = value instanceof RunAnythingItem ? ((RunAnythingItem)value).getCommand() : getSearchPattern(); RunAnythingProvider<?> provider = RunAnythingProvider.findMatchedProvider(dataContext, text); if (provider != null) { myChooseContextAction.setAvailableContexts(provider.getExecutionContexts(dataContext)); } return AnActionEvent.createFromDataContext(ActionPlaces.UNKNOWN, null, dataContext); }).finishOnUiThread(ModalityState.defaultModalityState(), event -> { ActionUtil.performDumbAwareUpdate(myChooseContextAction, event, false); }).submit(AppExecutorUtil.getAppExecutorService()); }