Package jetbrains.mps.generator
Class GenerationStatus
- java.lang.Object
 - 
- jetbrains.mps.generator.GenerationStatus
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface jetbrains.mps.util.IStatus
IStatus.Code 
 - 
 
- 
Constructor Summary
Constructors Constructor Description GenerationStatus(SModel inputModel, Collection<SModel> outputModels, GenerationDependencies dependencies, boolean errors)GenerationStatus(SModel inputModel, SModel outputModel, GenerationDependencies dependencies, boolean errors) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GenerationStatusfailure(SModel inputModel)IStatus.CodegetCode()CrossModelEnvironmentgetCrossModelEnvironment()GenerationDependenciesgetDependencies()SModelgetInputModel()SModelgetOutputModel()Collection<SModel>getOutputModels()SRepositorygetOutputRepository()Repository one need to guard access to when working with output model.voidsetCrossModelEnvironment(CrossModelEnvironment cme)PROVISIONAL CODE.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.util.IStatus
getMessage, getUserObject, isError, isOk 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
GenerationStatus
public GenerationStatus(@NotNull SModel inputModel, SModel outputModel, GenerationDependencies dependencies, boolean errors)
 
- 
GenerationStatus
public GenerationStatus(@NotNull SModel inputModel, @NotNull Collection<SModel> outputModels, GenerationDependencies dependencies, boolean errors)
 
 - 
 
- 
Method Detail
- 
getCode
public IStatus.Code getCode()
 
- 
getOutputModel
@Nullable public SModel getOutputModel()
- Returns:
 - primary output model, or 
nullin case of transformation failure; to get all forked output models, usegetOutputModels()instead 
 
- 
getInputModel
public SModel getInputModel()
 
- 
getDependencies
public GenerationDependencies getDependencies()
 
- 
getOutputRepository
public SRepository getOutputRepository()
Repository one need to guard access to when working with output model. FIXME Perhaps, repository should be part of GResource, instead. Design of the whole thing is not clear to me yet. With transient models/modules living in a distinct repository, we need to lock proper one when accessing transient models, and this method is to give access to the one.- Returns:
 - generally, shall not return 
null, uses input model's repository as fallback. However, if both input and output model are not from a repository, you can face null. 
 
- 
getOutputModels
@NotNull public Collection<SModel> getOutputModels()
- Returns:
 - empty collection for failed transformation; singleton collection unless there were forks in generation plan. Output model of a primary 'trunk' always comes first.
 
 
- 
setCrossModelEnvironment
public void setCrossModelEnvironment(CrossModelEnvironment cme)
PROVISIONAL CODE. DO NOT USE! GenerationStatus serves as a container for data associated with model generation step. However, some of these associates has nothing to do with generation (e.g. ModelDependencies are purely textgen aspect), and some are just exposed here to be accessed, and has nothing to do with generation status. CrossModelEnvironment object keeps cross-model generation aspect and as such qualifies to be exposed from GS, however, with better structure of CacheGenerators we unlikely to need it here (this might be generic 'AuxGeneratedDataSupplier' which would tell desired location (sourcegen or caches) and accept StreamHandler to save whatever it needs to save (either exports model or 'trace.info' xml) 
- 
getCrossModelEnvironment
public CrossModelEnvironment getCrossModelEnvironment()
 
- 
failure
public static GenerationStatus failure(@NotNull SModel inputModel)
 
 - 
 
 -