void (@Nullable String searchText) { if (StringUtil.isEmpty(searchText)) { searchText = mySelectedText; } if (StringUtil.isNotEmpty(searchText)) { myRunAnythingUI.getSearchField().setText(searchText); } }