Class ModuleFileTracker


  • public final class ModuleFileTracker
    extends Object
    Simple VFS tracker that knows about modules and files they 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 Detail

      • ModuleFileTracker

        public ModuleFileTracker()
    • 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 module
        module - 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 module
        module - module read from the file