src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js
function (aButtons) {
			var iVisibleButtons = 0;
			for (var i = 0; i < aButtons.length; i++) {
				if (iVisibleButtons < this.getMaxButtonsDisplayed() && aButtons[i].getVisible()) {
					iVisibleButtons++;
				} else {
					aButtons[i].setVisible(false);
				}
			}

			return iVisibleButtons;
		}
function (aButtons) {
			var iVisibleButtons = 0;
			for (var i = 0; i < aButtons.length; i++) {
				if (iVisibleButtons < this.getMaxButtonsDisplayed() && aButtons[i].getVisible()) {
					iVisibleButtons++;
				} else {
					aButtons[i].setVisible(false);
				}
			}

			return iVisibleButtons;
		}
function ( aButtons ) { var iVisibleButtons = 0 ; for ( var i = 0 ; i < aButtons . length ; i ++ ) { if ( iVisibleButtons < this . getMaxButtonsDisplayed ( ) && aButtons [ i ] . getVisible ( ) ) { iVisibleButtons ++ ; } else { aButtons [ i ] . setVisible ( false ) ; } } return iVisibleButtons ; }
Hides the buttons in overflow
@param {array} aButtons some Buttons
@return {int} the number of visible buttons
Hides the buttons in overflow