public void updateTabsUI(final boolean validateNow) {
    boolean hasToolbarContent = rebuildToolbar();

    Set<String> usedNames = new HashSet<>();
    List<TabInfo> tabs = this.tabs.getTabs();
    for (TabInfo each : tabs) {
      hasToolbarContent |= updateTabUI(each, usedNames);
    }
    int tabsCount = tabs.size() + myChildren.stream().mapToInt(child -> child.tabs.getTabCount()).sum();
    boolean hideTabs = !hasToolbarContent && tabsCount <= 1 && myOriginal == null;
    this.tabs.getPresentation().setHideTabs(hideTabs);
    this.tabs.updateTabActions(validateNow);

    if (validateNow) {
      this.tabs.sortTabs(myTabsComparator);
    }
  }
public void updateTabsUI(final boolean validateNow)