docs: private List<FormatterOption> getFormatterOptions(CmsObject cms, CmsResource resource) {
  
          List<FormatterOption> options = new ArrayList<FormatterOption>();
          Set<String> containerTypes = new HashSet<>();
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_displayContainerTypeConfig)) {
              String types = null;
  
              if (CmsPropertyDefinition.PROPERTY_TEMPLATE_DISPLAY_TYPES.equals(m_displayContainerTypeConfig)) {
                  try {
                      CmsProperty prop = cms.readPropertyObject(
                          resource,
                          CmsPropertyDefinition.PROPERTY_TEMPLATE_DISPLAY_TYPES,
                          true);
                      String propValue = prop.getValue();
                      if (!CmsStringUtil.isEmptyOrWhitespaceOnly(propValue)) {
                          types = propValue;
                      } else {
                          // look up template property
                          try {
                              CmsTemplateLoaderFacade loaderFacade = OpenCms.getResourceManager().getTemplateLoaderFacade(
                                  cms,
                                  null,
                                  resource,
                                  CmsPropertyDefinition.PROPERTY_TEMPLATE);
                              CmsResource template = loaderFacade.getLoaderStartResource();
                              if (template != null) {
                                  prop = cms.readPropertyObject(
                                      template,
                                      CmsPropertyDefinition.PROPERTY_TEMPLATE_DISPLAY_TYPES,
                                      false);
                                  propValue = prop.getValue();
                                  if (!CmsStringUtil.isEmptyOrWhitespaceOnly(propValue)) {
                                      types = propValue;
                                  }
                              }
                          } catch (Exception ex) {
                              LOG.debug(ex.getMessage(), ex);
                          }
                      }
                  } catch (CmsException e) {
                      LOG.warn(e.getLocalizedMessage(), e);
                  }
              } else {
                  types = m_displayContainerTypeConfig;
              }
              if (types != null) {
                  containerTypes.addAll(Arrays.asList(types.split(TYPES_SPLITTER)));
              }
          }
          CmsADEConfigData config = OpenCms.getADEManager().lookupConfiguration(cms, resource.getRootPath());
  
          if (config != null) {
              Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms);
              for (I_CmsFormatterBean formatter : config.getDisplayFormatters(cms)) {
                  if (!containerTypes.isEmpty()) {
                      if (Sets.intersection(containerTypes, formatter.getContainerTypes()).isEmpty()) {
                          continue;
                      }
                  }
                  for (String typeName : formatter.getResourceTypeNames()) {
                      String label = formatter.getNiceName(wpLocale)
                          + " ("
                          + CmsWorkplaceMessages.getResourceTypeName(wpLocale, typeName)
                          + ")";
                      options.add(
                          new FormatterOption(
                              typeName + CmsXmlDisplayFormatterValue.SEPARATOR + formatter.getId(),
                              typeName,
                              getDisplayType(formatter),
                              label,
                              formatter.getRank()));
                  }
              }
          }
          Collections.sort(options, new FormatterComparator());
          return options;
      }