private synchronized void doUpdate() {

		if (!isVisible) {
			return;
		}

		root.update(); // do this before rebuilding the menu, as new windows may be opened
		buildComponentMenu();
		Swing.runLater(() -> updateFocus());
	}
Builds the window menu containing a menu item for each component.
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java