@Override
  public @NotNull Collection<AbstractTreeNode<?>> getChildren() {
    Project project = myProject;
    if (project == null || project.isDisposed() || project.isDefault()) {
      return Collections.emptyList();
    }

    List<VirtualFile> topLevelContentRoots = ProjectViewDirectoryHelper.getInstance(project).getTopLevelRoots();

    Set<ModuleDescription> modules = new LinkedHashSet<>(topLevelContentRoots.size());
    for (VirtualFile root : topLevelContentRoots) {
      Module module = ModuleUtilCore.findModuleForFile(root, project);
      if (module != null) {
        modules.add(new LoadedModuleDescriptionImpl(module));
      }
      else {
        String unloadedModuleName = ProjectRootsUtil.findUnloadedModuleByContentRoot(root, project);
        if (unloadedModuleName != null) {
          ContainerUtil.addIfNotNull(modules, ModuleManager.getInstance(project).getUnloadedModuleDescription(unloadedModuleName));
        }
      }
    }


    List<AbstractTreeNode<?>> nodes = new ArrayList<>(modulesAndGroups(modules));

    String baseDirPath = project.getBasePath();
    VirtualFile baseDir = baseDirPath == null ? null : LocalFileSystem.getInstance().findFileByPath(baseDirPath);
    if (baseDir != null) {
      PsiManager psiManager = PsiManager.getInstance(project);
      VirtualFile[] files = baseDir.getChildren();
      ProjectFileIndex projectFileIndex = null;
      for (VirtualFile file : files) {
        if (!file.isDirectory()) {
          if (projectFileIndex == null) {
            projectFileIndex = ProjectFileIndex.getInstance(getProject());
          }
          if (projectFileIndex.getModuleForFile(file, false) == null) {
            PsiFile psiFile = psiManager.findFile(file);
            if (psiFile != null) {
              nodes.add(new PsiFileNode(getProject(), psiFile, getSettings()));
            }
          }
        }
      }
    }

    if (getSettings().isShowLibraryContents()) {
      nodes.add(new ExternalLibrariesNode(project, getSettings()));
    }
    return nodes;
  }
@Override
  public @NotNull Collection<AbstractTreeNode<?>> getChildren()