void collectTextParts(Iterable<TextPart> parts) {
        for (Trees.TextPart text : parts) {
          if (text instanceof TextFragment) {
            if (fragment != null) {
              fragment = joinFraments(fragment, (TextFragment) text);
            } else {
              flushFragment();
              fragment = (TextFragment) text;
            }
          }
          if (text instanceof Newline) {
            flushNewline();
          }
        }
      }
Spacing trimming and redistribution should be run before balancing
generator-processor/src/org/immutables/generator/processor/Spacing.java