void () { super.init(); setTitle(HgBundle.message("hg4idea.init.dialog.title")); if (myProject != null && (! myProject.isDefault())) { mySelectedDir = myProject.getBaseDir(); } mySelectWhereToCreateRadioButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { myTextFieldBrowser.setEnabled(true); updateEverything(); } }); myCreateRepositoryForTheRadioButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { myTextFieldBrowser.setEnabled(false); updateEverything(); } }); myTextFieldBrowser.getTextField().addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { updateEverything(); } }); myTextFieldBrowser.addBrowseFolderListener(HgBundle.message("hg4idea.init.destination.directory.title"), HgBundle.message("hg4idea.init.destination.directory.description"), myProject, myFileDescriptor); }