Hi, Brian.
That sounds like a general programming problem, how to traverse a tree with an
unknown number of
nodes. I think that sort of problem is best resolved by a recursive method
call. Something like
this. (Warning: code not compiled or tested.)
public void doWhateverINeedForEachSubProject(Project project){
NodeList childNodeList = project.childList();
NodeIterator childNodeIter = childNodeList.getIterator();
while(childNodeIter.hasMoreNodes()){
NodeInfo childNode = (NodeInfo)childNodeIter.getNextNode();
if (childNode.getNodeType() == AppConfig.NodeTypes.PROJECT){
//Do some stuff.
//Get the project object.
Project childProject =
SimpleInterface.getInstance().getProjectObj(childNode.getUniqueID());
//Recursive method call.
doWhateverINeedForEachSubProject(childProject);
}
}
}
--Rob
PS: You might want to subscribe to the sourcejammer-devel list.
--- [EMAIL PROTECTED] wrote:
> Question: what if I don't know how many levels deep the projects extend?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
SourceJammer-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sourcejammer-devel