private static void writeContentRoot(IonWriter writer, IdeaContentRoot contentRoot) throws IOException {
    writer.stepIn(IonType.STRUCT);
    writeFile(writer, "rootDirectory", contentRoot.getRootDirectory());
    writeSourceDirectories(writer, "sourceDirectories", contentRoot.getSourceDirectories());
    writeSourceDirectories(writer, "testDirectories", contentRoot.getTestDirectories());
    writeSourceDirectories(writer, "resourceDirectories", notNullize(nullizeUnsupported(new ResourceDirectoriesGetter(contentRoot))));
    writeSourceDirectories(writer, "testResourceDirectories",
                           notNullize(nullizeUnsupported(new TestResourceDirectoriesGetter(contentRoot))));
    writeFiles(writer, "excludeDirectories", contentRoot.getExcludeDirectories());
    writer.stepOut();
  }
private static void writeContentRoot(IonWriter writer, IdeaContentRoot contentRoot)