Package jetbrains.mps.generator.runtime
Interface ReferenceReductionRule
- 
- All Superinterfaces:
 TemplateRule,TemplateRuleForConcept,TemplateRuleWithCondition
- All Known Implementing Classes:
 ReferenceReductionRuleBase,RefReductionRuleInterpreted
public interface ReferenceReductionRule extends TemplateRuleWithCondition, TemplateRuleForConcept
use of TemplateRuleForConcept is dubious, just investigating if it makes any reasonable sense. Now we use if to reuse FastRuleFinder, but it doesn't look like anything valuable.- Since:
 - 2017.3
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidapply(TemplateContext context, SNode outputNode)default booleanapplyToInheritors()default SAbstractConceptgetApplicableConcept()SReferenceLinkgetApplicableLink()booleanisApplicable(TemplateContext context)Tell whether rule can be applied in the context FIXME shall throw GenerationFailureException (neither Dismiss/Abandon nor Cancel could not get thrown from within) but has to re-generate generated generators that implement this method (either with narrowed throws or without any at all)- 
Methods inherited from interface jetbrains.mps.generator.runtime.TemplateRule
getRuleNode 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getApplicableConcept
@NotNull default SAbstractConcept getApplicableConcept()
- Specified by:
 getApplicableConceptin interfaceTemplateRuleForConcept- Returns:
 - concept to trigger this rule
 
 
- 
applyToInheritors
default boolean applyToInheritors()
- Specified by:
 applyToInheritorsin interfaceTemplateRuleForConcept
 
- 
getApplicableLink
@NotNull SReferenceLink getApplicableLink()
- Returns:
 - association link to trigger this rule
 
 
- 
isApplicable
boolean isApplicable(@NotNull TemplateContext context) throws GenerationFailureException
Description copied from interface:TemplateRuleWithConditionTell whether rule can be applied in the context FIXME shall throw GenerationFailureException (neither Dismiss/Abandon nor Cancel could not get thrown from within) but has to re-generate generated generators that implement this method (either with narrowed throws or without any at all)- Specified by:
 isApplicablein interfaceTemplateRuleWithCondition- Throws:
 GenerationFailureException
 
- 
apply
void apply(@NotNull TemplateContext context, SNode outputNode) throws GenerationFailureException, GenerationCanceledException
 
 - 
 
 -