code: public void closeAllEmpty() {
  
          CmsDebugLog.getInstance().printLine("closing all empty");
          int childCount = getWidgetCount();
          for (int index = 0; index < childCount; index++) {
              CmsTreeItem item = getItem(index);
              if (item.isOpen()) {
                  item.closeAllEmptyChildren();
              }
          }
      }
docs: Closes all empty entries.<p>