Package org.eclipse.xtext.nodemodel.impl
Class NodeModelBuilder
- java.lang.Object
-
- org.eclipse.xtext.nodemodel.impl.NodeModelBuilder
-
public class NodeModelBuilder extends java.lang.Object
A stateful (!) builder that provides call back methods for clients who want to create a node model and maintain its invariants.- Noextend:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description NodeModelBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(ICompositeNode node, AbstractNode child)
void
associateWithSemanticElement(ICompositeNode node, org.eclipse.emf.ecore.EObject astElement)
protected void
checkValidNewChild(AbstractNode child)
ICompositeNode
compressAndReturnParent(ICompositeNode compositeNode)
protected void
initializeFirstChildInvariant(CompositeNode node, AbstractNode child)
ICompositeNode
newCompositeNode(org.eclipse.emf.ecore.EObject grammarElement, int lookahead, ICompositeNode parent)
ICompositeNode
newCompositeNodeAsParentOf(org.eclipse.emf.ecore.EObject grammarElement, int lookahead, ICompositeNode existing)
ILeafNode
newLeafNode(int offset, int length, org.eclipse.emf.ecore.EObject grammarElement, boolean isHidden, SyntaxErrorMessage errorMessage, ICompositeNode parent)
ICompositeNode
newRootNode(java.lang.String input)
protected void
replace(AbstractNode oldNode, AbstractNode newNode)
void
replaceAndTransferLookAhead(INode oldNode, INode newRootNode)
protected void
replaceByRootNode(CompositeNode oldNode, RootNode rootNode)
protected void
replaceChildren(AbstractNode oldNode, AbstractNode newNode)
protected void
replaceWithoutChildren(AbstractNode oldNode, AbstractNode newNode)
void
setCompleteContent(ICompositeNode rootNode, java.lang.String completeContent)
void
setForcedFirstGrammarElement(RuleCall ruleCall)
protected void
setLookAhead(CompositeNode node, int lookAhead)
INode
setSyntaxError(INode node, SyntaxErrorMessage errorMessage)
-
-
-
Method Detail
-
addChild
public void addChild(ICompositeNode node, AbstractNode child)
-
associateWithSemanticElement
public void associateWithSemanticElement(ICompositeNode node, org.eclipse.emf.ecore.EObject astElement)
-
newCompositeNodeAsParentOf
public ICompositeNode newCompositeNodeAsParentOf(org.eclipse.emf.ecore.EObject grammarElement, int lookahead, ICompositeNode existing)
-
initializeFirstChildInvariant
protected void initializeFirstChildInvariant(CompositeNode node, AbstractNode child)
-
checkValidNewChild
protected void checkValidNewChild(AbstractNode child)
-
newCompositeNode
public ICompositeNode newCompositeNode(org.eclipse.emf.ecore.EObject grammarElement, int lookahead, ICompositeNode parent)
-
newRootNode
public ICompositeNode newRootNode(java.lang.String input)
-
newLeafNode
public ILeafNode newLeafNode(int offset, int length, org.eclipse.emf.ecore.EObject grammarElement, boolean isHidden, SyntaxErrorMessage errorMessage, ICompositeNode parent)
-
compressAndReturnParent
public ICompositeNode compressAndReturnParent(ICompositeNode compositeNode)
-
replaceByRootNode
protected void replaceByRootNode(CompositeNode oldNode, RootNode rootNode)
- Since:
- 2.8
-
setSyntaxError
public INode setSyntaxError(INode node, SyntaxErrorMessage errorMessage)
-
replace
protected void replace(AbstractNode oldNode, AbstractNode newNode)
-
replaceChildren
protected void replaceChildren(AbstractNode oldNode, AbstractNode newNode)
-
replaceAndTransferLookAhead
public void replaceAndTransferLookAhead(INode oldNode, INode newRootNode)
-
replaceWithoutChildren
protected void replaceWithoutChildren(AbstractNode oldNode, AbstractNode newNode)
-
setCompleteContent
public void setCompleteContent(ICompositeNode rootNode, java.lang.String completeContent)
-
setForcedFirstGrammarElement
public void setForcedFirstGrammarElement(RuleCall ruleCall)
-
setLookAhead
protected void setLookAhead(CompositeNode node, int lookAhead)
- Noreference:
- This method is not intended to be referenced by clients.
- Nooverride:
- This method is not intended to be re-implemented or extended by clients.
-
-