void (ActionEvent e) { final T value = list.getSelectedValue(); @NonNls String defaultValue = "https://"; String initialValue = value == null ? defaultValue : adapter.toPresentation(value); final String text = Messages.showInputDialog( modificationDialogTitle, JavaUiBundle.message("dialog.title.add.repository.0", modificationDialogHint), Messages.getQuestionIcon(), initialValue, new URLInputValidator() ); if (StringUtil.isNotEmpty(text)) { model.add(adapter.create(text)); list.setSelectedValue(text, true); } }