code: public static PrettyContext getCurrentInstance(final FacesContext context)
     {
        Assert.notNull(context, "FacesContext argument was null.");
        return getCurrentInstance((HttpServletRequest) context.getExternalContext().getRequest());
     }
docs: Get the current PrettyFaces context object, or construct a new one if it
  does not yet exist for this request. (Delegates to {@link FacesContext} to
  retrieve the current {@link HttpServletRequest} object)
  
  @return current context instance