public class RootNode extends CompositeNodeWithSemanticElementAndSyntaxError
| Constructor and Description |
|---|
RootNode() |
| Modifier and Type | Method and Description |
|---|---|
protected int[] |
basicGetLineBreakOffsets()
Returns an array that contains the offsets of each line break in the input.
|
protected AbstractNode |
basicGetNextSibling() |
protected AbstractNode |
basicGetPreviousSibling() |
protected boolean |
basicHasNextSibling() |
protected boolean |
basicHasPreviousSibling() |
protected void |
basicSetCompleteContent(java.lang.String completeContent) |
protected void |
basicSetNextSibling(AbstractNode next) |
protected void |
basicSetParent(CompositeNode parent) |
protected void |
basicSetPreviousSibling(AbstractNode prev) |
protected int[] |
computeLineBreaks(java.lang.String text) |
void |
fillGrammarElementToIdMap(java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.Integer> grammarElementToIdMap,
java.util.List<java.lang.String> grammarIdToURIMap) |
java.lang.String |
getCompleteContent() |
int |
getIndex() |
INode |
getNextSibling()
Returns the next sibling or
null. |
CompositeNode |
getParent()
Returns the parent of the node or
null if and only if this is the root node. |
INode |
getPreviousSibling()
Returns the previous sibling or
null. |
ICompositeNode |
getRootNode()
Returns the root node of this parse tree.
|
java.lang.String |
getText()
Returns the parsed text that is covered by this node (including hidden tokens).
|
int |
getTotalLength()
Returns the length of this node including hidden tokens.
|
int |
getTotalOffset()
Returns the offset of this node including hidden tokens.
|
boolean |
hasNextSibling()
Returns
true if this node is not the last child of its parent. |
boolean |
hasPreviousSibling()
Returns
true if this node is not the first child of its parent. |
boolean |
hasSiblings()
Returns
true if this node has any siblings. |
basicSetSyntaxErrorMessage, getSyntaxErrorMessagebasicGetSemanticElement, basicSetSemanticElement, getSemanticElement, getTarget, isAdapterForType, notifyChanged, setTargetbasicGetChildren, basicGetFirstChild, basicGetLastChild, basicSetFirstChild, basicSetLookAhead, getChildren, getFirstChild, getGrammarElement, getLastChild, getLookAhead, hasChildren, isFolded, isFolded, resolveAsParentbasicGetGrammarElement, basicGetLineOfOffset, basicGetParent, basicHasSiblings, basicIterator, basicSetGrammarElement, getAsTreeIterable, getEndLine, getEndOffset, getLeafNodes, getLength, getOffset, getStartLine, getTextRegion, getTextRegionWithLineInformation, getTextRegionWithLineInformation, getTotalEndLine, getTotalEndOffset, getTotalStartLine, getTotalTextRegion, getTotalTextRegionWithLineInformation, hasDirectSemanticElement, iterator, reverseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsTreeIterable, getEndLine, getEndOffset, getLeafNodes, getLength, getOffset, getStartLine, getTextRegion, getTextRegionWithLineInformation, getTotalEndLine, getTotalEndOffset, getTotalStartLine, getTotalTextRegion, getTotalTextRegionWithLineInformation, hasDirectSemanticElementpublic CompositeNode getParent()
INodenull if and only if this is the root node.getParent in interface INodegetParent in class AbstractNodenull the root node does not have any parent.public ICompositeNode getRootNode()
INodenull in a consistent tree.getRootNode in interface INodegetRootNode in class AbstractNodenull in a consistent tree.public int getTotalOffset()
INodegetTotalOffset in interface INodegetTotalOffset in class CompositeNodepublic int getTotalLength()
INodegetTotalLength in interface INodegetTotalLength in class CompositeNodepublic java.lang.String getText()
INodenull
but may be empty.getText in interface INodegetText in class AbstractNodenull.public int getIndex()
protected void basicSetCompleteContent(java.lang.String completeContent)
protected int[] basicGetLineBreakOffsets()
null
if the completeContent has not been set.public java.lang.String getCompleteContent()
public INode getNextSibling()
INodegetNextSibling in interface INodegetNextSibling in class AbstractNodenull.INode.hasNextSibling(),
INode.hasSiblings()public INode getPreviousSibling()
INodenull. The result has the same parent
as this node if it is not null.getPreviousSibling in interface INodegetPreviousSibling in class AbstractNodenull.INode.hasPreviousSibling(),
INode.hasSiblings()protected AbstractNode basicGetNextSibling()
basicGetNextSibling in class AbstractNodeprotected AbstractNode basicGetPreviousSibling()
basicGetPreviousSibling in class AbstractNodeprotected boolean basicHasPreviousSibling()
basicHasPreviousSibling in class AbstractNodeprotected boolean basicHasNextSibling()
basicHasNextSibling in class AbstractNodepublic boolean hasPreviousSibling()
INodetrue if this node is not the first child of its parent.hasPreviousSibling in interface INodehasPreviousSibling in class AbstractNodetrue if this node has a previous sibling thus INode.getPreviousSibling() will
not return null.public boolean hasNextSibling()
INodetrue if this node is not the last child of its parent.hasNextSibling in interface INodehasNextSibling in class AbstractNodetrue if this node has a next sibling thus INode.getNextSibling() will
not return null.public boolean hasSiblings()
INodetrue if this node has any siblings.hasSiblings in interface INodehasSiblings in class AbstractNodetrue if this node has any siblings.INode.hasPreviousSibling(),
INode.hasNextSibling()protected void basicSetNextSibling(AbstractNode next)
basicSetNextSibling in class AbstractNodeprotected void basicSetPreviousSibling(AbstractNode prev)
basicSetPreviousSibling in class AbstractNodeprotected void basicSetParent(CompositeNode parent)
basicSetParent in class AbstractNodeprotected int[] computeLineBreaks(java.lang.String text)
text - the text whose line-breaks should be computed. May not be null.null.InternalNodeModelUtils.computeLineBreaks(String)public void fillGrammarElementToIdMap(java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.Integer> grammarElementToIdMap,
java.util.List<java.lang.String> grammarIdToURIMap)