function (oModules, oResult) {
			var modules = oModules.modules,
				vDebugInfo = window["sap-ui-debug"];

			// create tree with all modules and empty selection
			jQuery.each(modules, function (sName) {
				this.set(oResult, sName, false, true);
			}.bind(this));

			// apply current debug info as tree selection
			if (vDebugInfo === true || vDebugInfo === 'x' || vDebugInfo === 'X') {
				this.set(oResult, '/', true);
			} else if (vDebugInfo && typeof vDebugInfo === 'string') {
				vDebugInfo.split(/,/).forEach(function (sPattern) {
					if (/\*/.test(sPattern)) {
						// if a glob pattern is found, select all modules that are matched by it
						var rFilter = new RegExp("^(?:" + this.makeRegExp(sPattern) + ")");
						// collect namespaces
						var oNamespacesAndModules = {};
						Object.keys(modules).forEach(function (sModule) {
							var sModulePath = sModule.split("/").slice(0, -1).join("/") + "/";
							oNamespacesAndModules[sModulePath] = "";
						});
						// join namespaces and modules object
						for (var sKey in modules) {
							oNamespacesAndModules[sKey] = modules[sKey];
						}
						jQuery.each(oNamespacesAndModules, function (sName) {
							if (rFilter.test(sName)) {
								this.set(oResult, sName, true);
							}
						}.bind(this));
					} else {
						// for simple package / module names, just select the corresponding tree node
						this.set(oResult, sPattern, true);
					}
				}.bind(this));
			}
		}
function (oModules, oResult) {
			var modules = oModules.modules,
				vDebugInfo = window["sap-ui-debug"];

			// create tree with all modules and empty selection
			jQuery.each(modules, function (sName) {
				this.set(oResult, sName, false, true);
			}.bind(this));

			// apply current debug info as tree selection
			if (vDebugInfo === true || vDebugInfo === 'x' || vDebugInfo === 'X') {
				this.set(oResult, '/', true);
			} else if (vDebugInfo && typeof vDebugInfo === 'string') {
				vDebugInfo.split(/,/).forEach(function (sPattern) {
					if (/\*/.test(sPattern)) {
						// if a glob pattern is found, select all modules that are matched by it
						var rFilter = new RegExp("^(?:" + this.makeRegExp(sPattern) + ")");
						// collect namespaces
						var oNamespacesAndModules = {};
						Object.keys(modules).forEach(function (sModule) {
							var sModulePath = sModule.split("/").slice(0, -1).join("/") + "/";
							oNamespacesAndModules[sModulePath] = "";
						});
						// join namespaces and modules object
						for (var sKey in modules) {
							oNamespacesAndModules[sKey] = modules[sKey];
						}
						jQuery.each(oNamespacesAndModules, function (sName) {
							if (rFilter.test(sName)) {
								this.set(oResult, sName, true);
							}
						}.bind(this));
					} else {
						// for simple package / module names, just select the corresponding tree node
						this.set(oResult, sPattern, true);
					}
				}.bind(this));
			}
		}
function ( oModules , oResult ) { var modules = oModules . modules , vDebugInfo = window [ "sap-ui-debug" ] ; // create tree with all modules and empty selection jQuery . each ( modules , function ( sName ) { this . set ( oResult , sName , false , true ) ; } . bind ( this ) ) ; // apply current debug info as tree selection if ( vDebugInfo === true || vDebugInfo === 'x' || vDebugInfo === 'X' ) { this . set ( oResult , '/' , true ) ; } else if ( vDebugInfo && typeof vDebugInfo === 'string' ) { vDebugInfo . split ( / , / ) . forEach ( function ( sPattern ) { if ( / \* / . test ( sPattern ) ) { // if a glob pattern is found, select all modules that are matched by it var rFilter = new RegExp ( "^(?:" + this . makeRegExp ( sPattern ) + ")" ) ; // collect namespaces var oNamespacesAndModules = { } ; Object . keys ( modules ) . forEach ( function ( sModule ) { var sModulePath = sModule . split ( "/" ) . slice ( 0 , - 1 ) . join ( "/" ) + "/" ; oNamespacesAndModules [ sModulePath ] = "" ; } ) ; // join namespaces and modules object for ( var sKey in modules ) { oNamespacesAndModules [ sKey ] = modules [ sKey ] ; } jQuery . each ( oNamespacesAndModules , function ( sName ) { if ( rFilter . test ( sName ) ) { this . set ( oResult , sName , true ) ; } } . bind ( this ) ) ; } else { // for simple package / module names, just select the corresponding tree node this . set ( oResult , sPattern , true ) ; } } . bind ( this ) ) ; } }
Converts a module object to a module hierarchy with selections state based on sap-ui-debug
@param {object} oModules Flat object of modules
@param {object} oResult Hierarchical tree of modules including selection state
Converts a module object to a module hierarchy with selections state based on sap - ui - debug
Creates a tree with all modules that match the current debug info