Class TextBlockUtil
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.util.TextBlockUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic char[][]convertTextBlockToLines(char[] all) Converts the given string content into separate lines by Normalizing all the CR and CRLT to LF Split them with LF as delimitersstatic char[]formatTextBlock(char[][] lines, int indent) static char[]formatTextBlock(char[][] lines, int indent, boolean followsExp, boolean precedesExp) static intgetWhitespacePrefix(char[][] lines) Computes the common whitespace prefix of the given set of lines and returns.
-
Constructor Details
-
TextBlockUtil
public TextBlockUtil()
-
-
Method Details
-
convertTextBlockToLines
public static char[][] convertTextBlockToLines(char[] all) Converts the given string content into separate lines by- Normalizing all the CR and CRLT to LF
- Split them with LF as delimiters
- Parameters:
all-- Returns:
- an array or lines, each line represented by char[]
-
getWhitespacePrefix
public static int getWhitespacePrefix(char[][] lines) Computes the common whitespace prefix of the given set of lines and returns. Only non empty lines, except the last line, are considered for this.- Parameters:
lines-- Returns:
- the common whitespace prefix
-
formatTextBlock
public static char[] formatTextBlock(char[][] lines, int indent) -
formatTextBlock
public static char[] formatTextBlock(char[][] lines, int indent, boolean followsExp, boolean precedesExp)
-