コード例 #1
0
 @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));
 }
コード例 #2
0
 @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;
     }
   }
 }