private TreeViewProvider addTreeView(String treeName) {
		TreeViewProvider provider = providerMap.get(treeName);
		if (provider == null) {
			provider = new TreeViewProvider(treeName, this);
			providerMap.put(treeName, provider);
			if (currentProgram != null) {
				provider.setProgram(currentProgram);
			}
			registerServiceProvided(ViewProviderService.class, provider);
		}
		return provider;
	}
The program was restored from an Undo/Redo operation so reload it

@param checkRoot if true, only rebuild the tree if the root node is invalid; if false,
       force a rebuild of the tree
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreePlugin.java