docs: private void readFormatsConfig(GalleryMode mode, boolean isNativeWidget, boolean overrideFormats) {
  
          switch (mode) {
              case editor:
                  if (!overrideFormats) {
                      m_useFormats = true;
                      m_formatNames = DEFAULT_FORMAT_NAMES;
                      m_formatValues = DEFAULT_FORMAT_VALUES;
                  } else {
                      if ((m_formatNames == null) && m_useFormats) {
                          m_formatNames = DEFAULT_FORMAT_NAMES;
                      }
                      if ((m_formatValues == null) && m_useFormats) {
                          m_formatValues = DEFAULT_FORMAT_VALUES;
                      }
                  }
                  break;
              case widget:
                  if (!isNativeWidget) {
                      m_useFormats = CmsPreviewUtil.isShowFormats();
                      if (m_useFormats) {
                          m_formatValues = CmsPreviewUtil.getFormats();
                          if (m_formatValues == null) {
                              m_formatNames = DEFAULT_FORMAT_NAMES;
                              m_formatValues = DEFAULT_FORMAT_VALUES;
                          } else {
                              m_formatNames = CmsPreviewUtil.getFormatNames();
                          }
                      }
                  } else if (m_useFormats && (m_formatValues == null)) {
                      m_formatNames = DEFAULT_FORMAT_NAMES;
                      m_formatValues = DEFAULT_FORMAT_VALUES;
                  }
                  break;
              case ade:
              case view:
              case adeView:
                  m_useFormats = false;
                  break;
              default:
          }
      }