String (String message, String title, Icon icon, String[] values, @NlsSafe String initialValue, InputValidator validator) { if (isApplicationInUnitTestOrHeadless()) { return TestDialogManager.getTestInputImplementation().show(message, validator); } @SuppressWarnings("deprecation") ChooseDialog dialog = new ChooseDialog(message, title, icon, values, initialValue); dialog.setValidator(validator); dialog.getComboBox().setEditable(true); dialog.getComboBox().getEditor().setItem(initialValue); dialog.getComboBox().setSelectedItem(initialValue); dialog.show(); return dialog.getInputString(); }