@Override
  public void addRoot(@NotNull VirtualFile file, @NotNull OrderRootType rootType) {
    LOG.assertTrue(isWritable());
    assert !isDisposed();

    final VirtualFilePointerContainer container = myRoots.get(rootType);
    container.add(file);
  }
 @Override
 public void addJarDirectory(
     @NotNull final VirtualFile file, final boolean recursive, @NotNull OrderRootType rootType) {
   assert !isDisposed();
   LOG.assertTrue(isWritable());
   final VirtualFilePointerContainer container = myRoots.get(rootType);
   container.add(file);
   myJarDirectories.add(rootType, file.getUrl(), recursive);
 }
 @Override
 @NotNull
 public VirtualFilePointerContainer clone(
     @NotNull Disposable parent, @Nullable VirtualFilePointerListener listener) {
   assert !myDisposed;
   VirtualFilePointerContainer clone =
       myVirtualFilePointerManager.createContainer(parent, listener);
   for (VirtualFilePointer pointer : myList) {
     clone.add(pointer.getUrl());
   }
   return clone;
 }
  @Override
  public void addExcludedFile(@NotNull VirtualFile file, @Nullable FrameworkType type) {
    convert();
    final String typeId = type != null ? type.getId() : null;
    if (typeId != null && myExcludedFrameworks.contains(typeId) || isFileExcluded(file, typeId)) {
      return;
    }

    final VirtualFilePointerContainer container = myExcludedFiles.get(typeId);
    if (typeId == null) {
      for (VirtualFilePointerContainer pointerContainer : myExcludedFiles.values()) {
        removeDescendants(file, pointerContainer);
      }
    } else {
      removeDescendants(file, container);
    }
    container.add(file);
  }