src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/SelectionUtils.js
function (oTreeViewModelRules) {
			var aSelectedRules = storage.getSelectedRules();

			if (!aSelectedRules) {
				return null;
			}

			if (!oTreeViewModelRules) {
				return null;
			}


			aSelectedRules.forEach(function (oRuleDescriptor) {
				Object.keys(oTreeViewModelRules).forEach(function(iKey) {
					oTreeViewModelRules[iKey].nodes.forEach(function(oRule) {
						if (oRule.id === oRuleDescriptor.ruleId) {
							oRule.selected = oRuleDescriptor.selected;
							if (!oRule.selected) {
								oTreeViewModelRules[iKey].selected = false;
							}
						}
					});
				});
			});

			return oTreeViewModelRules;
		}
function (oTreeViewModelRules) {
			var aSelectedRules = storage.getSelectedRules();

			if (!aSelectedRules) {
				return null;
			}

			if (!oTreeViewModelRules) {
				return null;
			}


			aSelectedRules.forEach(function (oRuleDescriptor) {
				Object.keys(oTreeViewModelRules).forEach(function(iKey) {
					oTreeViewModelRules[iKey].nodes.forEach(function(oRule) {
						if (oRule.id === oRuleDescriptor.ruleId) {
							oRule.selected = oRuleDescriptor.selected;
							if (!oRule.selected) {
								oTreeViewModelRules[iKey].selected = false;
							}
						}
					});
				});
			});

			return oTreeViewModelRules;
		}
function ( oTreeViewModelRules ) { var aSelectedRules = storage . getSelectedRules ( ) ; if ( ! aSelectedRules ) { return null ; } if ( ! oTreeViewModelRules ) { return null ; } aSelectedRules . forEach ( function ( oRuleDescriptor ) { Object . keys ( oTreeViewModelRules ) . forEach ( function ( iKey ) { oTreeViewModelRules [ iKey ] . nodes . forEach ( function ( oRule ) { if ( oRule . id === oRuleDescriptor . ruleId ) { oRule . selected = oRuleDescriptor . selected ; if ( ! oRule . selected ) { oTreeViewModelRules [ iKey ] . selected = false ; } } } ) ; } ) ; } ) ; return oTreeViewModelRules ; }
Traverses the model and updates the selection flag for the selected rules

@returns {Array} Rule selections array
Traverses the model and updates the selection flag for the selected rules