Package jetbrains.mps.generator
Class ModelGenerationStatusManager
- java.lang.Object
 - 
- jetbrains.mps.generator.ModelGenerationStatusManager
 
 
- 
- All Implemented Interfaces:
 CoreComponent
public class ModelGenerationStatusManager extends Object implements CoreComponent
 
- 
- 
Constructor Summary
Constructors Constructor Description ModelGenerationStatusManager(SRepositoryRegistry repositoryRegistry, GenerationDependenciesCache depsCache) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddGenerationStatusListener(ModelGenerationStatusListener l)voiddiscard(Iterable<? extends SModel> models)invalidates generation statusand discards its persisted cached value, if any (deletes 'generated' file)voiddispose()booleangenerationRequired(SModel md)static ModelGenerationStatusManagergetInstance()Deprecated.Collection<SModel>getModifiedModels(Collection<? extends SModel> models)voidinit()voidinvalidateData(Iterable<? extends SModel> models)voidinvalidateData(IFile cacheFile)PROVISIONAL, IMPLEMENTATION API, FOR USE SOLELY FROM FS NOTIFICATION CODE At the moment, there's no effective way to listen to file changes through MPS VFS API other than attaching a listener to specific file To listen to changes (as well as additions and removals) of a fixed file, we rely on IDEA's (platform's) mechanism now.voidremoveGenerationStatusListener(ModelGenerationStatusListener l) 
 - 
 
- 
- 
Constructor Detail
- 
ModelGenerationStatusManager
public ModelGenerationStatusManager(SRepositoryRegistry repositoryRegistry, GenerationDependenciesCache depsCache)
 
 - 
 
- 
Method Detail
- 
getInstance
@Deprecated public static ModelGenerationStatusManager getInstance()
Deprecated.- Returns:
 - Use 
CoreComponentinstance available through respectiveComponentHost. It'sgenerator component pluginthat supplies instance, and one can useMPSCoreComponentsfrom IDEA project/application components, orMPSProject#getComponent(Class)to access it. XXX there's single use in MPS left, MPSMakeMediator in idea plugin, which needs to be refactored with respect to GenerationPathsController (which changes location of 'generated' files, and the question is what location we shall use in MPSMakeMediator.collectResources() then). There are uses in mbeddr. 
 
- 
init
public void init()
- Specified by:
 initin interfaceCoreComponent
 
- 
dispose
public void dispose()
- Specified by:
 disposein interfaceCoreComponent
 
- 
generationRequired
public boolean generationRequired(SModel md)
 
- 
invalidateData
public void invalidateData(IFile cacheFile)
PROVISIONAL, IMPLEMENTATION API, FOR USE SOLELY FROM FS NOTIFICATION CODE At the moment, there's no effective way to listen to file changes through MPS VFS API other than attaching a listener to specific file To listen to changes (as well as additions and removals) of a fixed file, we rely on IDEA's (platform's) mechanism now. This method is an entry point for external (effective) file change notification. NOTE, if nobody have asked for a status of a model with the given cacheFile, no notifications would get dispatched. 
- 
discard
public void discard(Iterable<? extends SModel> models)
invalidates generation statusand discards its persisted cached value, if any (deletes 'generated' file)- Parameters:
 models-
 
- 
addGenerationStatusListener
public void addGenerationStatusListener(ModelGenerationStatusListener l)
 
- 
removeGenerationStatusListener
public void removeGenerationStatusListener(ModelGenerationStatusListener l)
 
- 
getModifiedModels
@NotNull public Collection<SModel> getModifiedModels(@NotNull Collection<? extends SModel> models)
 
 - 
 
 -