public static void initialize(@NonNull final MenuItem menuItem, @NonNull final Geocache cache, @NonNull final Callback callback) {
        final ActionProvider actionProvider = MenuItemCompat.getActionProvider(menuItem);
        if (actionProvider instanceof WaypointSelectionActionProvider) {
            final WaypointSelectionActionProvider waypointsAction = (WaypointSelectionActionProvider) actionProvider;
            waypointsAction.setCallback(callback);
            waypointsAction.setCache(cache);
            menuItem.setVisible(hasTargets(cache));
        }
    }
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