void (boolean useDefaultSettings) { final NewLibraryConfiguration libraryConfiguration = useDefaultSettings ? myLibraryDescription.createNewLibraryWithDefaultSettings(getBaseDirectory()) : myLibraryDescription.createNewLibrary(myCreateButton, getBaseDirectory()); if (libraryConfiguration != null) { final NewLibraryEditor libraryEditor = new NewLibraryEditor(libraryConfiguration.getLibraryType(), libraryConfiguration.getProperties()); libraryEditor.setName(myLibrariesContainer.suggestUniqueLibraryName(libraryConfiguration.getDefaultLibraryName())); libraryConfiguration.addRoots(libraryEditor); if (myLibraryComboBoxModel.get(0) == null) { myLibraryComboBoxModel.remove(0); } myLibraryComboBoxModel.add(libraryEditor); myLibraryComboBoxModel.setSelectedItem(libraryEditor); myButtonEnumModel.setSelected(Choice.USE_LIBRARY); } }