private void updatePopupMenu(boolean isSingleNodeSelected) {
		if (isSingleNodeSelected) {
			setPopupMenuData(new MenuData(new String[] { "Collapse" }, collapseIcon, "Tree"));
		}
		else {
			setPopupMenuData(new MenuData(new String[] { "Collapse All" }, collapseIcon, "Tree"));
		}
	}
This action handles recursively collapsing nodes in the dataTypes tree.  If invoked from the
local toolbar icon, it collapses all nodes in the tree.  If invoked from the popup, it only
collapses the selected nodes.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/actions/CollapseAllArchivesAction.java