Пример #1
0
 @Override
 @NotNull
 public VirtualFile[] getFiles(@NotNull OrderRootType rootType) {
   assert !isDisposed();
   final List<VirtualFile> expanded = new ArrayList<VirtualFile>();
   for (VirtualFile file : myRoots.get(rootType).getFiles()) {
     if (file.isDirectory()) {
       if (myJarDirectories.contains(rootType, file.getUrl())) {
         collectJarFiles(file, expanded, myJarDirectories.isRecursive(rootType, file.getUrl()));
         continue;
       }
     }
     expanded.add(file);
   }
   return VfsUtilCore.toVirtualFileArray(expanded);
 }
  @Override
  public VirtualFile[] getFiles(OrderRootType rootType) {
    List<VirtualFile> result = new ArrayList<VirtualFile>();
    for (LightFilePointer pointer : myRoots.get(rootType)) {
      final VirtualFile file = pointer.getFile();
      if (file == null) {
        continue;
      }

      if (file.isDirectory()) {
        final String url = file.getUrl();
        if (myJarDirectories.contains(rootType, url)) {
          LibraryImpl.collectJarFiles(file, result, myJarDirectories.isRecursive(rootType, url));
          continue;
        }
      }
      result.add(file);
    }
    return VfsUtil.toVirtualFileArray(result);
  }