@NotNull @Override public JpsLibrary addModuleLibrary(@NotNull JpsLibraryType<?> type, @NotNull String name) { final JpsElementCollectionImpl<JpsLibraryImpl> collection = myContainer.getChild(JpsLibraryKind.LIBRARIES_COLLECTION_KIND); return collection.addChild(new JpsLibraryImpl(name, type)); }
@Override public void removeSourceRoot(@NotNull JpsModuleSourceRootType rootType, @NotNull String url) { final JpsElementCollectionImpl<JpsModuleSourceRootImpl> roots = myContainer.getChild(JpsModuleSourceRootKind.ROOT_COLLECTION_KIND); for (JpsModuleSourceRootImpl root : roots.getElements()) { if (root.getRootType().equals(rootType) && root.getUrl().equals(url)) { roots.removeChild(root); break; } } }