Return to Snippet

Revision: 56414
at March 27, 2012 11:32 by laurenceosx


Initial Code
def recurseNode( aNode = null, results = [] ) {
    if (aNode == null) { // null means return all nodes from root
        aNode =  freemind.main.FreeMind.getFrames().find( { it.class.name.equals( 'freemind.main.FreeMind' ) } ).controller.model.rootNode;
    }
    results << aNode;    
    if ( aNode?.children ) {
        aNode.children.each {
            recurseNode( it, results );
        }   
    }  
    return results;
}

Initial URL


Initial Description
Groovy Freemind RecurseNode

Initial Title
Groovy Freemind RecurseNode

Initial Tags
groovy

Initial Language
Groovy