public static String generateIndentation(String indentation, int length)
    {
        if (indentation == null)
            indentation = "";

        StringBuilder builder = new StringBuilder(indentation);
        for (int i = 0; i < length; i++)
            builder.append(' ');

        return builder.toString();
    }
Kind of preprocessor for proto files. Able to extend one messages with fields from other ones.

@author Ivan Prisyazhniy, Igor Scherbak
@created Mar 9, 2012
protostuff-compiler/src/main/java/io/protostuff/compiler/ProtoToProtoCompiler.java