String (SegmentReader reader, Project project) { String prompt = reader.readLimitedString(); String defaultValue = reader.readLimitedString(); String[] choices = reader.readStringArray(); MessagesEx.BaseInputInfo question; if (choices.length == 0) { MessagesEx.InputInfo inputInfo = new MessagesEx.InputInfo(project); inputInfo.setDefaultValue(defaultValue); question = inputInfo; } else { MessagesEx.ChoiceInfo choiceInfo = new MessagesEx.ChoiceInfo(project); choiceInfo.setChoices(choices, defaultValue); question = choiceInfo; } question.setIcon(Messages.getQuestionIcon()); question.setTitle(AntBundle.message("user.inout.request.ant.build.input.dialog.title")); question.setMessage(prompt); question.setIcon(Messages.getQuestionIcon()); return question.forceUserInput(); }