org.eclipse.xtext.nodemodel.impl
Class NodeModelBuilder
java.lang.Object
org.eclipse.xtext.nodemodel.impl.NodeModelBuilder
@NonNullByDefault
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.
- Author:
- Sebastian Zarnekow - Initial contribution and API
- This class is not intended to be subclassed by clients.
- This class is not intended to be subclassed by clients.
Method Summary |
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 |
replaceChildren(AbstractNode oldNode,
AbstractNode newNode)
|
protected void |
replaceWithoutChildren(AbstractNode oldNode,
AbstractNode newNode)
|
void |
setCompleteContent(ICompositeNode rootNode,
java.lang.String completeContent)
|
void |
setForcedFirstGrammarElement(RuleCall ruleCall)
|
INode |
setSyntaxError(INode node,
SyntaxErrorMessage errorMessage)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeModelBuilder
public NodeModelBuilder()
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(@Nullable
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,
@Nullable
SyntaxErrorMessage errorMessage,
ICompositeNode parent)
compressAndReturnParent
public ICompositeNode compressAndReturnParent(ICompositeNode compositeNode)
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)