private static <P extends JpsElement> void changeType(SourceFolder root, @NotNull JpsModuleSourceRootPropertiesSerializer<P> serializer, @Nullable Element serializedProps) {
    root.changeType(
      serializer.getType(),
      serializedProps != null ? serializer.loadProperties(serializedProps) : serializer.getType().createDefaultProperties()
    );
  }
private static <P extends JpsElement> void changeType(SourceFolder root, @NotNull JpsModuleSourceRootPropertiesSerializer<P> serializer, @Nullable Element serializedProps)