Package jetbrains.mps.generator
Class GenPlanExtractor
- java.lang.Object
 - 
- jetbrains.mps.generator.GenPlanExtractor
 
 
- 
- All Implemented Interfaces:
 ModelGenerationPlan.Provider
public final class GenPlanExtractor extends Object implements ModelGenerationPlan.Provider
For a given model, figure out generation plan associated either with module's custom facet or through devkit and populate generator options appropriately.- Since:
 - 3.4
 
 
- 
- 
Constructor Summary
Constructors Constructor Description GenPlanExtractor(SRepository repository, GenerationOptions.OptionsBuilder options, IMessageHandler messageHandler)GenPlanExtractor(SRepository repository, IMessageHandler messageHandler) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigurePlanFor(SModel model)ModelGenerationPlangetPlan(SModel model)booleanhasPlan(SModel model) 
 - 
 
- 
- 
Constructor Detail
- 
GenPlanExtractor
public GenPlanExtractor(@NotNull SRepository repository, @Nullable IMessageHandler messageHandler)
 
- 
GenPlanExtractor
public GenPlanExtractor(@NotNull SRepository repository, @NotNull GenerationOptions.OptionsBuilder options, @Nullable IMessageHandler messageHandler)
 
 - 
 
- 
Method Detail
- 
hasPlan
public boolean hasPlan(@NotNull SModel model)
- Parameters:
 model- model being prepared for generation- Returns:
 truewhen there's custom generation plan associated with the model.
 
- 
getPlan
@NotNull public ModelGenerationPlan getPlan(@NotNull SModel model) throws IllegalArgumentException
- Specified by:
 getPlanin interfaceModelGenerationPlan.Provider- Parameters:
 model- model being prepared for generation- Returns:
 - plan instance ready to get associated with the model
 - Throws:
 IllegalArgumentException- if model supplied has no plan
 
 - 
 
 -