Class TemplateWeavingRuleInterpreted
- java.lang.Object
 - 
- jetbrains.mps.generator.runtime.WeaveRuleBase
 - 
- jetbrains.mps.generator.impl.interpreted.TemplateWeavingRuleInterpreted
 
 
 
- 
- All Implemented Interfaces:
 TemplateRule,TemplateRuleForConcept,TemplateRuleWithCondition,TemplateWeavingRule,WeavingWithAnchor
public class TemplateWeavingRuleInterpreted extends WeaveRuleBase implements TemplateWeavingRule
Evgeny Gryaznov, Nov 30, 2010 
- 
- 
Constructor Summary
Constructors Constructor Description TemplateWeavingRuleInterpreted(SNode rule) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapply(TemplateExecutionEnvironment environment, TemplateContext context, SNode outputContextNode)SNodegetAnchorNode(TemplateContext context, SNode outputParent, SNode outputNode)anchor node to followoutputNodein the children list ofoutputParent,nullindicating 'end of the list',SNodegetContextNode(TemplateExecutionEnvironment environment, TemplateContext context)FIXME what's the point to have getContextNode here if all we do is check it's from output model (WeavingProcessor#checkContext) and pass to apply() then.booleanisApplicable(TemplateContext context)Subclasses can rely on default implementation to returntrue.- 
Methods inherited from class jetbrains.mps.generator.runtime.WeaveRuleBase
applyToInheritors, getApplicableConcept, getRuleNode 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.generator.runtime.TemplateRule
getRuleNode 
- 
Methods inherited from interface jetbrains.mps.generator.runtime.TemplateRuleForConcept
applyToInheritors, getApplicableConcept 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
TemplateWeavingRuleInterpreted
public TemplateWeavingRuleInterpreted(SNode rule)
 
 - 
 
- 
Method Detail
- 
getContextNode
@NotNull public SNode getContextNode(TemplateExecutionEnvironment environment, TemplateContext context) throws GenerationFailureException
Description copied from interface:TemplateWeavingRuleFIXME what's the point to have getContextNode here if all we do is check it's from output model (WeavingProcessor#checkContext) and pass to apply() then.- Specified by:
 getContextNodein interfaceTemplateWeavingRule- Returns:
 - node in output model to host weaved nodes
 - Throws:
 GenerationFailureException
 
- 
getAnchorNode
@Nullable public SNode getAnchorNode(@NotNull TemplateContext context, @NotNull SNode outputParent, @NotNull SNode outputNode) throws GenerationFailureException
Description copied from interface:WeavingWithAnchoranchor node to followoutputNodein the children list ofoutputParent,nullindicating 'end of the list',- Specified by:
 getAnchorNodein interfaceWeavingWithAnchor- Overrides:
 getAnchorNodein classWeaveRuleBase- Throws:
 GenerationFailureException
 
- 
isApplicable
public boolean isApplicable(@NotNull TemplateContext context) throws GenerationFailureException
Description copied from class:WeaveRuleBaseSubclasses can rely on default implementation to returntrue.- Specified by:
 isApplicablein interfaceTemplateRuleWithCondition- Overrides:
 isApplicablein classWeaveRuleBase- Throws:
 GenerationFailureException
 
- 
apply
public boolean apply(TemplateExecutionEnvironment environment, TemplateContext context, SNode outputContextNode) throws GenerationException
- Specified by:
 applyin interfaceTemplateWeavingRule- Throws:
 GenerationException
 
 - 
 
 -