src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js
function (nodeElement, resultArray) {
				var node = nodeElement;
				var childNode = node.firstElementChild;
				var results = resultArray;
				var subResult = results;
				var control = sap.ui.getCore().byId(node.id);

				if (node.getAttribute('data-sap-ui') && control) {
					results.push({
						id: control.getId(),
						name: control.getMetadata().getName(),
						type: 'sap-ui-control',
						content: []
					});

					subResult = results[results.length - 1].content;
				} else if (node.getAttribute('data-sap-ui-area')) {
					results.push({
						id: node.id,
						name: 'sap-ui-area',
						type: 'data-sap-ui',
						content: []
					});

					subResult = results[results.length - 1].content;
				}

				while (childNode) {
					this._createRenderedTreeModel(childNode, subResult);
					childNode = childNode.nextElementSibling;
				}
			}
function (nodeElement, resultArray) {
				var node = nodeElement;
				var childNode = node.firstElementChild;
				var results = resultArray;
				var subResult = results;
				var control = sap.ui.getCore().byId(node.id);

				if (node.getAttribute('data-sap-ui') && control) {
					results.push({
						id: control.getId(),
						name: control.getMetadata().getName(),
						type: 'sap-ui-control',
						content: []
					});

					subResult = results[results.length - 1].content;
				} else if (node.getAttribute('data-sap-ui-area')) {
					results.push({
						id: node.id,
						name: 'sap-ui-area',
						type: 'data-sap-ui',
						content: []
					});

					subResult = results[results.length - 1].content;
				}

				while (childNode) {
					this._createRenderedTreeModel(childNode, subResult);
					childNode = childNode.nextElementSibling;
				}
			}
function ( nodeElement , resultArray ) { var node = nodeElement ; var childNode = node . firstElementChild ; var results = resultArray ; var subResult = results ; var control = sap . ui . getCore ( ) . byId ( node . id ) ; if ( node . getAttribute ( 'data-sap-ui' ) && control ) { results . push ( { id : control . getId ( ) , name : control . getMetadata ( ) . getName ( ) , type : 'sap-ui-control' , content : [ ] } ) ; subResult = results [ results . length - 1 ] . content ; } else if ( node . getAttribute ( 'data-sap-ui-area' ) ) { results . push ( { id : node . id , name : 'sap-ui-area' , type : 'data-sap-ui' , content : [ ] } ) ; subResult = results [ results . length - 1 ] . content ; } while ( childNode ) { this . _createRenderedTreeModel ( childNode , subResult ) ; childNode = childNode . nextElementSibling ; } }
Creates data model of the rendered controls as a tree.
@param {Element} nodeElement - HTML DOM element from which the function will star searching.
@param {Array} resultArray - Array that will contains all the information.
@private
Creates data model of the rendered controls as a tree .