private boolean willReloadProgram(DomainObjectChangedEvent event) {
		if (updateManager.isBusy()) {
			// TODO does it really make sense to blindly rebuild just because we are rebuilding??  
			// Shouldn't we still use the code below to know updating is needed?
			updateManager.updateLater();
			return true;
		}

		if (rootNameChanged(event)) {
			// major update; rebuild
			updateManager.updateLater();
			return true;
		}

		int changeCnt = 0;
		int recordCount = event.numRecords();
		for (int i = 0; i < recordCount; i++) {
			DomainObjectChangeRecord rec = event.getChangeRecord(i);
			EventType eventType = rec.getEventType();
			if (eventType == DomainObjectEvent.RESTORED ||
				eventType == ProgramEvent.MEMORY_BLOCK_REMOVED) {
				// for object restored, check the root node to see if it is invalid; 
				// otherwise for memory block removed, rebuild the tree
				plugin.reloadProgram(eventType == DomainObjectEvent.RESTORED);
				return true;
			}
			if (eventType == ProgramEvent.GROUP_ADDED || eventType == ProgramEvent.GROUP_REMOVED ||
				eventType == ProgramEvent.FRAGMENT_MOVED ||
				eventType == ProgramEvent.MODULE_REORDERED) {
				changeCnt++;
			}
			else if (eventType == ProgramEvent.PROGRAM_TREE_REMOVED) {
				plugin.treeRemoved((String) rec.getOldValue());
			}
			else if (eventType == ProgramEvent.PROGRAM_TREE_CREATED) {
				plugin.treeViewAdded((String) rec.getNewValue());
			}
		}

		if (changeCnt > THRESHOLD_FOR_RELOAD) {
			updateManager.updateLater();
			return true;
		}

		return false;
	}
A Module or Fragment was renamed, so find all nodes with oldName and update them
with the new name and new Group object.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramListener.java