@NotNull
  @Override
  public List<? extends RootDetector> getRootDetectors() {
    List<RootDetector> results = new ArrayList<>();
    results.add(new DescendentBasedRootFilter(OrderRootType.CLASSES, false, "classes",
                                              file -> FileTypeRegistry.getInstance().isFileOfType(file, JavaClassFileType.INSTANCE)
                                                      //some libraries store native libraries inside their JAR files and unpack them dynamically so we should detect such JARs as classes roots
                                                      || file.getFileSystem() instanceof JarFileSystem && isNativeLibrary(file)));
    results.add(DescendentBasedRootFilter.createFileTypeBasedFilter(OrderRootType.CLASSES, true, JavaClassFileType.INSTANCE, "jar directory"));
    results.addAll(LibrarySourceRootDetectorUtil.JAVA_SOURCE_ROOT_DETECTOR.getExtensionList());
    results.add(DescendentBasedRootFilter.createFileTypeBasedFilter(OrderRootType.SOURCES, true, JavaFileType.INSTANCE, "source archive directory"));
    results.add(new JavadocRootDetector());
    results.add(createAnnotationsRootDetector());
    results.add(new NativeLibraryRootFilter());
    return results;
  }
@NotNull
  @Override
  public List<? extends RootDetector> getRootDetectors()