void (Project project, List<String> items, String title, Consumer<String> callback) { DataManager.getInstance().getDataContextFromFocus().doWhenDone((Consumer<DataContext>)dataContext -> JBPopupFactory.getInstance().createPopupChooserBuilder(items) .setTitle(title) .setItemChosenCallback(callback) .setNamerForFiltering(o -> o) .createPopup() .showInBestPositionFor(dataContext)); }