src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js
function(oElement, mActions){
			var oModel = oElement.getModel();
			var mRevealData = mActions.reveal;
			var mAddODataProperty = mActions.addODataProperty;
			var mCustom = mActions.custom;
			var oDefaultAggregation = oElement.getMetadata().getAggregation();
			var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mActions.aggregation;

			return Promise.resolve()
				.then(function () {
					return _getODataPropertiesOfModel(oElement, sAggregationName);
				})
				.then(function(mData) {
					var aODataProperties = mData.property;
					var aODataNavigationProperties = mData.navigationProperty.map(function (mNavigation) {
						return mNavigation.name;
					});
					var aODataNavigationEntityNames = mData.navigationEntityNames;

					aODataProperties = _checkForComplexDuplicates(aODataProperties);

					var aAllElementData = [];
					var aInvisibleElements = mRevealData.elements || [];

					aInvisibleElements.forEach(function(mInvisibleElement) {
						var oInvisibleElement = mInvisibleElement.element;
						var mAction = mInvisibleElement.action;
						var bIncludeElement = true;
						var mBindingPathCollection = {};
						oInvisibleElement.fieldLabel = ElementUtil.getLabelForElement(oInvisibleElement, mAction.getLabel);

						// BCP: 1880498671
						if (mAddODataProperty) {
							if (_getBindingPath(oElement, sAggregationName) === _getBindingPath(oInvisibleElement, sAggregationName)) {
								//TODO fix with stashed type support
								mBindingPathCollection = BindingsExtractor.collectBindingPaths(oInvisibleElement, oModel);
								oInvisibleElement.duplicateComplexName = _checkForDuplicateLabels(oInvisibleElement, aODataProperties);

								//Add information from the oDataProperty to the InvisibleProperty if available;
								//if oData is available and the element is not present in it, do not include it
								//Example use case: custom field which was hidden and then removed from system
								//should not be available for adding after the removal
								if (aODataProperties.length > 0){
									bIncludeElement = _checkAndEnhanceODataProperty(
										oInvisibleElement,
										aODataProperties,
										aODataNavigationProperties,
										aODataNavigationEntityNames,
										mBindingPathCollection);
								}
							} else if (BindingsExtractor.getBindings(oInvisibleElement, oModel).length > 0) {
								bIncludeElement = false;
							}
						}

						if (mCustom && bIncludeElement) {
							mCustom.items.forEach(function(oCustomItem) {
								_assignCustomItemIds(oElement.getParent().getId(), oCustomItem);
								if (oCustomItem.itemId === oInvisibleElement.getId()) {
									_enhanceInvisibleElement(oInvisibleElement, oCustomItem);
								}
							});
						}

						if (bIncludeElement) {
							aAllElementData.push({
								element : oInvisibleElement,
								action : mAction,
								bindingPathCollection: mBindingPathCollection
							});
						}
					});
					return aAllElementData;
				})
				.then(function(aAllElementData) {
					return aAllElementData.map(_elementToAdditionalElementInfo);
				});
		}
function(oElement, mActions){
			var oModel = oElement.getModel();
			var mRevealData = mActions.reveal;
			var mAddODataProperty = mActions.addODataProperty;
			var mCustom = mActions.custom;
			var oDefaultAggregation = oElement.getMetadata().getAggregation();
			var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mActions.aggregation;

			return Promise.resolve()
				.then(function () {
					return _getODataPropertiesOfModel(oElement, sAggregationName);
				})
				.then(function(mData) {
					var aODataProperties = mData.property;
					var aODataNavigationProperties = mData.navigationProperty.map(function (mNavigation) {
						return mNavigation.name;
					});
					var aODataNavigationEntityNames = mData.navigationEntityNames;

					aODataProperties = _checkForComplexDuplicates(aODataProperties);

					var aAllElementData = [];
					var aInvisibleElements = mRevealData.elements || [];

					aInvisibleElements.forEach(function(mInvisibleElement) {
						var oInvisibleElement = mInvisibleElement.element;
						var mAction = mInvisibleElement.action;
						var bIncludeElement = true;
						var mBindingPathCollection = {};
						oInvisibleElement.fieldLabel = ElementUtil.getLabelForElement(oInvisibleElement, mAction.getLabel);

						// BCP: 1880498671
						if (mAddODataProperty) {
							if (_getBindingPath(oElement, sAggregationName) === _getBindingPath(oInvisibleElement, sAggregationName)) {
								//TODO fix with stashed type support
								mBindingPathCollection = BindingsExtractor.collectBindingPaths(oInvisibleElement, oModel);
								oInvisibleElement.duplicateComplexName = _checkForDuplicateLabels(oInvisibleElement, aODataProperties);

								//Add information from the oDataProperty to the InvisibleProperty if available;
								//if oData is available and the element is not present in it, do not include it
								//Example use case: custom field which was hidden and then removed from system
								//should not be available for adding after the removal
								if (aODataProperties.length > 0){
									bIncludeElement = _checkAndEnhanceODataProperty(
										oInvisibleElement,
										aODataProperties,
										aODataNavigationProperties,
										aODataNavigationEntityNames,
										mBindingPathCollection);
								}
							} else if (BindingsExtractor.getBindings(oInvisibleElement, oModel).length > 0) {
								bIncludeElement = false;
							}
						}

						if (mCustom && bIncludeElement) {
							mCustom.items.forEach(function(oCustomItem) {
								_assignCustomItemIds(oElement.getParent().getId(), oCustomItem);
								if (oCustomItem.itemId === oInvisibleElement.getId()) {
									_enhanceInvisibleElement(oInvisibleElement, oCustomItem);
								}
							});
						}

						if (bIncludeElement) {
							aAllElementData.push({
								element : oInvisibleElement,
								action : mAction,
								bindingPathCollection: mBindingPathCollection
							});
						}
					});
					return aAllElementData;
				})
				.then(function(aAllElementData) {
					return aAllElementData.map(_elementToAdditionalElementInfo);
				});
		}
function ( oElement , mActions ) { var oModel = oElement . getModel ( ) ; var mRevealData = mActions . reveal ; var mAddODataProperty = mActions . addODataProperty ; var mCustom = mActions . custom ; var oDefaultAggregation = oElement . getMetadata ( ) . getAggregation ( ) ; var sAggregationName = oDefaultAggregation ? oDefaultAggregation . name : mActions . aggregation ; return Promise . resolve ( ) . then ( function ( ) { return _getODataPropertiesOfModel ( oElement , sAggregationName ) ; } ) . then ( function ( mData ) { var aODataProperties = mData . property ; var aODataNavigationProperties = mData . navigationProperty . map ( function ( mNavigation ) { return mNavigation . name ; } ) ; var aODataNavigationEntityNames = mData . navigationEntityNames ; aODataProperties = _checkForComplexDuplicates ( aODataProperties ) ; var aAllElementData = [ ] ; var aInvisibleElements = mRevealData . elements || [ ] ; aInvisibleElements . forEach ( function ( mInvisibleElement ) { var oInvisibleElement = mInvisibleElement . element ; var mAction = mInvisibleElement . action ; var bIncludeElement = true ; var mBindingPathCollection = { } ; oInvisibleElement . fieldLabel = ElementUtil . getLabelForElement ( oInvisibleElement , mAction . getLabel ) ; // BCP: 1880498671 if ( mAddODataProperty ) { if ( _getBindingPath ( oElement , sAggregationName ) === _getBindingPath ( oInvisibleElement , sAggregationName ) ) { //TODO fix with stashed type support mBindingPathCollection = BindingsExtractor . collectBindingPaths ( oInvisibleElement , oModel ) ; oInvisibleElement . duplicateComplexName = _checkForDuplicateLabels ( oInvisibleElement , aODataProperties ) ; //Add information from the oDataProperty to the InvisibleProperty if available; //if oData is available and the element is not present in it, do not include it //Example use case: custom field which was hidden and then removed from system //should not be available for adding after the removal if ( aODataProperties . length > 0 ) { bIncludeElement = _checkAndEnhanceODataProperty ( oInvisibleElement , aODataProperties , aODataNavigationProperties , aODataNavigationEntityNames , mBindingPathCollection ) ; } } else if ( BindingsExtractor . getBindings ( oInvisibleElement , oModel ) . length > 0 ) { bIncludeElement = false ; } } if ( mCustom && bIncludeElement ) { mCustom . items . forEach ( function ( oCustomItem ) { _assignCustomItemIds ( oElement . getParent ( ) . getId ( ) , oCustomItem ) ; if ( oCustomItem . itemId === oInvisibleElement . getId ( ) ) { _enhanceInvisibleElement ( oInvisibleElement , oCustomItem ) ; } } ) ; } if ( bIncludeElement ) { aAllElementData . push ( { element : oInvisibleElement , action : mAction , bindingPathCollection : mBindingPathCollection } ) ; } } ) ; return aAllElementData ; } ) . then ( function ( aAllElementData ) { return aAllElementData . map ( _elementToAdditionalElementInfo ) ; } ) ; }
Filters available invisible elements whether they could be shown or not

@param {sap.ui.core.Control} oElement - Container Element where to start search for a invisible
@param {Object} mActions - Container with actions

@return {Promise} - returns a Promise which resolves with a list of hidden controls are available to display
Filters available invisible elements whether they could be shown or not