src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (sRule, bAsync) {
			var sCheckFunction = this.model.getProperty(sRule + "/check");

			if (!sCheckFunction) {
				return;
			}

			// Check if a function is found
			var oMatch = sCheckFunction.match(/function[^(]*\(([^)]*)\)/);

			if (!oMatch) {
				return;
			}

			// Get the parameters of the function found and trim, then split by word.
			var aParams = oMatch[1].trim().split(/\W+/);
			// Add missing parameters to ensure the resolve function is passed on the correct position.
			aParams[0] = aParams[0] || "oIssueManager";
			aParams[1] = aParams[1] || "oCoreFacade";
			aParams[2] = aParams[2] || "oScope";

			// If async add a fnResolve to the template else remove it.
			if (bAsync) {
				aParams[3] = aParams[3] || "fnResolve";
			} else {
				aParams = aParams.slice(0, 3);
			}

			// Replace the current parameters with the new ones.
			var sNewCheckFunction = sCheckFunction.replace(/function[^(]*\(([^)]*)\)/, "function (" + aParams.join(", ") + ")");

			this.model.setProperty(sRule + "/check", sNewCheckFunction);
		}
function (sRule, bAsync) {
			var sCheckFunction = this.model.getProperty(sRule + "/check");

			if (!sCheckFunction) {
				return;
			}

			// Check if a function is found
			var oMatch = sCheckFunction.match(/function[^(]*\(([^)]*)\)/);

			if (!oMatch) {
				return;
			}

			// Get the parameters of the function found and trim, then split by word.
			var aParams = oMatch[1].trim().split(/\W+/);
			// Add missing parameters to ensure the resolve function is passed on the correct position.
			aParams[0] = aParams[0] || "oIssueManager";
			aParams[1] = aParams[1] || "oCoreFacade";
			aParams[2] = aParams[2] || "oScope";

			// If async add a fnResolve to the template else remove it.
			if (bAsync) {
				aParams[3] = aParams[3] || "fnResolve";
			} else {
				aParams = aParams.slice(0, 3);
			}

			// Replace the current parameters with the new ones.
			var sNewCheckFunction = sCheckFunction.replace(/function[^(]*\(([^)]*)\)/, "function (" + aParams.join(", ") + ")");

			this.model.setProperty(sRule + "/check", sNewCheckFunction);
		}
function ( sRule , bAsync ) { var sCheckFunction = this . model . getProperty ( sRule + "/check" ) ; if ( ! sCheckFunction ) { return ; } // Check if a function is found var oMatch = sCheckFunction . match ( / function[^(]*\(([^)]*)\) / ) ; if ( ! oMatch ) { return ; } // Get the parameters of the function found and trim, then split by word. var aParams = oMatch [ 1 ] . trim ( ) . split ( / \W+ / ) ; // Add missing parameters to ensure the resolve function is passed on the correct position. aParams [ 0 ] = aParams [ 0 ] || "oIssueManager" ; aParams [ 1 ] = aParams [ 1 ] || "oCoreFacade" ; aParams [ 2 ] = aParams [ 2 ] || "oScope" ; // If async add a fnResolve to the template else remove it. if ( bAsync ) { aParams [ 3 ] = aParams [ 3 ] || "fnResolve" ; } else { aParams = aParams . slice ( 0 , 3 ) ; } // Replace the current parameters with the new ones. var sNewCheckFunction = sCheckFunction . replace ( / function[^(]*\(([^)]*)\) / , "function (" + aParams . join ( ", " ) + ")" ) ; this . model . setProperty ( sRule + "/check" , sNewCheckFunction ) ; }
Add fnResolve to the check function when async is set to true otherwise removes it.
@private
@param {string} sRule the model path to edit or new rule
@param {bAsync} bAsync the async property of the rule
Add fnResolve to the check function when async is set to true otherwise removes it .