private List<DockingActionIf> getActionsForCodeUnit(Address primaryAddress,
			int maxActionsCount) {
		List<DockingActionIf> actionList = new ArrayList<>();

		Iterator<String> iter = bookmarkNavigators.keySet().iterator();
		while (iter.hasNext() && actionList.size() < maxActionsCount) {
			String bookmarkType = iter.next();
			BookmarkNavigator navigator = bookmarkNavigators.get(bookmarkType);

			List<DockingActionIf> typeDeleteActionList =
				getActionsForCodeUnitAndType(primaryAddress, bookmarkType, navigator);
			addActionsToList(actionList, typeDeleteActionList, maxActionsCount);
		}

		return actionList;
	}
Returns a list of actions to delete bookmarks that are in the code unit surrounding the given
address. The list of actions will not exceed {@code maxActionsCount}

@param primaryAddress The address required to find the containing code unit.
@param maxActionsCount The maximum number of actions to include in the returned list.
@return a list of actions to delete bookmarks that are in the code unit surrounding the given
        address.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/bookmark/BookmarkPlugin.java