Check if custom nodes that are expanded need their child nodes added from the model.
552536
protected void checkExpandedCustomNodes() {

		TreeItemIdNode custom = getCustomTree();
		if (custom == null) {
			return;
		}

		// Get the expanded rows
		Set<String> expanded = getExpandedRows();

		// Process Top Level
		for (TreeItemIdNode node : custom.getChildren()) {
			processCheckExpandedCustomNodes(node, expanded);
		}
	}
99099
def _add node, allows_children=true, &block
      #raise ArgumentError, "Argument should be a node" if !node.is_a? TreeNode
      $log.debug " TODO remove from existing parent to avoid bugs XXX"
      if !node.is_a? TreeNode
        n = TreeNode.new node, allows_children, &block
        node = n
      end
      node.parent = self
      @children << node
      node
    end
971919
function(additional){
		return [function(name, load){
			if(load.address.indexOf("node_modules") >= 0 || load.metadata.format === "defined") {
				return true;
			}
		}].concat(additional || []);
	}
1096464
def add(self, child, min_occurs=1):
        
        if not min_occurs in (0, 1):
            raise RuntimeError("Unexpected min bound for node schema")
        self.children[child.tag] = child
        self.children_min_occurs[child.tag] = min_occurs
        return child
1144272
private boolean hasSelectedChildren(List<CmsCategoryTreeEntry> children, Collection<String> selectedCategories) {

        boolean result = false;
        if (children == null) {
            return false;
        }
        for (CmsCategoryTreeEntry child : children) {
            result = selectedCategories.contains(child.getSitePath());
            if (result || hasSelectedChildren(child.getChildren(), selectedCategories)) {
                return true;
            }
        }

        return result;
    }
1369449
def add_missing_children(models,request,include_children_for,modelgb):
  ""
  for (nombre,pkey),model in models.items():
    for modelclass,pkeys in model.refkeys(include_children_for.get(nombre,())).items():
      # warning: this is defaulting to all fields of child object. don't give clients a way to restrict that until there's a reason to.
      childname=modelgb['row',modelclass].name
      for childfield,cftype in modelclass.FIELDS:
        if not isinstance(cftype,basestring) and inspect.isclass(cftype) and issubclass(cftype,syncschema.Syncable):
          merge_null_missing(request,childname,childfield,pkeys)
        elif childfield in modelclass.SENDRAW: merge_null_missing(request,childname,childfield,pkeys)
        else: pass # intentional: ignore the field
  return request # the in-place updated original
1326733
def add_descendants(self, node, updateset=None):
        ""
        someset = set()
        startnode = self.tab[node]

        defout = startnode.default[0]
        if defout is not None:
            someset.add(defout)
        for kwd, matchnode in startnode.named.items():
            if matchnode[0] is not None:
                someset.add(matchnode[0])

        if someset is not None:
            updateset.update(someset)
        else:
            return someset
498388
private void scanAllNodes(Parent parent, PseudoClass pseudoClass) {
        parent.getChildrenUnmodifiable().addListener(new ListChangeListener<Node>() {
            @Override
            public void onChanged(javafx.collections.ListChangeListener.Change<? extends Node> c) {
                while (c.next()) {
                    if (!c.wasPermutated() && !c.wasUpdated()) {
                        for (Node addedNode : c.getAddedSubList()) {
                            if (addedNode instanceof Parent) {
                                scanAllNodes((Parent) addedNode, pseudoClass);
                            }
                        }
                    }
                }
            }
        });
        for (Node component : parent.getChildrenUnmodifiable()) {
            if (component instanceof Pane) {
                ((Pane) component).getChildren().addListener(new ListChangeListener<Node>() {
                    @Override
                    public void onChanged(javafx.collections.ListChangeListener.Change<? extends Node> c) {
                        while (c.next()) {
                            if (!c.wasPermutated() && !c.wasUpdated()) {
                                for (Node addedNode : c.getAddedSubList()) {
                                    if (addedNode instanceof Parent) {
                                        scanAllNodes((Parent) addedNode, pseudoClass);
                                    }
                                }
                            }
                        }
                    }
                });
                //if the component is a container, scan its children
                scanAllNodes((Pane) component, pseudoClass);
            } else if (component instanceof ScrollPane) {
                ((ScrollPane) component).contentProperty().addListener((o, oldVal, newVal) -> {
                    scanAllNodes((Parent) newVal, pseudoClass);
                });
                //if the component is a container, scan its children
                if (((ScrollPane) component).getContent() instanceof Parent) {

                    scanAllNodes((Parent) ((ScrollPane) component).getContent(), pseudoClass);
                }
            } else if (component instanceof Control) {
                //if the component is an instance of IInputControl, add to list
                component.pseudoClassStateChanged(PSEUDO_CLASS_EX_SMALL,
                    pseudoClass == PSEUDO_CLASS_EX_SMALL);
                component.pseudoClassStateChanged(PSEUDO_CLASS_SMALL, pseudoClass == PSEUDO_CLASS_SMALL);
                component.pseudoClassStateChanged(PSEUDO_CLASS_MEDIUM, pseudoClass == PSEUDO_CLASS_MEDIUM);
                component.pseudoClassStateChanged(PSEUDO_CLASS_LARGE, pseudoClass == PSEUDO_CLASS_LARGE);
            }
        }
    }
1099600
def data_children(self) -> List["DataNode"]:
        """"""
        res = []
        for child in self.children:
            if isinstance(child, DataNode):
                res.append(child)
            elif not isinstance(child, SchemaTreeNode):
                res.extend(child.data_children())
        return res
213050
function(operation, childNode, extra) {
			var data,
				modifyChild = this.tree.options.modifyChild;

			if (modifyChild) {
				if (childNode && childNode.parent !== this) {
					$.error(
						"childNode " + childNode + " is not a child of " + this
					);
				}
				data = {
					node: this,
					tree: this.tree,
					operation: operation,
					childNode: childNode || null,
				};
				if (extra) {
					$.extend(data, extra);
				}
				modifyChild({ type: "modifyChild" }, data);
			}
		}
1000104
function loadChildNodes(parentNode){
    if (gNodesWithChildren[parentNode._id]){
        var children = [];
        for (var i = 0; i < gNodesWithChildren[parentNode._id].length; ++i){
            var currentNode = gNodesWithChildren[parentNode._id][i];
            children.push({
                _id : currentNode._id, //todo : id instead of name?
                node : currentNode,
                parent : parentNode._id, //todo id instead of name?
                childNodes : loadChildNodes(currentNode)
            });
        }
        return children;
    }
}
794199
def expand(self, process, child_nodes):
        
        #print('TODO: process check = ', process)
        #print(self.name, ' expanded to ->', child_nodes)
        self.child_nodes = []  
        for n in child_nodes:
            self.child_nodes.append(CoreData(n, parent=self))
663519
function(newchild, oldchild, lastnode, id, ids) {
		var result = true;
		while (newchild && oldchild && !this._updates.hardupdates(id)) {
			switch (newchild.nodeType) {
				case Node.TEXT_NODE:
					result = this._check(newchild, oldchild, lastnode, id, ids);
					break;
				case Node.ELEMENT_NODE:
					result = this._scan(newchild, oldchild, lastnode, id, ids);
					break;
			}
			newchild = newchild.nextSibling;
			oldchild = oldchild.nextSibling;
		}
		return result;
	}
784713
public function has_children() {
        return ($this->nodetype === navigation_node::NODETYPE_BRANCH || $this->children->count()>0 || $this->isexpandable);
    }
54472
public function append(Node $node) : bool
    {
        $node->parent = $this;

        return $this->childNodes->add($node);
    }
982113
private Boolean hasChildNodes(Node n) {
        boolean flag = n.hasChildNodes();
        if (flag && XMLUnit.getIgnoreComments()) {
            List nl = nodeList2List(n.getChildNodes());
            flag = !nl.isEmpty();
        }
        return flag ? Boolean.TRUE : Boolean.FALSE;
    }
107854
def add_nodes(self, new_nodes):
        """"""
        for unique_id, node in new_nodes.items():
            if unique_id in self.nodes:
                raise_duplicate_resource_name(node, self.nodes[unique_id])
            self.nodes[unique_id] = node