function parseAndLoadRequireContext(xmlNode, bAsync) {
		var sCoreContext = xmlNode.getAttributeNS(CORE_NAMESPACE, "require"),
			oRequireContext,
			oModules,
			sErrorMessage;

		if (sCoreContext) {
			try {
				oRequireContext = JSTokenizer.parseJS(sCoreContext);
			} catch (e) {
				Log.error("Require attribute can't be parsed on Node: ", xmlNode.nodeName);
				throw e;
			}

			sErrorMessage = validateRequireContext(oRequireContext);
			if (sErrorMessage) {
				throw new Error(sErrorMessage + " on Node: " + xmlNode.nodeName);
			}

			if (!isEmptyObject(oRequireContext)) {
				oModules = {};
				if (bAsync) {
					return new Promise(function(resolve, reject) {
						// check whether all modules have been loaded already, avoids nested setTimeout calls
						var bAllLoaded = Object.keys(oRequireContext).reduce(function(bAll, sKey) {
							oModules[sKey] = sap.ui.require(oRequireContext[sKey]);
							return bAll && oModules[sKey] !== undefined;
						}, true);
						if ( bAllLoaded ) {
							resolve(oModules);
							return;
						}
						// fall back to async loading
						sap.ui.require(values(oRequireContext), function() {
							var aLoadedModules = arguments;
							Object.keys(oRequireContext).forEach(function(sKey, i) {
								oModules[sKey] = aLoadedModules[i];
							});
							resolve(oModules);
						}, reject);
					});
				} else {
					Object.keys(oRequireContext).forEach(function(sKey) {
						oModules[sKey] = sap.ui.requireSync(oRequireContext[sKey]); // legacy-relevant: Sync path
					});

					return SyncPromise.resolve(oModules);
				}
			}
		}
	}
/**
	 * Extract module information which is defined with the "require" attribute under "sap.ui.core" namespace
	 * and load the modules when there are some defined
	 *
	 * @param {Element} xmlNode The current XMLNode which is being processed
	 * @param {boolean} bAsync Whether the view is processed asynchronously
	 *
	 * @return {promise|undefined} The promise resolves after all modules are loaded. If the given xml node
	 *  doesn't have require context defined, undefined is returned.
	 */
Extract module information which is defined with the "require" attribute under "sap.ui.core" namespace
and load the modules when there are some defined

@param {Element} xmlNode The current XMLNode which is being processed
@param {boolean} bAsync Whether the view is processed asynchronously

@return {promise|undefined} The promise resolves after all modules are loaded. If the given xml node
doesn't have require context defined, undefined is returned.
Extract module information which is defined with the " require " attribute under " sap . ui . core " namespace and load the modules when there are some defined @param { Element } xmlNode The current XMLNode which is being processed @param { boolean } bAsync Whether the view is processed asynchronously @return { promise|undefined } The promise resolves after all modules are loaded . If the given xml node doesn ' t have require context defined undefined is returned .
function parseAndLoadRequireContext(xmlNode, bAsync) {
		var sCoreContext = xmlNode.getAttributeNS(CORE_NAMESPACE, "require"),
			oRequireContext,
			oModules,
			sErrorMessage;
		if (sCoreContext) {
			try {
				oRequireContext = JSTokenizer.parseJS(sCoreContext);
			} catch (e) {
				Log.error("Require attribute can't be parsed on Node: ", xmlNode.nodeName);
				throw e;
			}
			sErrorMessage = validateRequireContext(oRequireContext);
			if (sErrorMessage) {
				throw new Error(sErrorMessage + " on Node: " + xmlNode.nodeName);
			}
			if (!isEmptyObject(oRequireContext)) {
				oModules = {};
				if (bAsync) {
					return new Promise(function(resolve, reject) {
						var bAllLoaded = Object.keys(oRequireContext).reduce(function(bAll, sKey) {
							oModules[sKey] = sap.ui.require(oRequireContext[sKey]);
							return bAll && oModules[sKey] !== undefined;
						}, true);
						if ( bAllLoaded ) {
							resolve(oModules);
							return;
						}
						sap.ui.require(values(oRequireContext), function() {
							var aLoadedModules = arguments;
							Object.keys(oRequireContext).forEach(function(sKey, i) {
								oModules[sKey] = aLoadedModules[i];
							});
							resolve(oModules);
						}, reject);
					});
				} else {
					Object.keys(oRequireContext).forEach(function(sKey) {
						oModules[sKey] = sap.ui.requireSync(oRequireContext[sKey]); 
					});
					return SyncPromise.resolve(oModules);
				}
			}
		}
	}
function parseAndLoadRequireContext ( xmlNode , bAsync ) { var sCoreContext = xmlNode . getAttributeNS ( CORE_NAMESPACE , "require" ) , oRequireContext , oModules , sErrorMessage ; if ( sCoreContext ) { try { oRequireContext = JSTokenizer . parseJS ( sCoreContext ) ; } catch ( e ) { Log . error ( "Require attribute can't be parsed on Node: " , xmlNode . nodeName ) ; throw e ; } sErrorMessage = validateRequireContext ( oRequireContext ) ; if ( sErrorMessage ) { throw new Error ( sErrorMessage + " on Node: " + xmlNode . nodeName ) ; } if ( ! isEmptyObject ( oRequireContext ) ) { oModules = { } ; if ( bAsync ) { return new Promise ( function ( resolve , reject ) { var bAllLoaded = Object . keys ( oRequireContext ) . reduce ( function ( bAll , sKey ) { oModules [ sKey ] = sap . ui . require ( oRequireContext [ sKey ] ) ; return bAll && oModules [ sKey ] !== undefined ; } , true ) ; if ( bAllLoaded ) { resolve ( oModules ) ; return ; } sap . ui . require ( values ( oRequireContext ) , function ( ) { var aLoadedModules = arguments ; Object . keys ( oRequireContext ) . forEach ( function ( sKey , i ) { oModules [ sKey ] = aLoadedModules [ i ] ; } ) ; resolve ( oModules ) ; } , reject ) ; } ) ; } else { Object . keys ( oRequireContext ) . forEach ( function ( sKey ) { oModules [ sKey ] = sap . ui . requireSync ( oRequireContext [ sKey ] ) ; } ) ; return SyncPromise . resolve ( oModules ) ; } } } }
Extract module information which is defined with the "require" attribute under "sap.ui.core" namespace
 and load the modules when there are some defined
Extract module information which is defined with the " require " attribute under " sap . ui . core " namespace and load the modules when there are some defined
// check whether all modules have been loaded already, avoids nested setTimeout calls // fall back to async loading // legacy-relevant: Sync path