void addToView(TreePath path, int index) {
		ProgramNode node = (ProgramNode) path.getLastPathComponent();

		if (!viewList.contains(path) && !hasAncestorsInView(node)) {
			viewList.add(index, path);
			node.setInView(true);
		}
		if (!isVisible(path)) {
			// mark the first expanded ancestor as having something in the view
			ProgramNode parent = (ProgramNode) node.getParent();
			while (parent != null) {
				if (isVisible(parent.getTreePath())) {
					reloadNode(parent);
					break;
				}
				parent = (ProgramNode) parent.getParent();
			}
		}
		else {
			reloadNode(node);
		}
	}
Add path to the view and place it in the view list at the
given index.
@param path path to add to view
@param index index in list
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java