private static @Nullable <P extends JpsElement> Element serializeProperties(SourceFolder root, @NotNull JpsModuleSourceRootPropertiesSerializer<P> serializer) {
    P properties = root.getJpsElement().getProperties(serializer.getType());
    if (properties != null) {
      Element sourceElement = new Element(JpsModuleRootModelSerializer.SOURCE_FOLDER_TAG);
      serializer.saveProperties(properties, sourceElement);
      return sourceElement;
    }
    return null;
  }
private static @Nullable <P extends JpsElement> Element serializeProperties(SourceFolder root, @NotNull JpsModuleSourceRootPropertiesSerializer<P> serializer)