@Override
  public @NotNull List<AbstractTreeNode<?>> getChildrenImpl() {
    try {
      PsiFile psiFile = getValue();
      assert psiFile != null;

      FileViewProvider viewProvider = psiFile.getViewProvider();
      //noinspection deprecation
      if (viewProvider instanceof BackFileViewProvider) {
        //noinspection deprecation
        psiFile = ((BackFileViewProvider)viewProvider).getFrontPsiFile();
        if (psiFile == null) {
          return List.of();
        }
      }

      List<? extends TodoItem> items = findAllTodos(psiFile, myBuilder.getTodoTreeStructure().getSearchHelper());
      List<TodoItemNode> children = new ArrayList<>(items.size());

      Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
      if (document == null) {
        return List.of();
      }

      for (TodoItem todoItem : items) {
        if (todoItem.getTextRange().getEndOffset() > document.getTextLength()) continue;

        TodoFilter todoFilter = getToDoFilter();
        if (todoFilter != null && !todoFilter.contains(todoItem.getPattern())) continue;

        TodoItemNode node = new TodoItemNode(getProject(),
                                             new SmartTodoItemPointer(todoItem, document),
                                             myBuilder);
        children.add(node);
      }

      children.sort(Comparator.comparingInt(TodoFileNode::getOffset));
      return Collections.unmodifiableList(children);
    }
    catch (IndexNotReadyException e) {
      return List.of();
    }
  }
@Override
  public @NotNull List<AbstractTreeNode<?>> getChildrenImpl()