private void addWaypoints(final SubMenu subMenu) {
        subMenu.clear();
        for (final Waypoint waypoint : geocache.getWaypoints()) {
            if (waypoint.getCoords() != null) {
                subMenu.add(Menu.NONE, waypoint.getId(), Menu.NONE, waypoint.getName()).setOnMenuItemClickListener(item -> {
                    callback.onWaypointSelected(waypoint);
                    return true;
                });
            }
        }
        subMenu.add(Menu.NONE, Menu.NONE, Menu.NONE, getContext().getString(R.string.cache)).setOnMenuItemClickListener(item -> {
            callback.onGeocacheSelected(geocache);
            return true;
        });
    }
Creates a new instance. ActionProvider classes should always implement a
constructor that takes a single Context parameter for inflating from menu XML.

@param context Context for accessing resources.
main/src/main/java/cgeo/geocaching/ui/WaypointSelectionActionProvider.java