Search in sources :

Example 96 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method getCppCompletions.

public void getCppCompletions(String line, String docPath, String docId, int row, int column, String userText, ServerRequestCallback<CppCompletionResult> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(line));
    params.set(1, new JSONString(docPath));
    params.set(2, new JSONString(docId));
    params.set(3, new JSONNumber(row));
    params.set(4, new JSONNumber(column));
    params.set(5, new JSONString(userText));
    sendRequest(RPC_SCOPE, GET_CPP_COMPLETIONS, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 97 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method showHelpTopic.

public void showHelpTopic(String what, String from, int type) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(what));
    params.set(1, from != null ? new JSONString(from) : JSONNull.getInstance());
    params.set(2, new JSONNumber(type));
    sendRequest(RPC_SCOPE, SHOW_HELP_TOPIC, params, null);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 98 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method getHelpAtCursor.

public void getHelpAtCursor(String line, int cursorPos, ServerRequestCallback<Void> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(line));
    params.set(1, new JSONNumber(cursorPos));
    sendRequest(RPC_SCOPE, GET_HELP_AT_CURSOR, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 99 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method renderRmd.

@Override
public void renderRmd(String file, int line, String format, String encoding, String paramsFile, boolean asTempfile, int type, String existingOutputFile, String workingDir, String viewerType, ServerRequestCallback<Boolean> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(file));
    params.set(1, new JSONNumber(line));
    params.set(2, new JSONString(StringUtil.notNull(format)));
    params.set(3, new JSONString(encoding));
    params.set(4, new JSONString(StringUtil.notNull(paramsFile)));
    params.set(5, JSONBoolean.getInstance(asTempfile));
    params.set(6, new JSONNumber(type));
    params.set(7, new JSONString(StringUtil.notNull(existingOutputFile)));
    params.set(8, new JSONString(StringUtil.notNull(workingDir)));
    params.set(9, new JSONString(StringUtil.notNull(viewerType)));
    sendRequest(RPC_SCOPE, RENDER_RMD, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 100 with JSONNumber

use of com.google.gwt.json.client.JSONNumber in project rstudio by rstudio.

the class RemoteServer method processSetShellSize.

@Override
public void processSetShellSize(String handle, int width, int height, ServerRequestCallback<Void> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(handle));
    params.set(1, new JSONNumber(width));
    params.set(2, new JSONNumber(height));
    sendRequest(RPC_SCOPE, PROCESS_SET_SIZE, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Aggregations

JSONNumber (com.google.gwt.json.client.JSONNumber)163 JSONObject (com.google.gwt.json.client.JSONObject)109 JSONString (com.google.gwt.json.client.JSONString)72 JSONArray (com.google.gwt.json.client.JSONArray)68 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)19 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)18 JsonPostClient (cz.metacentrum.perun.webgui.json.JsonPostClient)18 PerunError (cz.metacentrum.perun.webgui.model.PerunError)17 HashMap (java.util.HashMap)4 Map (java.util.Map)4 JSONValue (com.google.gwt.json.client.JSONValue)3 ArrayList (java.util.ArrayList)3 Token (org.rstudio.core.client.Invalidation.Token)3 ServerError (org.rstudio.studio.client.server.ServerError)3 Breakpoint (org.rstudio.studio.client.common.debugging.model.Breakpoint)2 DiffResult (org.rstudio.studio.client.common.vcs.DiffResult)2 StatusAndPath (org.rstudio.studio.client.common.vcs.StatusAndPath)2 Point (org.rstudio.studio.client.workbench.views.plots.model.Point)2 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)1