use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class CodeLensParams method create.
public static CodeLensParams create(TextDocumentIdentifier textDocument) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
return new CodeLensParams(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class ColorInformation method create.
/**
* Creates a new ColorInformation literal.
*/
public static ColorInformation create(Range range, Color color) {
final JSONObject json = new JSONObject();
json.put("range", range.jsonData);
json.put("color", color.jsonData);
return new ColorInformation(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class ColorPresentationParams method create.
public static ColorPresentationParams create(TextDocumentIdentifier textDocument, Color color, Range range) {
final JSONObject json = new JSONObject();
json.put("textDocument", textDocument.jsonData);
json.put("color", color.jsonData);
json.put("range", range.jsonData);
return new ColorPresentationParams(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class Command method create.
/**
* Creates a new Command literal.
*/
public static Command create(String title, String command, Object... args) {
final JSONObject json = new JSONObject();
json.put("title", title);
json.put("command", command);
if (args != null) {
JSONArray jsonArr = new JSONArray();
for (Object arg : args) {
jsonArr.put(arg);
}
json.put("arguments", jsonArr);
}
return new Command(json);
}
use of com.oracle.truffle.tools.utils.json.JSONObject in project graal by oracle.
the class CompletionContext method create.
public static CompletionContext create(CompletionTriggerKind triggerKind) {
final JSONObject json = new JSONObject();
json.put("triggerKind", triggerKind.getIntValue());
return new CompletionContext(json);
}
Aggregations