final class FileWatcher extends Cancelable
Handles file watching of interesting files in this build.
Tries to minimize file events by dynamically watching only relevant directories for the structure of the build. We don't use the LSP dynamic file watcher capability because
1. the glob syntax is not defined in the LSP spec making it difficult to deliver a consistent file watching experience with all editor clients on all operating systems. 2. we may have a lot of file watching events and it's presumably less overhead to get the notifications directly from the OS instead of through the editor via LSP.
Given we rely on file watching for critical functionality like Goto Definition and it's really difficult to reproduce/investigate file watching issues, I think it's best to have a single file watching solution that we have control over.
This class does not watch for changes in *.sbt files in the workspace directory and
in the project/. Those notifications are nice-to-have, but not critical. The library we are
using https://github.com/gmethvin/directory-watcher only supports recursive directory meaning
we would have to watch the workspace directory, resulting in a LOT of redundant file events.
Editors are free to send workspace/didChangedWatchedFiles notifications for these directories.
- Alphabetic
- By Inheritance
- FileWatcher
- Cancelable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FileWatcher(buildTargets: BuildTargets, didChangeWatchedFiles: (DirectoryChangeEvent) ⇒ Unit)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cancel(): Unit
- Definition Classes
- FileWatcher → Cancelable
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def restart(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )