private void updateViewList(ProgramDnDTree tree, TreePath path) {
		ProgramNode node = (ProgramNode) path.getLastPathComponent();
		if (!tree.hasAncestorsInView(node) && !viewList.contains(path)) {
			for (int i = 0; i < viewList.size(); i++) {
				TreePath viewPath = viewList.get(i);
				if (path.isDescendant(viewPath)) {
					tree.removeFromView(viewPath);
					--i;
				}
			}
			tree.addToView(path);
		}
	}
Update the view list if the given path is an ancestor of any of the paths currently 
in the view; remove the descendant and add the ancestor path. 
@param tree the tree
@param path path the check against the view list
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionManager.java