Essentially a char filter that knows how to auto-indent output by maintaining a stack of indent levels. I set a flag upon newline and then next nonwhitespace char resets flag and spits out indention. The indent stack is a stack of strings so we can repeat original indent not just the same number of columns (don't have to worry about tabs vs spaces then). Anchors are char positions (tabs won't work) that indicate where all future wraps should justify to. The wrap position is actually the larger of either the last anchor or the indentation level. This is a filter on a Writer. \n is the proper way to say newline for options and templates. Templates can mix them but use \n for sure and options like wrap="\n". ST will generate the right thing. Override the default (locale) newline by passing in a string to the constructor.
Essentially a char filter that knows how to auto-indent output by maintaining a stack of indent levels. The indent stack is a stack of strings so we can repeat original indent not just the same number of columns (don't have to worry about tabs vs spaces then). Anchors are char positions (tabs won't work) that indicate where all future wraps should justify to. The wrap position is actually the larger of either the last anchor or the indentation level. This is a filter on a Writer. \n is the proper way to say newline for options and templates. Templates can mix \r\n and \n them but use \n for sure in options like wrap="\n". ST will generate the right thing. Override the default (locale) newline by passing in a string to the constructor.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.