@Override
  public int getTodoItemsCount(@NotNull PsiFile file) {
    VirtualFile virtualFile = file.getVirtualFile();
    if (virtualFile == null) {
      return 0;
    }

    int total = 0;
    for (IndexPatternProvider provider : IndexPatternProvider.EP_NAME.getExtensionList()) {
      int count = TodoCacheManager.getInstance(myProject).getTodoCount(virtualFile, provider);
      if (count == -1) {
        return findTodoItems(file).length;
      }

      total += count;
    }

    return total;
  }
@Override
  public int getTodoItemsCount(@NotNull PsiFile file)