Package jetbrains.mps.generator.template
Interface ITemplateGenerator
- 
- All Superinterfaces:
 GeneratorQueryProvider.Source
- All Known Implementing Classes:
 AbstractTemplateGenerator,ParallelTemplateGenerator,TemplateGenerator
public interface ITemplateGenerator extends GeneratorQueryProvider.Source
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanareMappingsAvailable()Generally, mapping labels are not available till the end ot structure transformation, which may run in parallel threads and thus access to label would be unpredictable.List<SNode>findAllOutputNodesByInputNodeAndMappingName(SNode inputNode, String mappingName)SNodefindCopiedOutputNodeForInputNode(SNode inputNode)SNodefindOutputNode(SModel inputModel, String mappingName)SNodefindOutputNodeByInputNodeAndMappingName(SNode inputNode, String mappingName)GenerationSessionContextgetGeneratorSessionContext()SModelgetInputModel()IGeneratorLoggergetLogger()SModelgetOutputModel()booleanisStrict()voidregisterMappingLabel(SNode inputNode, String mappingName, SNode outputNode)- 
Methods inherited from interface jetbrains.mps.generator.impl.query.GeneratorQueryProvider.Source
getQueryProvider 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getInputModel
SModel getInputModel()
 
- 
getOutputModel
SModel getOutputModel()
 
- 
areMappingsAvailable
boolean areMappingsAvailable()
Generally, mapping labels are not available till the end ot structure transformation, which may run in parallel threads and thus access to label would be unpredictable. Use this method to control retrieve of labels only, it's not suitable to tell whether it's possible toadd new label- Returns:
 trueif it's proper time to query (!) for label
 
- 
registerMappingLabel
void registerMappingLabel(SNode inputNode, String mappingName, SNode outputNode)
 
- 
findOutputNodeByInputNodeAndMappingName
@Nullable SNode findOutputNodeByInputNodeAndMappingName(SNode inputNode, @Nullable String mappingName)
- Parameters:
 inputNode- node from almost any model that may have served as an input for a generator. We tolerate null value now, indicating we are looking for conditional root (takes no input to create one)mappingName- label of the transformation of interest. Null value is tolerated but would yield no result instantly.- Returns:
 - node created from the specified input and marked with the label.
 
 
- 
findOutputNode
@Nullable SNode findOutputNode(@Nullable SModel inputModel, @Nullable String mappingName)
- Parameters:
 inputModel- null is tolerated, mappings for the actual model are looked upmappingName- label of the transformation of interest. Null value is tolerated but would yield no result instantly.- Returns:
 - conditional root instantiated for the supplied model
 
 
- 
findAllOutputNodesByInputNodeAndMappingName
List<SNode> findAllOutputNodesByInputNodeAndMappingName(SNode inputNode, String mappingName)
 
- 
getGeneratorSessionContext
GenerationSessionContext getGeneratorSessionContext()
 
- 
isStrict
boolean isStrict()
 
- 
getLogger
IGeneratorLogger getLogger()
 
 - 
 
 -