docs: public void buildCategoryTree(List<CmsCategoryTreeEntry> treeEntries, Collection<String> selectedCategories) {
  
          m_valuesSet = 0;
          m_allSidePath.clear();
          m_categories.removeFromParent();
          m_categories.clear();
  
          if ((treeEntries != null) && !treeEntries.isEmpty()) {
              // add the first level and children
              for (CmsCategoryTreeEntry category : treeEntries) {
                  // set the category tree item and add to list
                  CmsTreeItem treeItem;
                  boolean hasSelectedChildren = hasSelectedChildren(category.getChildren(), selectedCategories);
                  if (!category.getPath().isEmpty() || hasSelectedChildren) {
                      if (m_selectParent || !hasSelectedChildren) {
                          treeItem = buildTreeItem(category, selectedCategories, false);
                          if (treeItem.isOpen()) {
                              m_allSidePath.add(category.getSitePath());
                          }
                      } else {
                          treeItem = buildTreeItem(category, selectedCategories, true);
                      }
                      if (treeItem.isOpen()) {
                          m_singleSidePath = category.getSitePath();
  
                          m_valuesSet++;
                          addChildren(treeItem, category.getChildren(), selectedCategories);
                      }
                  }
              }
          }
          m_scrollPanel.add(m_categories);
          m_scrollPanel.onResizeDescendant();
  
      }