Add tasks to the tree.

@param parentNode parent tree node
@param parent parent task container
540707
private void addTasks(MpxjTreeNode parentNode, ChildTaskContainer parent)
   {
      for (Task task : parent.getChildTasks())
      {
         final Task t = task;
         MpxjTreeNode childNode = new MpxjTreeNode(task, TASK_EXCLUDED_METHODS)
         {
            @Override public String toString()
            {
               return t.getName();
            }
         };
         parentNode.add(childNode);
         addTasks(childNode, task);
      }
   }
241523
public final int addChild (Task<E> child) {
		int index = addChildToTask(child);
		if (tree != null && tree.listeners != null) tree.notifyChildAdded(this, index);
		return index;
	}
1110239
private ChildTaskContainer getParentTask(String wbs)
   {
      ChildTaskContainer result;
      String parentWbs = getParentWBS(wbs);
      if (parentWbs == null)
      {
         result = m_projectFile;
      }
      else
      {
         result = m_taskMap.get(parentWbs);
      }
      return result;
   }
237556
public void setParentResource(CmsResource parentResource) {

        if (parentResource.isFile()) {
            m_parentPath = CmsResource.getFolderPath(parentResource.getRootPath());
        } else {
            m_parentPath = parentResource.getRootPath();
        }
    }
909411
public void setParentLinks(java.util.Collection<ObjectIdentifierAndLinkNameTuple> parentLinks) {
        if (parentLinks == null) {
            this.parentLinks = null;
            return;
        }

        this.parentLinks = new java.util.ArrayList<ObjectIdentifierAndLinkNameTuple>(parentLinks);
    }
243336
public void addChildren(
        CmsTreeItem parent,
        List<CmsCategoryTreeEntry> children,
        Collection<String> selectedCategories) {

        if (children != null) {
            for (CmsCategoryTreeEntry child : children) {
                // set the category tree item and add to parent tree item
                CmsTreeItem treeItem = buildTreeItem(child, selectedCategories);
                m_childrens.get(parent.getId()).add(treeItem.getId());
                m_childrens.put(treeItem.getId(), new ArrayList<>(child.getChildren().size()));
                if ((selectedCategories != null) && selectedCategories.contains(child.getPath())) {
                    openWithParents(parent);

                }
                if (m_isSingleSelection) {
                    if (treeItem.getCheckBox().isChecked()) {
                        parent.getCheckBox().setChecked(false);
                    }
                }
                parent.addChild(treeItem);
                addChildren(treeItem, child.getChildren(), selectedCategories);
            }
        }
    }
1161050
public void init(RecordOwnerParent parent, Rec recordMain, Map<String, Object> properties)
    {
        m_taskParent = parent;
        if (m_taskParent != null)
        	m_taskParent.addRecordOwner(this);
        
        if (recordMain == null)
            recordMain = this.openMainRecord(); // No, open it!
        // Now look through the list and see if this query was added, it not, add it!
        boolean bQueryInTable = false;
        if (m_vRecordList != null)
        {
            for (Enumeration<Rec> e = m_vRecordList.elements() ; e.hasMoreElements() ;)
            {   // This should only be called for Imaged GridScreens (Child windows would be deleted by now if Component)
                Record cQueryInTable = (Record)e.nextElement();
                if (cQueryInTable == recordMain)
                    bQueryInTable = true;
            }
        }
        if (recordMain != null)
            if (!bQueryInTable)
                this.addRecord((Record)recordMain, false);
        this.openOtherRecords();    // Open the other files
        if (this.getScreenRecord() == null)
            this.setScreenRecord(this.addScreenRecord());

        this.addListeners();        // Add the session behaviors
    }
492144
public void addChildCluster(Cluster<M> parent, Cluster<M> child) {
    hierarchy.add(parent, child);
  }
807714
function(node, lines, parentName, depth) {

    // Default depth.
    if (_.isUndefined(depth)) {
      depth = 0;
    }

    // Default parentName.
    if (_.isUndefined(parentName)) {
      parentName = 'root';
    }

    if (isTask(node)) {

      // This is a task so add to lines and nothing further.
      lines.push({
        depth: depth,
        name: getName(node),
        parentName: parentName,
        description: node.description
      });

    } else if (isBranch(node)) {

      lines.push({
        depth: depth,
        name: getName(node),
        parentName: parentName
      });
      node.children.forEach(function(child) {
        recAdd(child, lines, getName(node), depth + 1);
      });

    } else {

      // This should never happen.
      assert(false);

    }

  }
852480
private void writeTask(Task task) throws IOException
   {
      writeFields(null, task, TaskField.values());
      for (Task child : task.getChildTasks())
      {
         writeTask(child);
      }
   }
623599
public void addAndLinkChild(AbstractPlanNode child) {
        assert(child != null);
        m_children.add(child);
        child.m_parents.add(this);
    }
836398
protected void nodeCompleted(Object parent, Object node) {
        getProxyBuilder().getCurrentFactory().onNodeCompleted(getProxyBuilder().getChildBuilder(), parent, node);
    }
254028
protected final void setParentNode(final DiffNode parentNode)
	{
		if (this.parentNode != null && this.parentNode != parentNode)
		{
			throw new IllegalStateException("The parent of a node cannot be changed, once it's set.");
		}
		this.parentNode = parentNode;
	}
1234216
def add_task(self, task, parent_task_result):
        
        self.tasks.append((task, parent_task_result))
        self.task_id_to_task[task.id] = task
1317126
private void addChild(Session session, GroupImpl parent, GroupImpl child, boolean broadcast) throws Exception
   {
      Node parentNode = utils.getGroupNode(session, parent);
      Node groupNode =
         parentNode.addNode(child.getGroupName(), JCROrganizationServiceImpl.JOS_HIERARCHY_GROUP_NODETYPE);

      String parentId = parent == null ? null : parent.getId();

      child.setParentId(parentId);
      child.setInternalId(groupNode.getUUID());

      if (broadcast)
      {
         preSave(child, true);
      }

      writeGroup(child, groupNode);
      session.save();

      putInCache(child);

      if (broadcast)
      {
         postSave(child, true);
      }
   }
1258864
def add_node_parents(root: ast.AST) -> None:
    
    for node in ast.walk(root):
        for child in ast.iter_child_nodes(node):
            child.parent = node
677170
private void processChildTasks(Task parentTask) throws SQLException
   {
      List<Row> rows = getRows("select * from zscheduleitem where zparentactivity_=? and z_ent=? order by zorderinparentactivity", parentTask.getUniqueID(), m_entityMap.get("Activity"));
      for (Row row : rows)
      {
         Task task = parentTask.addTask();
         populateTask(row, task);
         processChildTasks(task);
      }
   }