public class InternalNodeModelUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
InternalNodeModelUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static int[] |
computeLineBreaks(java.lang.String text)
Computes the line breaks in the given text and returns an array of offsets.
|
protected static LineAndColumn |
getLineAndColumn(INode anyNode,
int documentOffset)
Obtain the line breaks from the document and search / compute the line number
and column number at the given document offset.
|
protected static LineAndColumn |
getLineAndColumn(java.lang.String text,
int[] lineBreaks,
int offset) |
protected static LineAndColumn getLineAndColumn(INode anyNode, int documentOffset)
protected static LineAndColumn getLineAndColumn(java.lang.String text, int[] lineBreaks, int offset)
protected static int[] computeLineBreaks(java.lang.String text)
Computes the line breaks in the given text and returns an array of offsets.
A line break is either \r\n, \n, or a single \r.
org.eclipse.jface.text.DefaultLineTracker.
It follows the semantics of LineNumberReader.
The offsets in the returned array are the offset of the line break itself. If the linebreak contains
of two characters ('\r\n'), it's the offset of the first char ('\r').text - the text whose line-breaks should be computed. May not be null.null.