private static void addFilePointers(@NotNull Set<? super SmartPsiElementPointer<PsiFile>> pointers,
                                      @NotNull PsiElement element,
                                      @NotNull SmartPointerManager manager) {
    if (element instanceof PsiFile) {
      pointers.add(manager.createSmartPsiElementPointer((PsiFile)element, (PsiFile)element));
    }
    else if (element instanceof PsiDirectory) {
      for (PsiElement child : element.getChildren()) {
        addFilePointers(pointers, child, manager);
      }
    }
  }
private static void addFilePointers(@NotNull Set<? super SmartPsiElementPointer<PsiFile>> pointers,
                                      @NotNull PsiElement element,
                                      @NotNull SmartPointerManager manager)