Recursively visits children of item.
        :param item: object: project, folder or file we will add to upload_items if necessary.
178788
def _visit_recur(self, item):
        
        if item.kind == KindType.file_str:
            if item.need_to_send:
                self.add_upload_item(item.path)
        else:
            if item.kind == KindType.project_str:
                pass
            else:
                if not item.remote_id:
                    self.add_upload_item(item.path)
            for child in item.children:
                self._visit_recur(child)
1031410
def remove_child(self, child):
        
        child.set_model(None)
        if self._model:
            row = self.childItems.index(child)
            parentindex = self._model.index_of_item(self)
            self._model.removeRow(row, parentindex)
        else:
            self.childItems.remove(child)
134694
public void insertChild(CmsTreeItem item, int position) {

        m_children.insert(item, position);
        adopt(item);
    }
643664
def append(self, item):
        
        self.check_insertion(item)

        self.real_list.append(item)
        self._items |= {item}
733048
def add_item(self, item):
        

        self.beginInsertRows(QtCore.QModelIndex(),
                             self.rowCount(),
                             self.rowCount())

        item["parent"] = self
        item = Item(**item)
        self.items.append(item)
        self.endInsertRows()

        item.__datachanged__.connect(self._dataChanged)

        return item
1019447
def child_added(self, child):
        
        super(AbstractItemView, self).child_added(child)
        self.get_member('_items').reset(self)
332556
def __insert_child(self, parent_tree_node, index, tree_node):
        
        # manage the item model
        parent_item = self.__mapping[id(parent_tree_node)]
        self.item_model_controller.begin_insert(index, index, parent_item.row, parent_item.id)
        properties = {
            "display": self.__display_for_tree_node(tree_node),
            "tree_node": tree_node  # used for removal and other lookup
        }
        item = self.item_model_controller.create_item(properties)
        parent_item.insert_child(index, item)
        self.__mapping[id(tree_node)] = item
        self.item_model_controller.end_insert()
124948
def register_items(self, items):
        
        for item in items:
            item.set_parent(self)
        self.items.extend(items)
1259297
def Append(self, item):
    
    if self._index >= self._size:
      self._index = self._index % self._size

    try:
      self._list[self._index] = item
    except IndexError:
      self._list.append(item)
    self._index += 1
854751
def acceptRecord(self, item):
        
        record = item.record()
        self.treePopupWidget().close()
        self.setCurrentRecord(record)
400227
def item_after(self, item):
        
        next_iter = self._next_iter_for(item)
        if next_iter is not None:
            return self._object_at_iter(next_iter)
821324
def append_item(self, item):
        
        did_remove = self.remove_exit()
        item.menu = self
        self.items.append(item)
        if did_remove:
            self.add_exit()
1257437
def insert_tree(self, items, node, headers):
        
        first = items[0]
        child = node.get_child(first)
        if child is not None:
            child.count += 1
        else:
            # Add new child.
            child = node.add_child(first)

            # Link it to header structure.
            if headers[first] is None:
                headers[first] = child
            else:
                current = headers[first]
                while current.link is not None:
                    current = current.link
                current.link = child

        # Call function recursively.
        remaining_items = items[1:]
        if len(remaining_items) > 0:
            self.insert_tree(remaining_items, child, headers)
820875
private void openParents(CmsTreeItem item) {

        if (item != null) {
            item.setOpen(true);
            openParents(item.getParentItem());
        }
    }
174692
function(item, ItemView, index){
    // get the itemViewOptions if any were specified
    var itemViewOptions = Marionette.getOption(this, "itemViewOptions");
    if (_.isFunction(itemViewOptions)){
      itemViewOptions = itemViewOptions.call(this, item, index);
    }

    // build the view 
    var view = this.buildItemView(item, ItemView, itemViewOptions);
    
    // set up the child view event forwarding
    this.addChildViewEventForwarding(view);

    // this view is about to be added
    this.triggerMethod("before:item:added", view);

    // Store the child view itself so we can properly
    // remove and/or close it later
    this.children.add(view);

    // Render it and show it
    this.renderItemView(view, index);

    // call the "show" method if the collection view
    // has already been shown
    if (this._isShown){
      Marionette.triggerMethod.call(view, "show");
    }

    // this view was added
    this.triggerMethod("after:item:added", view);
  }
1046931
def visit_folder(self, item, parent):
        
        if not item.remote_id:
            command = CreateFolderCommand(self.settings, item, parent)
            self.task_runner_add(parent, item, command)
1336852
public void ensureVisible(CmsSitemapTreeItem item) {

        // open the tree
        CmsTreeItem ti = item.getParentItem();
        while (ti != null) {
            ti.setOpen(true);
            ti = ti.getParentItem();
        }
        // scroll
        CmsDomUtil.ensureVisible(RootPanel.getBodyElement(), item.getElement(), 200);
    }