public class InternalNodeModelUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
InternalNodeModelUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static AbstractNode |
basicGetFirstChild(CompositeNode node)
Obtain the first child node of the given node.
|
protected static AbstractNode |
basicGetLastChild(CompositeNode node)
Obtain the last child node of the given node.
|
protected static CompositeNode |
basicGetParent(AbstractNode node)
Obtain the parent node of the given node.
|
protected static int[] |
computeLineBreaks(java.lang.String text)
Computes the line breaks in the given text and returns an array of offsets.
|
protected static org.eclipse.xtext.util.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 org.eclipse.xtext.util.LineAndColumn |
getLineAndColumn(java.lang.String text,
int[] lineBreaks,
int offset) |
protected static org.eclipse.xtext.util.LineAndColumn getLineAndColumn(INode anyNode, int documentOffset)
protected static CompositeNode basicGetParent(AbstractNode node)
synthetic
nodes. May return null.protected static AbstractNode basicGetFirstChild(CompositeNode node)
synthetic
nodes. May return null.protected static AbstractNode basicGetLastChild(CompositeNode node)
synthetic
nodes. May return null.protected static org.eclipse.xtext.util.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 line-break 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.