getMenuItems(aElementOverlays) {
			const aMenuItems = [];
			let oMenuItem;
			this.clearCachedElements();
			// Prevents clearing of cached elements before menu items are build. This happens when evaluate editable is running in parallel
			this._getMenuItemsPromise =
			// getAllElements() is called to set cached elements for the overlay -> which will result in menu item being enabled
			Promise.all([
				this.getAllElements(false, aElementOverlays),
				this.getAllElements(true, aElementOverlays)
			])
			.then(function(aElementsWithAggregations) {
				const bHasChildren = aElementsWithAggregations[0].length > 0;
				const bHasMultipleAggregations = aElementsWithAggregations[0].length > 1;
				const bHasSiblings = aElementsWithAggregations[1].length > 0;
				const bIsAvailableForChildren = this.isAvailable(aElementOverlays, false);
				const bIsAvailableForSibling = this.isAvailable(aElementOverlays, true);
				if (
					bIsAvailableForSibling
					&& (!bIsAvailableForChildren || !bHasChildren)
				) {
					// Case 1: Only siblings -> No submenu required
					oMenuItem = this._buildMenuItem(
						"CTX_ADD_ELEMENTS_AS_SIBLING",
						true,
						aElementOverlays,
						aElementsWithAggregations,
						false
					);
				} else if (
					bIsAvailableForChildren
					&& (!bIsAvailableForSibling || !bHasSiblings)
					&& !bHasMultipleAggregations
				) {
					// Case 2: Only children, one aggregation -> No submenu required
					oMenuItem = this._buildMenuItem(
						"CTX_ADD_ELEMENTS_AS_CHILD",
						false,
						aElementOverlays,
						aElementsWithAggregations,
						false
					);
				} else if (
					bIsAvailableForChildren
					&& (!bIsAvailableForSibling || !bHasSiblings)
					&& bHasMultipleAggregations
				) {
					// Case 3: Only children, multiple aggregations -> Submenu required
					oMenuItem = this._buildMenuItem(
						"CTX_ADD_ELEMENTS_AS_CHILD",
						false,
						aElementOverlays,
						aElementsWithAggregations,
						true
					);
				} else if (
					bIsAvailableForChildren
					&& bIsAvailableForSibling
					&& bHasChildren
					&& bHasSiblings
				) {
					// Case 4: Children and siblings -> Submenu required
					oMenuItem = this._buildMenuItem(
						"CTX_ADD_ELEMENTS_CHILD_AND_SIBLING",
						false,
						aElementOverlays,
						aElementsWithAggregations,
						true
					);
				}
				if (oMenuItem) {
					aMenuItems.push(this.enhanceItemWithResponsibleElement(
						oMenuItem,
						aElementOverlays,
						["addViaDelegate", "reveal", "custom"]
					));
				}
				return aMenuItems;
			}.bind(this));
			return this._getMenuItemsPromise;
		}
Retrieves the context menu item for the actions
Two items are returned here: one for when the overlay is sibling and one for when it is child. In case of multiple
aggregations for child elements, a submenu is built containing all aggregations and the sibling.
@param {sap.ui.dt.ElementOverlay} aElementOverlays - List of overlays for which the context menu was opened
@returns {object[]} Array containing the items with required data