code: public static CmsSelectWidgetOption getWidgetOptionForFormatter(CmsObject cms, I_CmsFormatterBean formatter)
      throws Exception {
  
          String name = formatter.getNiceName(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms))
              + " "
              + formatter.getResourceTypeNames().toString()
              + "  "
              + " ("
              + formatter.getJspRootPath()
              + ")";
          String path = cms.readResource(
              new CmsUUID(formatter.getId()),
              CmsResourceFilter.ONLY_VISIBLE_NO_DELETED).getRootPath();
          CmsSelectWidgetOption option = new CmsSelectWidgetOption(path, false, name);
          return option;
      }
docs: Creates a widget option corresponding to a formatter bean for an external formatter.<p>
  
  @param cms the current CMS context
  @param formatter the formatter bean
  
  @return the select option which was created
  
  @throws Exception in case reading the formatter configuration file fails