src/sap.ui.core/src/sap/ui/core/support/techinfo/moduleTreeHelper.js
function (oHierarchy, oTree, iDepth, bSelected) {
			var iSelectionDepth,
				iInnerSelectionDepth;

			bSelected = oHierarchy === true || oHierarchy[""] || bSelected;
			oTree.nodes = [];
			oTree.selected = bSelected;

			if (bSelected) {
				iSelectionDepth = iDepth;
			}

			for (var sProperty in oHierarchy) {
				if (sProperty === "") {
					continue;
				}
				var oChildNode = {
					text: sProperty
				};
				iInnerSelectionDepth = this.setTreeNode(oHierarchy[sProperty], oChildNode, iDepth + 1, bSelected);
				if (iInnerSelectionDepth > iSelectionDepth || !iSelectionDepth) {
					iSelectionDepth = iInnerSelectionDepth;
				}
				oTree.nodes.push(oChildNode);
			}

			return iSelectionDepth;
		}
function (oHierarchy, oTree, iDepth, bSelected) {
			var iSelectionDepth,
				iInnerSelectionDepth;

			bSelected = oHierarchy === true || oHierarchy[""] || bSelected;
			oTree.nodes = [];
			oTree.selected = bSelected;

			if (bSelected) {
				iSelectionDepth = iDepth;
			}

			for (var sProperty in oHierarchy) {
				if (sProperty === "") {
					continue;
				}
				var oChildNode = {
					text: sProperty
				};
				iInnerSelectionDepth = this.setTreeNode(oHierarchy[sProperty], oChildNode, iDepth + 1, bSelected);
				if (iInnerSelectionDepth > iSelectionDepth || !iSelectionDepth) {
					iSelectionDepth = iInnerSelectionDepth;
				}
				oTree.nodes.push(oChildNode);
			}

			return iSelectionDepth;
		}
function ( oHierarchy , oTree , iDepth , bSelected ) { var iSelectionDepth , iInnerSelectionDepth ; bSelected = oHierarchy === true || oHierarchy [ "" ] || bSelected ; oTree . nodes = [ ] ; oTree . selected = bSelected ; if ( bSelected ) { iSelectionDepth = iDepth ; } for ( var sProperty in oHierarchy ) { if ( sProperty === "" ) { continue ; } var oChildNode = { text : sProperty } ; iInnerSelectionDepth = this . setTreeNode ( oHierarchy [ sProperty ] , oChildNode , iDepth + 1 , bSelected ) ; if ( iInnerSelectionDepth > iSelectionDepth || ! iSelectionDepth ) { iSelectionDepth = iInnerSelectionDepth ; } oTree . nodes . push ( oChildNode ) ; } return iSelectionDepth ; }
Recursively constructs tree nodes in a format that it can be bound to a sap.m.Tree control
@param {object} oHierarchy The module hierarchy node with selected state
@param {object} oTree The tree node to be filled with the hierarchy information
@param {int} iDepth The current depth of the recursion
@param {boolean} bSelected The selected state of the parent node
@return {int} The depth of the deepest node in the tree
Recursively constructs tree nodes in a format that it can be bound to a sap . m . Tree control