protected synchronized void doSetChildren(List<GTreeNode> childList) {
		List<GTreeNode> oldChildren = children;
		children = null;

		if (oldChildren != null) {
			for (GTreeNode node : oldChildren) {
				node.setParent(null);
			}
		}

		if (childList != null) {
			for (GTreeNode node : childList) {
				node.setParent((GTreeNode) this);
			}
			children = new CopyOnWriteArrayList<GTreeNode>(childList);
		}

		if (oldChildren != null) {
			for (GTreeNode node : oldChildren) {
				// only dispose old nodes that aren't included in the new child list - if any
				// old nodes don't have a parent, then they were not include in the new list
				if (node.getParent() == null) {
					node.dispose();
				}
			}
		}
	}
Sets the children of this node to the given list of child nodes, but does not notify the
tree. This method does not have to be called from the swing thread.  It is intended to be
used by background threads that want to populate all or part of the tree, but wait until
the bulk operations are completed before notifying the tree.
@param childList the list of child nodes to assign as children to this node
Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/CoreGTreeNode.java