boolean (TabInfo tab, Set<? super String> usedNames) { TabImpl t = getTabFor(tab); if (t == null) { return false; } Icon icon = t.getIcon(); GridImpl grid = getGridFor(tab); boolean hasToolbarContent = grid.updateGridUI(); List<Content> contents = grid.getContents(); String title = contents.size() > 1 ? t.getDisplayName() : null; if (title == null) { String name = myLayoutSettings.getDefaultDisplayName(t.getDefaultIndex()); if (name != null && contents.size() > 1 && !usedNames.contains(name)) { title = name; } else { title = Strings.join(contents, Content::getTabName, " | "); } } usedNames.add(title); if (!ClientProperty.isTrue(tab.getComponent(), SingleContentSupplier.DRAGGED_OUT_KEY)) { boolean hidden = true; for (Content content : contents) { if (!grid.isMinimized(content)) { hidden = false; break; } } tab.setHidden(hidden); } if (icon == null && contents.size() == 1) { icon = contents.get(0).getIcon(); } tab.setDragOutDelegate(myTabs.getTabs().size() > 1 || !isOriginal() ? myDragOutDelegate : null); Tab gridTab = grid.getTab(); tab.setText(title).setIcon(gridTab != null && gridTab.isDefault() && contents.size() > 1 ? null : icon); return hasToolbarContent; }