void collect() {
        for (Trees.TemplatePart part : template.parts()) {
          if (part instanceof TextBlock) {
            collectTextParts(((TextBlock) part).parts());
          } else {
            flushFragment();
            results.add(part);
          }
        }

        flushFragment();
      }
Spacing trimming and redistribution should be run before balancing
generator-processor/src/org/immutables/generator/processor/Spacing.java