Search in sources :

Example 41 with JSONObject

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);
}
Also used : JSONObject(com.oracle.truffle.tools.utils.json.JSONObject)

Example 42 with JSONObject

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);
}
Also used : JSONObject(com.oracle.truffle.tools.utils.json.JSONObject)

Example 43 with JSONObject

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);
}
Also used : JSONObject(com.oracle.truffle.tools.utils.json.JSONObject)

Example 44 with JSONObject

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);
}
Also used : JSONObject(com.oracle.truffle.tools.utils.json.JSONObject)

Example 45 with JSONObject

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);
}
Also used : JSONObject(com.oracle.truffle.tools.utils.json.JSONObject)

Aggregations

JSONObject (com.oracle.truffle.tools.utils.json.JSONObject)318 JSONArray (com.oracle.truffle.tools.utils.json.JSONArray)71 ArrayList (java.util.ArrayList)20 Params (com.oracle.truffle.tools.chromeinspector.commands.Params)18 DebugValue (com.oracle.truffle.api.debug.DebugValue)14 DebugException (com.oracle.truffle.api.debug.DebugException)11 CommandProcessException (com.oracle.truffle.tools.chromeinspector.server.CommandProcessException)10 SourceSection (com.oracle.truffle.api.source.SourceSection)8 HashMap (java.util.HashMap)8 List (java.util.List)8 Collection (java.util.Collection)7 Breakpoint (com.oracle.truffle.api.debug.Breakpoint)6 Source (com.oracle.truffle.api.source.Source)6 Map (java.util.Map)6 LanguageInfo (com.oracle.truffle.api.nodes.LanguageInfo)5 NoSuspendedThreadException (com.oracle.truffle.tools.chromeinspector.InspectorExecutionContext.NoSuspendedThreadException)5 RemoteObject (com.oracle.truffle.tools.chromeinspector.types.RemoteObject)5 JSONTokener (com.oracle.truffle.tools.utils.json.JSONTokener)5 Test (org.junit.Test)5 Location (com.oracle.truffle.tools.chromeinspector.types.Location)4