Adding descriptions.

Josh Suereth 2014-01-15 13:07:09 -08:00
parent 6736ef8488
commit 3280a667d5
1 changed files with 19 additions and 1 deletions

@ -9,6 +9,11 @@ A new key available which can be used to interact with the server:
val uiContext = taskKey[sbt.UIContext]("All user interaction should be driven through this interface.")
```
Custom tasks and plugins will be able to interact with sbt clients via the `uiContext in Global` setting. All interaction with users should occur over the UIContext. Tasks should no longer attempt to read from System.in, as this will begin to throw exceptions.
_TODO - Should we attempt for System.in compatibility for a bit?_
# 2. A UI interface
```scala
@ -28,8 +33,22 @@ sealed trait UIContext {
private[sbt] abstract class AbstractUIContext extends UIContext
```
This interface represents *all* the interaction that can be done with users. Interaction with sbt clients can consist of the following:
* Reading a single line of input (potentially where you hide the user keystrokes).
_Example(s): Reading the PGP passphrase when needed, or selecting the main class to run._
* Prompting the user to confirm before continuing.
_Example(s): Ensuring the user wants to create a tag before continuing the release script.
* Sending structured events to sbt clients.
_Example(s): Notifying your own Intellij Plugin the progress of your integration tests._
# 3. Plugin API
Plugins will, additionally, have the ability to tell the server how their build values can be serialized
to interested clients. While many clients are expected to just listen to `toString` values, it is expected
that some plugins may wish for their own rich tooling support. In this event, e.g. an IDE plugin could
receive the complete structured data that results when a task is run.
```scala
trait Plugin {
...
@ -42,4 +61,3 @@ trait Plugin {
}
```
# TODO - More information about the changes...