code: protected boolean isMacroOrFlexFormatter(int type, String rootPath) {
  
          boolean result = false;
          try {
              I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(type);
              result = (CmsFormatterConfigurationCache.TYPE_MACRO_FORMATTER.equals(resType.getTypeName())
                  || CmsFormatterConfigurationCache.TYPE_FLEX_FORMATTER.equals(resType.getTypeName()))
                  && CmsResource.getParentFolder(rootPath).endsWith("/.content/.formatters");
          } catch (Exception e) {
              LOG.debug(e.getMessage(), e);
          }
          return result;
      }
docs: Checks whether the given type id matches the id of the macro formatter or flex formatter resource type.<p>
  Also checks if the file is located in a '/.content/.formatters' folder.<p>
  
  @param type the type id
  @param rootPath the root path
  
  @return <code>true</code> in case of a macro or flex formatter