private void buildComponentMenu() {

		if (!isDocking || !isVisible) {
			return;
		}

		if (isWindowMenuShowing()) {
			// Stop menu items from being disposed; this causes exceptions when they are pressed
			scheduleUpdate();
			return;
		}

		tool.getToolActions().removeActions(DOCKING_WINDOWS_OWNER);

		Map<String, List<ComponentPlaceholder>> permanentMap =
			LazyMap.lazyMap(new HashMap<>(), menuName -> new ArrayList<>());
		Map<String, List<ComponentPlaceholder>> transientMap =
			LazyMap.lazyMap(new HashMap<>(), menuName -> new ArrayList<>());

		Map<ComponentProvider, ComponentPlaceholder> map =
			placeholderManager.getActiveProvidersToPlaceholders();
		Set<Entry<ComponentProvider, ComponentPlaceholder>> entrySet = map.entrySet();
		for (Entry<ComponentProvider, ComponentPlaceholder> entry : entrySet) {
			ComponentProvider provider = entry.getKey();
			ComponentPlaceholder placeholder = entry.getValue();

			String subMenuName = provider.getWindowSubMenuName();
			if (provider.isTransient() && !provider.isSnapshot()) {
				transientMap.get(subMenuName).add(placeholder);
			}
			else {
				permanentMap.get(subMenuName).add(placeholder);
			}
		}
		promoteSingleMenuGroups(permanentMap);
		promoteSingleMenuGroups(transientMap);

		createActions(transientMap);
		createActions(permanentMap);
		createWindowActions();

		actionToGuiMapper.update();
	}
Builds the window menu containing a menu item for each component.
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java