NewLibraryConfiguration (@Nullable LibraryType type, @NotNull JComponent parentComponent, @NotNull Project project) { final NewLibraryConfiguration configuration; final VirtualFile baseDir = project.getBaseDir(); if (type != null) { configuration = type.createNewLibrary(parentComponent, baseDir, project); } else { configuration = LibraryTypeService .getInstance().createLibraryFromFiles(new DefaultLibraryRootsComponentDescriptor(), parentComponent, baseDir, null, project); } if (configuration == null) return null; return configuration; }