@ApiStatus.Internal
  @Nullable
  public static Element saveFacetConfiguration(Facet<?> facet) {
    final Element config;
    try {
      FacetConfiguration configuration = facet.getConfiguration();
      config = saveFacetConfiguration(configuration);
      if (facet instanceof JDOMExternalizable) {
        ((JDOMExternalizable)facet).writeExternal(config);
      }
    }
    catch (WriteExternalException e) {
      return null;
    }
    return config;
  }
@ApiStatus.Internal
  @Nullable
  public static Element saveFacetConfiguration(Facet<?> facet)