static Pair<List<Pair<Boolean, List<Integer>>>, List<XmlTag>> generateTableTree(PsiElement root) {
    List<Pair<Boolean, List<Integer>>> list = new ArrayList<>();
    List<XmlTag> tags = new ArrayList<>();
    generateTableList(root, false, list, tags);
    List<Pair<Boolean, List<Integer>>> tree = new ArrayList<>();
    int tr = 0;
    for (int i = 0; i < list.size(); i++) {
      tree.add(new Pair<>(list.get(i).first, new ArrayList<>()));
      final String name = StringUtil.toLowerCase(tags.get(i).getLocalName());
      if (TR.equals(name)) {
        tree.get(0).second.add(i);
        tr = i;
      } else if (TD.equals(name) || TH.equals(name)) {
        tree.get(tr).second.add(i);
      }
    }

    return Pair.create(tree, tags);
  }
static Pair<List<Pair<Boolean, List<Integer>>>, List<XmlTag>> generateTableTree(PsiElement root)