use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class DocumentFormattingParams method create.
public static DocumentFormattingParams create(TextDocumentIdentifier textDocument, FormattingOptions options) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
json.put("options", options.jsonData);
return new DocumentFormattingParams(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class DocumentLink method create.
/**
* Creates a new DocumentLink literal.
*/
public static DocumentLink create(Range range, String target, Object data) {
final JSONObject json = new JSONObject();
json.put("range", range.jsonData);
json.putOpt("target", target);
json.putOpt("data", data);
return new DocumentLink(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class FoldingRangeParams method create.
public static FoldingRangeParams create(TextDocumentIdentifier textDocument) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
return new FoldingRangeParams(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class FormattingOptions method create.
/**
* Creates a new FormattingOptions literal.
*/
public static FormattingOptions create(int tabSize, boolean insertSpaces) {
final JSONObject json = new JSONObject();
json.put("tabSize", tabSize);
json.put("insertSpaces", insertSpaces);
return new FormattingOptions(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class HoverParams method create.
public static HoverParams create(TextDocumentIdentifier textDocument, Position position) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
json.put("position", position.jsonData);
return new HoverParams(json);
}
Aggregations