FileChooserDescriptor (@Nullable String libraryName) { final FileChooserDescriptor descriptor = new FileChooserDescriptor(true, true, true, false, true, true).withFileFilter(LIBRARY_ROOT_CONDITION); descriptor.setTitle(StringUtil.isEmpty(libraryName) ? ProjectBundle.message("library.attach.files.action") : ProjectBundle.message("library.attach.files.to.library.action", libraryName)); descriptor.setDescription(JavaUiBundle.message("library.java.attach.files.description")); return descriptor; }