Class RigidPlanBuilder
- java.lang.Object
 - 
- jetbrains.mps.generator.impl.plan.RigidPlanBuilder
 
 
- 
- All Implemented Interfaces:
 GenerationPlanBuilder
public class RigidPlanBuilder extends Object implements GenerationPlanBuilder
Supports limited set of GP statements.wrapUp(PlanIdentity)captures present state and any subsequent statements augment what's there already. Perhaps, shall bear a name that reflects its limitation, (Basic/Bare?)- Since:
 - 2017.1
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface jetbrains.mps.generator.GenerationPlanBuilder
GenerationPlanBuilder.BuilderOption 
 - 
 
- 
Constructor Summary
Constructors Constructor Description RigidPlanBuilder(LanguageRegistry languageRegistry) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Collection<TemplateMappingConfiguration> tmc)IMPORTANT: USE OF THIS METHOD IS DISCOURAGED AS IT AFFECTS CONSISTENCY OF PLAN SPECIFICATION (namely, if applyGeneratorWithExtended() shall consider generators of explicit MCs for extensions).voidapplyGenerator(SModule... generators)Specified generators (exact set, unlikeGenerationPlanBuilder.applyGeneratorWithExtended(SModule...)no extended relation between generators is taken into account) applied as a single transformation step.voidapplyGenerators(Collection<SModuleReference> generators, GenerationPlanBuilder.BuilderOption... options)New approach to plan builder.voidapplyGeneratorWithExtended(SModule... generator)Specified generators and those extending them AND visible from scope applied as a single transformation step.GenerationPlanBuilderfork()Support for parallel branches of transformationsvoidrecordCheckpoint(CheckpointIdentity cp)Tells generator to record state of transformed model at the given moment and keep it with supplied identity.voidsynchronizeWithCheckpoint(CheckpointIdentity cp)Tells generator to synchronize references with a recorded model state, identified by supplied checkpoint.voidtransformLanguage(SLanguage... languages)Apply generators of languages specified to reduce their concepts.RigidGenerationPlanwrapUp(PlanIdentity planIdentity)XXX I don't really need RigidGenerationPlan return value here (moreover, RGP shall move into impl package), just highlight the fact clients can utilize their knowledge about factory instance.- 
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.GenerationPlanBuilder
declareCheckpoint 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
RigidPlanBuilder
public RigidPlanBuilder(@NotNull LanguageRegistry languageRegistry)
 
 - 
 
- 
Method Detail
- 
transformLanguage
public void transformLanguage(@NotNull SLanguage... languages)
Description copied from interface:GenerationPlanBuilderApply generators of languages specified to reduce their concepts. FIXME It's unspecified at the moment what happens with generators that are extended or referenced from those involved (i.e. if they are part of the step).- Specified by:
 transformLanguagein interfaceGenerationPlanBuilder- Parameters:
 languages- languages to reduce
 
- 
applyGenerator
public void applyGenerator(@NotNull SModule... generators)
Description copied from interface:GenerationPlanBuilderSpecified generators (exact set, unlikeGenerationPlanBuilder.applyGeneratorWithExtended(SModule...)no extended relation between generators is taken into account) applied as a single transformation step. FIXME shall decide what happens if a generator references/extends another one, not mentioned.- Specified by:
 applyGeneratorin interfaceGenerationPlanBuilder- Parameters:
 generators- generator modules
 
- 
applyGeneratorWithExtended
public void applyGeneratorWithExtended(@NotNull SModule... generator)
Description copied from interface:GenerationPlanBuilderSpecified generators and those extending them AND visible from scope applied as a single transformation step. What constitutes this 'scope' is up to plan builder implementation. To respect generator priority rules of involved generators to address extensibility scenarios like that of lang.editor, considerGenerationPlanBuilder.applyGenerators(Collection, BuilderOption...)withGenerationPlanBuilder.BuilderOption.WithPriorityRulesandGenerationPlanBuilder.BuilderOption.WithExtendedGenerators.- Specified by:
 applyGeneratorWithExtendedin interfaceGenerationPlanBuilder- Parameters:
 generator- generator modules
 
- 
applyGenerators
public void applyGenerators(@NotNull Collection<SModuleReference> generators, @NotNull GenerationPlanBuilder.BuilderOption... options)
Description copied from interface:GenerationPlanBuilderNew approach to plan builder. As there's SLanguage for deployed language, there's SModuleReference to identify deployed generator, why would I need to get a module then?- Specified by:
 applyGeneratorsin interfaceGenerationPlanBuilder- Parameters:
 generators- deployed generator identities for the stepoptions- optional set of options to further specify processing ofgeneratorsset
 
- 
apply
public void apply(@NotNull Collection<TemplateMappingConfiguration> tmc)
Description copied from interface:GenerationPlanBuilderIMPORTANT: USE OF THIS METHOD IS DISCOURAGED AS IT AFFECTS CONSISTENCY OF PLAN SPECIFICATION (namely, if applyGeneratorWithExtended() shall consider generators of explicit MCs for extensions). IT'S INTENDED FOR PROTOTYPE AND MIGHT CEASE ONCE PROVISION PHASE IS OVER. USE AT YOUR OWN RISK. Specific MCs for a transformation step, applied together.- Specified by:
 applyin interfaceGenerationPlanBuilder- Parameters:
 tmc- MCs that constitute transformation step
 
- 
recordCheckpoint
public void recordCheckpoint(@NotNull CheckpointIdentity cp)
Description copied from interface:GenerationPlanBuilderTells generator to record state of transformed model at the given moment and keep it with supplied identity. Besides, also tells generator to synchronize external references with models of the specified checkpoint.- Specified by:
 recordCheckpointin interfaceGenerationPlanBuilder- Parameters:
 cp- checkpoint identity
 
- 
synchronizeWithCheckpoint
public void synchronizeWithCheckpoint(@NotNull CheckpointIdentity cp)
Description copied from interface:GenerationPlanBuilderTells generator to synchronize references with a recorded model state, identified by supplied checkpoint. State of the actual model being transformed is not recorded.- Specified by:
 synchronizeWithCheckpointin interfaceGenerationPlanBuilder- Parameters:
 cp- checkpoint identity
 
- 
wrapUp
@NotNull public RigidGenerationPlan wrapUp(@NotNull PlanIdentity planIdentity)
XXX I don't really need RigidGenerationPlan return value here (moreover, RGP shall move into impl package), just highlight the fact clients can utilize their knowledge about factory instance.- Specified by:
 wrapUpin interfaceGenerationPlanBuilder- Parameters:
 planIdentity- identity of the plan to build- Returns:
 - plan instance ready to use
 
 
- 
fork
public GenerationPlanBuilder fork()
Description copied from interface:GenerationPlanBuilderSupport for parallel branches of transformations- Specified by:
 forkin interfaceGenerationPlanBuilder- Returns:
 - builder instance to handle separate branch of transformations
 
 
 - 
 
 -