mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 16:39:24 +02:00
Add project id to watching message
We redefine watchingMessage in project scope so we can use thisProjectRef to make the watching message more precise. Fixes #2038
This commit is contained in:
@@ -44,8 +44,13 @@ trait Watched {
|
||||
}
|
||||
|
||||
object Watched {
|
||||
val defaultWatchingMessage
|
||||
: WatchState => String = _.count + ". Waiting for source changes... (press enter to interrupt)"
|
||||
val defaultWatchingMessage: WatchState => String = ws =>
|
||||
s"${ws.count}. Waiting for source changes... (press enter to interrupt)"
|
||||
|
||||
def projectWatchingMessage(projectId: String): WatchState => String =
|
||||
ws =>
|
||||
s"${ws.count}. Waiting for source changes in project $projectId... (press enter to interrupt)"
|
||||
|
||||
val defaultTriggeredMessage: WatchState => String = const("")
|
||||
val clearWhenTriggered: WatchState => String = const(clearScreen)
|
||||
def clearScreen: String = "\u001b[2J\u001b[0;0H"
|
||||
@@ -70,8 +75,8 @@ object Watched {
|
||||
* @param base The base directory from which to include files.
|
||||
* @return An instance of `Source`.
|
||||
*/
|
||||
def apply(base: File): Source =
|
||||
apply(base, AllPassFilter, NothingFilter)
|
||||
def apply(base: File): Source = apply(base, AllPassFilter, NothingFilter)
|
||||
|
||||
}
|
||||
|
||||
private[this] class AWatched extends Watched
|
||||
|
||||
Reference in New Issue
Block a user