code: protected static List<CmsSelectWidgetOption> getFormatterOptionsStatic(
          CmsObject cms,
          CmsADEConfigData config,
          String rootPath,
          boolean allRemoved) {
  
          Map<CmsUUID, I_CmsFormatterBean> inactiveFormatters = config.getInactiveFormatters();
          List<CmsSelectWidgetOption> result = Lists.newArrayList();
          List<I_CmsFormatterBean> formatters = Lists.newArrayList(inactiveFormatters.values());
          if (allRemoved) {
              Map<CmsUUID, I_CmsFormatterBean> activeFormatters = config.getActiveFormatters();
              formatters.addAll(Lists.newArrayList(activeFormatters.values()));
          }
          Collections.sort(formatters, new A_CmsFormatterWidget.FormatterSelectComparator());
          for (I_CmsFormatterBean formatterBean : formatters) {
              if ((formatterBean instanceof CmsFunctionFormatterBean)
                  || (formatterBean instanceof CmsSchemaFormatterBeanWrapper)) {
                  continue;
              }
  
              if (formatterBean instanceof CmsMacroFormatterBean) {
                  boolean systemOrShared = formatterBean.getLocation().startsWith(CmsResource.VFS_FOLDER_SYSTEM + "/")
                      || formatterBean.getLocation().startsWith(OpenCms.getSiteManager().getSharedFolder());
                  if (!systemOrShared) {
                      String formatterSubSite = CmsResource.getParentFolder(
                          CmsResource.getParentFolder(CmsResource.getParentFolder(formatterBean.getLocation())));
                      String subSite = CmsResource.getParentFolder(CmsResource.getParentFolder(rootPath));
                      if (subSite.equals(formatterSubSite) || !subSite.startsWith(formatterSubSite)) {
                          // we ignore macro formatters that are defined in the current sub site (they are added automatically), or not within a parent site
                          continue;
                      }
                  }
              }
              try {
                  CmsSelectWidgetOption option = getWidgetOptionForFormatter(cms, formatterBean);
                  result.add(option);
              } catch (Exception e) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
          return result;
  
      }
docs: Gets the options corresponding to external (non-schema) formatters.<p>
  
  @param cms the CMS context
  @param config the ADE configuration
  @param rootPath the root path of the edited file
  @param allRemoved flag, indicating if all inheritedly available formatters should be disabled
  
  @return the select widget options for the external formatters