Package jetbrains.mps.library
Class ModuleFileTracker
- java.lang.Object
 - 
- jetbrains.mps.library.ModuleFileTracker
 
 
- 
public final class ModuleFileTracker extends Object
Simple VFS tracker that knows aboutmodulesandfilesthey originate from and provides facilities that help to react with module reload/update according to VFS notifications events. Respects multiple modules per single file.IMPLEMENTATION NOTE: not thread-safe
- Since:
 - 3.5
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ModuleFileTracker() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforget(IFile file)Discard tracked association between file and modules.voidforget(IFile file, SModule module)Discard specific association between file and module.voidforget(IFile file, SModuleReference module)Map<SModuleReference,IFile>getAffectedBy(Collection<IFile> files)Map<SModuleReference,IFile>getTrackedFor(Collection<IFile> files)voidtrack(IFile file, SModule module)Associates given module with a file. 
 - 
 
- 
- 
Method Detail
- 
track
public void track(@NotNull IFile file, @NotNull SModule module)
Associates given module with a file. Multiple modules per single file are allowed. Multiple registration of the same File-Module pair is tolerated (XXX this is to avoid massive SLibrary refactoring, which may read same module and file).- Parameters:
 file- origin of a modulemodule- module read from the file
 
- 
forget
public void forget(@NotNull IFile file)
Discard tracked association between file and modules. Does nothing if no association for the file is known.- Parameters:
 file- origin of a module or few modules
 
- 
forget
public void forget(@NotNull IFile file, @NotNull SModule module)
Discard specific association between file and module. Does nothing if there's no such association.- Parameters:
 file- origin of the modulemodule- module read from the file
 
- 
forget
public void forget(@NotNull IFile file, @NotNull SModuleReference module)
 
- 
getAffectedBy
public Map<SModuleReference,IFile> getAffectedBy(Collection<IFile> files)
 
- 
getTrackedFor
public Map<SModuleReference,IFile> getTrackedFor(Collection<IFile> files)
 
 - 
 
 -