|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.nodemodel.impl.AbstractNode org.eclipse.xtext.nodemodel.impl.CompositeNode org.eclipse.xtext.nodemodel.impl.CompositeNodeWithSemanticElement org.eclipse.xtext.nodemodel.impl.CompositeNodeWithSemanticElementAndSyntaxError org.eclipse.xtext.nodemodel.impl.RootNode
public class RootNode
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
---|
org.eclipse.emf.common.notify.Adapter.Internal |
Constructor Summary | |
---|---|
RootNode()
|
Method Summary | |
---|---|
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)
Computes the line breaks in the given text and returns an array of offsets. |
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. |
Methods inherited from class org.eclipse.xtext.nodemodel.impl.CompositeNodeWithSemanticElementAndSyntaxError |
---|
basicSetSyntaxErrorMessage, getSyntaxErrorMessage |
Methods inherited from class org.eclipse.xtext.nodemodel.impl.CompositeNodeWithSemanticElement |
---|
basicGetSemanticElement, basicSetSemanticElement, getSemanticElement, getTarget, isAdapterForType, notifyChanged, setTarget |
Methods inherited from class org.eclipse.xtext.nodemodel.impl.CompositeNode |
---|
basicGetChildren, basicGetFirstChild, basicGetLastChild, basicSetFirstChild, basicSetLookAhead, getChildren, getFirstChild, getGrammarElement, getLastChild, getLookAhead, hasChildren, isFolded, isFolded, resolveAsParent |
Methods inherited from class org.eclipse.xtext.nodemodel.impl.AbstractNode |
---|
basicGetGrammarElement, basicGetLineOfOffset, basicGetParent, basicHasSiblings, basicIterator, basicSetGrammarElement, getAsTreeIterable, getEndLine, getLeafNodes, getLength, getOffset, getStartLine, getTotalEndLine, getTotalEndOffset, getTotalStartLine, hasDirectSemanticElement, iterator, reverse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.xtext.nodemodel.INode |
---|
getAsTreeIterable, getEndLine, getLeafNodes, getLength, getOffset, getStartLine, getTotalEndLine, getTotalEndOffset, getTotalStartLine, hasDirectSemanticElement |
Constructor Detail |
---|
public RootNode()
Method Detail |
---|
public CompositeNode getParent()
INode
null
if and only if this is the root node.
getParent
in interface INode
getParent
in class AbstractNode
null
the root node does not have any parent.public ICompositeNode getRootNode()
INode
null
in a consistent tree.
getRootNode
in interface INode
getRootNode
in class AbstractNode
null
in a consistent tree.public int getTotalOffset()
INode
getTotalOffset
in interface INode
getTotalOffset
in class CompositeNode
public int getTotalLength()
INode
getTotalLength
in interface INode
getTotalLength
in class CompositeNode
public java.lang.String getText()
INode
null
but may be empty.
getText
in interface INode
getText
in class AbstractNode
null
.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()
INode
null
. The result has the same parent
as this node if it is not null
.
getNextSibling
in interface INode
getNextSibling
in class AbstractNode
null
.INode.hasNextSibling()
,
INode.hasSiblings()
public INode getPreviousSibling()
INode
null
. The result has the same parent
as this node if it is not null
.
getPreviousSibling
in interface INode
getPreviousSibling
in class AbstractNode
null
.INode.hasPreviousSibling()
,
INode.hasSiblings()
protected AbstractNode basicGetNextSibling()
basicGetNextSibling
in class AbstractNode
protected AbstractNode basicGetPreviousSibling()
basicGetPreviousSibling
in class AbstractNode
protected boolean basicHasPreviousSibling()
basicHasPreviousSibling
in class AbstractNode
protected boolean basicHasNextSibling()
basicHasNextSibling
in class AbstractNode
public boolean hasPreviousSibling()
INode
true
if this node is not the first child of its parent.
hasPreviousSibling
in interface INode
hasPreviousSibling
in class AbstractNode
public boolean hasNextSibling()
INode
true
if this node is not the last child of its parent.
hasNextSibling
in interface INode
hasNextSibling
in class AbstractNode
public boolean hasSiblings()
INode
true
if this node has any siblings.
hasSiblings
in interface INode
hasSiblings
in class AbstractNode
true
if this node has any siblings.INode.hasPreviousSibling()
,
INode.hasNextSibling()
protected void basicSetNextSibling(AbstractNode next)
basicSetNextSibling
in class AbstractNode
protected void basicSetPreviousSibling(AbstractNode prev)
basicSetPreviousSibling
in class AbstractNode
protected void basicSetParent(CompositeNode parent)
basicSetParent
in class AbstractNode
protected 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
.
text
- the text whose line-breaks should be computed. May not be null
.
null
.DefaultLineTracker
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |