Examples of FilterVirtualFileVisitor


Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      MockVFSContext context = registerSimpleVFSContext();
      context.getMockRoot().setLeaf(false);
     
      VirtualFile file = VFS.getRoot(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      file.visit(visitor);
     
      assertEmpty(filter.getVisited());
   }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

   {
      MockVFSContext context = registerSimpleVFSContext();
     
      VirtualFile file = VFS.getRoot(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      try
      {
         file.visit(visitor);
         fail("Should not be here!");
      }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      MockVFSContext context = registerSimpleVFSContextWithChildren();
      context.getMockRoot().setIOException("getChildren");
     
      VirtualFile file = VFS.getRoot(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      try
      {
         file.visit(visitor);
         fail("Should not be here!");
      }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      VirtualFile child2 = getChildHandler(context, "child2").getVirtualFile();
      VirtualFile child3 = getChildHandler(context, "child3").getVirtualFile();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      vfs.visit(visitor);
     
      List<VirtualFile> expected = new ArrayList<VirtualFile>();
      expected.add(child1);
      expected.add(child2);
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      VirtualFile child2 = getChildHandler(context, "child2").getVirtualFile();
      VirtualFile child3 = getChildHandler(context, "child3").getVirtualFile();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      vfs.visit(visitor);
     
      List<VirtualFile> expected = new ArrayList<VirtualFile>();
      expected.add(child1);
      expected.add(child2);
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      MockVFSContext context = registerSimpleVFSContext();
      context.getMockRoot().setLeaf(false);
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      vfs.visit(visitor);

      assertEmpty(filter.getVisited());
   }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

   {
      MockVFSContext context = registerSimpleVFSContext();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      try
      {
         vfs.visit(visitor);
         fail("Should not be here!");
      }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      MockVFSContext context = registerSimpleVFSContextWithChildren();
      context.getMockRoot().setIOException("getChildren");
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      try
      {
         vfs.visit(visitor);
         fail("Should not be here!");
      }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      if (isLeaf())
         throw new IllegalStateException("File cannot contain children: " + this);

      if (filter == null)
         filter = MatchAllVirtualFileFilter.INSTANCE;
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, null);
      visit(visitor);
      return visitor.getMatched();
   }
View Full Code Here

Examples of org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor

      if (isLeaf())
         throw new IllegalStateException("File cannot contain children: " + this);

      if (filter == null)
         filter = MatchAllVirtualFileFilter.INSTANCE;
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, VisitorAttributes.RECURSE);
      visit(visitor);
      return visitor.getMatched();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.