Library (String name, @Nullable PersistentLibraryKind<?> type, @Nullable ProjectModelExternalSource externalSource) { final Library library = getLibrariesModifiableModel().createLibrary(name, type, externalSource); final BaseLibrariesConfigurable configurable = ProjectStructureConfigurable.getInstance(myProject).getConfigurableFor(library); configurable.createLibraryNode(library); return library; }