mirror of https://github.com/sbt/sbt.git
Collapse 1-line scaladocs
This commit is contained in:
parent
087f21741d
commit
de690f4e41
|
|
@ -81,9 +81,7 @@ private[sbt] object LanguageServerProtocol {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Implements Language Server Protocol <https://github.com/Microsoft/language-server-protocol>. */
|
||||||
* Implements Language Server Protocol <https://github.com/Microsoft/language-server-protocol>.
|
|
||||||
*/
|
|
||||||
private[sbt] trait LanguageServerProtocol extends CommandChannel { self =>
|
private[sbt] trait LanguageServerProtocol extends CommandChannel { self =>
|
||||||
|
|
||||||
lazy val internalJsonProtocol = new InitializeOptionFormats with sjsonnew.BasicJsonProtocol {}
|
lazy val internalJsonProtocol = new InitializeOptionFormats with sjsonnew.BasicJsonProtocol {}
|
||||||
|
|
@ -136,9 +134,7 @@ private[sbt] trait LanguageServerProtocol extends CommandChannel { self =>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Respond back to Language Server's client. */
|
||||||
* Respond back to Language Server's client.
|
|
||||||
*/
|
|
||||||
private[sbt] def jsonRpcRespond[A: JsonFormat](event: A, execId: Option[String]): Unit = {
|
private[sbt] def jsonRpcRespond[A: JsonFormat](event: A, execId: Option[String]): Unit = {
|
||||||
val m =
|
val m =
|
||||||
JsonRpcResponseMessage("2.0", execId, Option(Converter.toJson[A](event).get), None)
|
JsonRpcResponseMessage("2.0", execId, Option(Converter.toJson[A](event).get), None)
|
||||||
|
|
@ -146,9 +142,7 @@ private[sbt] trait LanguageServerProtocol extends CommandChannel { self =>
|
||||||
publishBytes(bytes)
|
publishBytes(bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Respond back to Language Server's client. */
|
||||||
* Respond back to Language Server's client.
|
|
||||||
*/
|
|
||||||
private[sbt] def jsonRpcRespondError(execId: Option[String],
|
private[sbt] def jsonRpcRespondError(execId: Option[String],
|
||||||
code: Long,
|
code: Long,
|
||||||
message: String): Unit = {
|
message: String): Unit = {
|
||||||
|
|
@ -158,9 +152,7 @@ private[sbt] trait LanguageServerProtocol extends CommandChannel { self =>
|
||||||
publishBytes(bytes)
|
publishBytes(bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Respond back to Language Server's client. */
|
||||||
* Respond back to Language Server's client.
|
|
||||||
*/
|
|
||||||
private[sbt] def jsonRpcRespondError[A: JsonFormat](execId: Option[String],
|
private[sbt] def jsonRpcRespondError[A: JsonFormat](execId: Option[String],
|
||||||
code: Long,
|
code: Long,
|
||||||
message: String,
|
message: String,
|
||||||
|
|
@ -171,9 +163,7 @@ private[sbt] trait LanguageServerProtocol extends CommandChannel { self =>
|
||||||
publishBytes(bytes)
|
publishBytes(bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Notify to Language Server's client. */
|
||||||
* Notify to Language Server's client.
|
|
||||||
*/
|
|
||||||
private[sbt] def jsonRpcNotify[A: JsonFormat](method: String, params: A): Unit = {
|
private[sbt] def jsonRpcNotify[A: JsonFormat](method: String, params: A): Unit = {
|
||||||
val m =
|
val m =
|
||||||
JsonRpcNotificationMessage("2.0", method, Option(Converter.toJson[A](params).get))
|
JsonRpcNotificationMessage("2.0", method, Option(Converter.toJson[A](params).get))
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,7 @@ object Serialization {
|
||||||
CompactPrinter(json).getBytes("UTF-8")
|
CompactPrinter(json).getBytes("UTF-8")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** This formats the message according to JSON-RPC. http://www.jsonrpc.org/specification */
|
||||||
* This formats the message according to JSON-RPC.
|
|
||||||
* http://www.jsonrpc.org/specification
|
|
||||||
*/
|
|
||||||
private[sbt] def serializeResponseMessage(message: JsonRpcResponseMessage): Array[Byte] = {
|
private[sbt] def serializeResponseMessage(message: JsonRpcResponseMessage): Array[Byte] = {
|
||||||
import sbt.internal.protocol.codec.JsonRPCProtocol._
|
import sbt.internal.protocol.codec.JsonRPCProtocol._
|
||||||
val json: JValue = Converter.toJson[JsonRpcResponseMessage](message).get
|
val json: JValue = Converter.toJson[JsonRpcResponseMessage](message).get
|
||||||
|
|
@ -57,10 +54,7 @@ object Serialization {
|
||||||
body).getBytes("UTF-8")
|
body).getBytes("UTF-8")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** This formats the message according to JSON-RPC. http://www.jsonrpc.org/specification */
|
||||||
* This formats the message according to JSON-RPC.
|
|
||||||
* http://www.jsonrpc.org/specification
|
|
||||||
*/
|
|
||||||
private[sbt] def serializeNotificationMessage(
|
private[sbt] def serializeNotificationMessage(
|
||||||
message: JsonRpcNotificationMessage): Array[Byte] = {
|
message: JsonRpcNotificationMessage): Array[Byte] = {
|
||||||
import sbt.internal.protocol.codec.JsonRPCProtocol._
|
import sbt.internal.protocol.codec.JsonRPCProtocol._
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue