Exemple #1
0
 private static void buildStructure(final FSSnapshot.Node from, final Set<File> excluded) {
   final File nodeFile = from.getFile();
   if (nodeFile.isDirectory()) {
     if (isExcluded(excluded, nodeFile)) {
       return;
     }
     final File[] children = nodeFile.listFiles();
     if (children != null) {
       for (File child : children) {
         buildStructure(from.addChild(child), excluded);
       }
     }
   }
 }
Exemple #2
0
 private FSSnapshot buildSnapshot(Module module) {
   final Set<File> excludes = new HashSet<File>();
   for (String excludePath : (Collection<String>) module.getExcludes()) {
     excludes.add(new File(excludePath));
   }
   final FSSnapshot snapshot = new FSSnapshot(module);
   final Collection<String> roots =
       myCompilingTests
           ? (Collection<String>) module.getTestRoots()
           : (Collection<String>) module.getSourceRoots();
   for (String srcRoot : roots) {
     final FSSnapshot.Root root = snapshot.addRoot(new File(srcRoot), srcRoot);
     buildStructure(root.getNode(), excludes);
   }
   return snapshot;
 }