Fills a given list with nodes in scope, searching recursively.

@param rootNode the root node
@param nodesList the nodes list
518182
private void fillNodesInScope(SiteNode rootNode, List<SiteNode> nodesList) {
		@SuppressWarnings("unchecked")
		Enumeration<TreeNode> en = rootNode.children();
		while (en.hasMoreElements()) {
			SiteNode sn = (SiteNode) en.nextElement();
			if (isInScope(sn))
				nodesList.add(sn);
			fillNodesInScope(sn, nodesList);
		}
	}
128901
public static NodeList toNodeList(Object o, NodeList defaultValue) {
	// print.ln("nodeList:"+o);
	if (o instanceof NodeList) {
	    return (NodeList) o;
	}
	else if (o instanceof ObjectWrap) {
	    return toNodeList(((ObjectWrap) o).getEmbededObject(defaultValue), defaultValue);
	}
	return defaultValue;
    }
568369
public static void add(Element parent, NodeList list) {
        int size;
        int i;

        size = list.getLength();
        for (i = 0; i < size; i++) {
            addNode(parent, list.item(i));
        }
        
    }
753398
public void insertBlock(AbstractBaseDTNode<I, D> blockRoot) {
        blockRoot.removeFromBlockList();

        blockRoot.setNextElement(next);
        if (getNextElement() != null) {
            next.setPrevElement(blockRoot);
        }
        blockRoot.setPrevElement(this);
        next = blockRoot;
    }
384546
public static List<Element> toElementList(NodeList nodeList) {
		List<Element> elements = new ArrayList<Element>();
		for (int i = 0; i < nodeList.getLength(); i++) {
			Node node = nodeList.item(i);
			if (node instanceof Element) {
				elements.add((Element) node);
			}
		}
		return elements;
	}
408175
public static function appendChildrenNodeIDs( &$nodeList, &$nodeIDList )
    {
        $params = array( 'Depth' => 1,
                         'AsObject' => false );
        foreach ( $nodeList as $node )
        {
            $childNodeList = eZContentObjectTreeNode::subTreeByNodeID( $params, $node->attribute( 'node_id' ) );
            if ( !empty( $childNodeList ) )
            {
                foreach ( $childNodeList as $childNode )
                {
                    $nodeIDList[] = $childNode['node_id'];
                }
            }
        }
    }
396483
public void appendNodes(NodeSet nodes)
  {

    int nNodes = nodes.size();

    if (null == m_map)
    {
      m_mapSize = nNodes + m_blocksize;
      m_map = new Node[m_mapSize];
    }
    else if ((m_firstFree + nNodes) >= m_mapSize)
    {
      m_mapSize += (nNodes + m_blocksize);

      Node newMap[] = new Node[m_mapSize];

      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + nNodes);

      m_map = newMap;
    }

    System.arraycopy(nodes.m_map, 0, m_map, m_firstFree, nNodes);

    m_firstFree += nNodes;
  }
422112
@Override
	public void traverse(final ITreeNode<T> node, final List<ITreeNode<T>> list)
	{
		list.add(node);
		for (final ITreeNode<T> data : node.getChildren())
		{
			traverse(data, list);
		}
	}
1217803
public void setOrganizationNodes(java.util.Collection<OrganizationNode> organizationNodes) {
        if (organizationNodes == null) {
            this.organizationNodes = null;
            return;
        }

        this.organizationNodes = new java.util.ArrayList<OrganizationNode>(organizationNodes);
    }
271382
public static <T extends HierarchyEntity<T, ?>> void addParent(Collection<T> nodes) {
    addParent(nodes, null);
  }
25132
public static boolean hasChildElement(NodeList list) {
		
		Node n;

		for(int i = 0; i < list.getLength(); i++) {
			n = list.item(i);

			if(n.getNodeType() == Node.ELEMENT_NODE) {
				return true;
			}
		}

		return false;
		
	}
1225985
public void visit(final TextNode pNode) throws TTIOException {
        final long nodeKey = pNode.getDataKey();
        mRtx.moveTo(nodeKey);
        mInOrder.put(mRtx.getNode(), false);
        mDescendants.put(mRtx.getNode(), 1L);
    }
390289
public List<ItemState> getChildrenChanges(String rootIdentifier, boolean forNodes)
   {
      List<ItemState> children =
         forNodes ? childNodeStates.get(rootIdentifier) : childPropertyStates.get(rootIdentifier);

      return children == null ? new ArrayList<ItemState>() : children;
   }
1368246
void findScopes(Node externs, Node root) {
    NodeTraversal.traverseRoots(
        compiler,
        new NodeTraversal.AbstractScopedCallback() {
          @Override
          public void enterScope(NodeTraversal t) {
            createScopeFrom(t.getScope());
          }

          @Override
          public void visit(NodeTraversal t, Node n, Node p) {}
        },
        externs,
        root);
  }
1264059
public void setFilter (SiteTreeFilter filter) {
		this.filter = filter;
		SiteNode root = getRoot();
		setFilter(filter, root);
		// Never filter the root node
		root.setFiltered(false);
	}
165333
function searchNodeInTree(treeRoot, nodeId){
    if (treeRoot.childNodes){
        for (var i = 0; i < treeRoot.childNodes.length; ++i){
            var currentNode = treeRoot.childNodes[i];
            if (currentNode._id == nodeId){
                return currentNode;
            } else {
                var found = searchNodeInTree(currentNode, nodeId);
                if (found) {
                    return found;
                }
            }
        }
    }
    return false;
}
313346
public void add(List list) {
	if (values == null) values = new LinkedList();
	values.add(list);
    }