private static void writeSourceDirectories(IonWriter writer, String fieldName, DomainObjectSet<? extends IdeaSourceDirectory> directories)
    throws IOException {
    writer.setFieldName(fieldName);
    writer.stepIn(IonType.LIST);
    for (IdeaSourceDirectory sourceDirectory : directories) {
      writer.stepIn(IonType.STRUCT);
      writeBoolean(writer, "generated", sourceDirectory.isGenerated());
      writeFile(writer, "directory", sourceDirectory.getDirectory());
      writer.stepOut();
    }
    writer.stepOut();
  }
private static void writeSourceDirectories(IonWriter writer, String fieldName, DomainObjectSet<? extends IdeaSourceDirectory> directories)