use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class DocumentHighlightParams method create.
public static DocumentHighlightParams create(TextDocumentIdentifier textDocument, Position position) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
json.put("position", position.jsonData);
return new DocumentHighlightParams(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class DocumentRangeFormattingParams method create.
public static DocumentRangeFormattingParams create(TextDocumentIdentifier textDocument, Range range, FormattingOptions options) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
json.put("range", range.jsonData);
json.put("options", options.jsonData);
return new DocumentRangeFormattingParams(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class MarkupContent method create.
public static MarkupContent create(MarkupKind kind, String value) {
final JSONObject json = new JSONObject();
json.put("kind", kind.getStringValue());
json.put("value", value);
return new MarkupContent(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class Message method create.
public static Message create(String jsonrpc) {
final JSONObject json = new JSONObject();
json.put("jsonrpc", jsonrpc);
return new Message(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class ParameterInformation method create.
/**
* Creates a new parameter information literal.
*
* @param label A label string.
* @param documentation A doc string.
*/
public static ParameterInformation create(Object label, String documentation) {
final JSONObject json = new JSONObject();
json.put("label", label);
json.putOpt("documentation", documentation);
return new ParameterInformation(json);
}
Aggregations