private Set<VirtualFile> findFiles(VirtualFile file) {
    Set<VirtualFile> files = new HashSet<>(0);
    Project project = thumbnailView.getProject();
    if (!project.isDisposed()) {
      ProjectRootManager rootManager = ProjectRootManager.getInstance(project);
      boolean projectIgnored = rootManager.getFileIndex().isExcluded(file);

      if (!projectIgnored && !FileTypeManager.getInstance().isFileIgnored(file)) {
        ImageFileTypeManager typeManager = ImageFileTypeManager.getInstance();
        if (file.isDirectory()) {
          if (thumbnailView.isRecursive()) {
            files.addAll(findFiles(file.getChildren()));
          }
          else if (isImagesInDirectory(file)) {
            files.add(file);
          }
        }
        else if (typeManager.isImage(file)) {
          files.add(file);
        }
      }
    }
    return files;
  }
private Set<VirtualFile> findFiles(VirtualFile file)