private JComponent buildToolbar() {
		JComponent newToolBar = new VariableHeightPanel(true, 0, 0);
		newToolBar.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));

		boolean isFirstGroup = true;
		Set<Entry<String, List<ToolBarItemManager>>> entrySet = groupToItemsMap.entrySet();
		for (Entry<String, List<ToolBarItemManager>> entry : entrySet) {
			List<ToolBarItemManager> items = entry.getValue();
			if (items.isEmpty()) {
				continue;
			}
			if (!isFirstGroup) {
				insertSeparator(newToolBar);
			}

			addButtonsToToolBar(newToolBar, items);

			isFirstGroup = false;
		}
		return newToolBar;
	}
Returns a component to be used as a toolbar.
@return the toolbar component.
Ghidra/Framework/Docking/src/main/java/docking/menu/ToolBarManager.java