private static int problemsCount(@NotNull ProblemsViewPanel panel) {
    Root root = panel.getTreeModel().getRoot();
    return root == null ? 0 : root.getProblemCount();
  }
private static int problemsCount(@NotNull ProblemsViewPanel panel)