Package jetbrains.mps.generator.template
Class WeavingAnchorContext
- java.lang.Object
 - 
- jetbrains.mps.generator.template.TemplateQueryContext
 - 
- jetbrains.mps.generator.template.WeavingAnchorContext
 
 
 
- 
public class WeavingAnchorContext extends TemplateQueryContext
Context for query that gives anchor node for a weaved node. Anchor node is the one that would follow weaved node, i.e. to insert a node at the head of children list, use present head as anchor.nullanchor indicated weaved node added to the tail of children list. Prior to this query, weaved node used to be added at the end of parent's children list, and this is default behavior if no anchor query is specified (or the query answers with null)- Since:
 - 3.3
 
 
- 
- 
Field Summary
- 
Fields inherited from class jetbrains.mps.generator.template.TemplateQueryContext
myContext 
 - 
 
- 
Constructor Summary
Constructors Constructor Description WeavingAnchorContext(TemplateContext context, SNodeReference templateNode, SNode outputParent, SNode outputNode) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SNodegetMainContextNode()SNodegetOutputNode()- 
Methods inherited from class jetbrains.mps.generator.template.TemplateQueryContext
createIndexedName, createUniqueName, getAllOutputNodesByInputNodeAndMappingLabel, getCopiedOutputNodeForInputNode, getGenerationParameter, getGenerator, getInputModel, getInputNode, getNode, getOriginalCopiedInputNode, getOriginalInputModel, getOutputModel, getOutputNodeByInputNodeAndMappingLabel, getOutputNodeByMappingLabel, getPatternVariable, getPreviousInputNodeByMappingLabel, getRuleNode, getSessionObject, getStepObject, getTemplateNodeRef, getTemplateReference, getTransientObject, getVariable, putSessionObject, putStepObject, putTransientObject, registerMappingLabel, showErrorMessage, showInformationMessage, showWarningMessage 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
WeavingAnchorContext
public WeavingAnchorContext(@NotNull TemplateContext context, @NotNull SNodeReference templateNode, @NotNull SNode outputParent, @NotNull SNode outputNode)
 
 - 
 
- 
Method Detail
- 
getMainContextNode
public SNode getMainContextNode()
- Returns:
 - 'mainContextNode' query parameter, never 
null 
 
- 
getOutputNode
public SNode getOutputNode()
- Overrides:
 getOutputNodein classTemplateQueryContext- Returns:
 - node being weaved into 
parent, nevernull 
 
 - 
 
 -