Inserts a child item to the current item.

            Overridden from BaseTreeItem.
963079
def insertChild(self, childItem, position=None):
        
        childItem = super(BoolCti, self).insertChild(childItem, position=None)

        enableChildren = self.enabled and self.data != self.childrenDisabledValue
        #logger.debug("BoolCti.insertChild: {} enableChildren={}".format(childItem, enableChildren))
        childItem.enableBranch(enableChildren)
        childItem.enabled = enableChildren
        return childItem
963107
Node insertChildAt(Node newChild, int index) throws DOMException {
        if (newChild instanceof DocumentFragment) {
            NodeList toAdd = newChild.getChildNodes();
            for (int i = 0; i < toAdd.getLength(); i++) {
                insertChildAt(toAdd.item(i), index + i);
            }
            return newChild;
        }

        LeafNodeImpl toInsert = (LeafNodeImpl) newChild;
        if (toInsert.document != null && document != null && toInsert.document != document) {
            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, null);
        }
        if (toInsert.isParentOf(this)) {
            throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
        }

        if (toInsert.parent != null) {
            int oldIndex = toInsert.index;
            toInsert.parent.children.remove(oldIndex);
            toInsert.parent.refreshIndices(oldIndex);
        }

        children.add(index, toInsert);
        toInsert.parent = this;
        refreshIndices(index);

        return newChild;
    }
1097466
def add_child(self, child):
        
        if not isinstance(child, DependencyNode):
            raise TypeError('"child" must be a DependencyNode')
        self._children.append(child)
1205821
public void gotoEnd() {
	currentNode = tree;
	while (currentNode.hasChildren()) {
	    currentNode = currentNode.getChildren().get(
		    currentNode.getChildren().size() - 1);
	}
    }
664112
def add_child(self, child):
        
        if isinstance(child, BaseCitation):
            self._children.append(child)
1158817
def child_added(self, child):
        
        super(AbstractWidgetItemGroup, self).child_added(child)
        self.get_member('_items').reset(self)
1138132
def insert(self, index, value):
        ''''''
        newnode = LookupTreeNode(index, value)
        level = 0
        node = self.root
        while True:
            ind = _getbits(newnode.index, level)
            level += 1
            child = node.children[ind]
            if child is None or child.index == newnode.index:
                if child:
                    assert child.value == newnode.value
                node.children[ind] = newnode
                break
            elif child.index == _root_index:
                # This is a branch
                node = child
            else:
                branch = LookupTreeNode()
                nind = _getbits(newnode.index, level)
                cind = _getbits(child.index, level)
                node.children[ind] = branch

                # Life gets tricky when...
                if nind == cind:
                    branch.children[cind] = child
                    # recurse
                    node = branch
                else:
                    branch.children[nind] = newnode
                    branch.children[cind] = child
                    break
936082
function Insert($item, $parent = null, $previous = null)
    {
        if ($previous)
        {
            $parent = $this->provider->ParentOf($previous);
        }
        $oldNext = $this->provider->NextOf($item);
        $oldPrev = $this->provider->PreviousOf($item);
        $oldFirst = $this->provider->FirstChildOf($parent);
        if (!($oldPrev && $previous && $this->provider->Equals($oldPrev, $previous)))
        {
            $this->CloseCutGap($oldPrev, $oldNext, $item);
        }
        $this->UpdateInsertItem($item, $parent, $previous);
        
        if (!$previous)
        {
            $this->AssureFirstChild($item, $oldFirst);
        }
    }
1135058
def prepend(self, _, child, name=None):
        """"""
        self._insert(child, prepend=True, name=name)
        return self
610403
def insert(self, anchor):
        
        self.prec = anchor.prec        # point to neighbors
        self.succ = anchor
        self.succ.prec = self          # make neighbors point to item
        self.prec.succ = self
549772
def insert(self, position, item, select=False):
        
        if item in self:
            raise ValueError("item %s already in list" % item)
        modeliter = self.model.insert(position, (item,))
        self._id_to_iter[id(item)] = modeliter
        if select:
            self.selected_item = item
        self.emit('item-inserted', item, position)
640728
def addChild(self, item):
        
        super(XGanttWidgetItem, self).addChild(item)
        
        item.sync()
304291
def insertBefore(self, newchild, refchild):
		
		for i, childNode in enumerate(self.childNodes):
			if childNode is refchild:
				self.childNodes.insert(i, newchild)
				newchild.parentNode = self
				self._verifyChildren(i)
				return newchild
		raise ValueError(refchild)
631705
function insertTo(root, node, before) {
  if (!root) return
  root.insertBefore(before, node)
  root.removeChild(node)
}
1158070
def insert(self, item, priority):
        
        heappush(self.heap, HeapItem(item, priority))
1323444
def insert_child(self, i, child):
        
        child.parent = self
        self.children.insert(i, child)
        self.changed()
706700
def _insert_item(self, key, new_item, instance, is_after):
        """"""
        index = self._get_index_for_insert(key, instance)
        index = index + 1 if is_after else index
        self.__items = self.__items[:index] + new_item + self.__items[index:]
        # Make sure indexing works with new items
        for new_key, new_value in new_item:
            if new_key in self:
                value_list = [val for k, val in self.__items if k == new_key]
                dict_setitem(self, new_key, value_list)
            else:
                dict_setitem(self, new_key, [new_value])