Search in sources :

Example 6 with JSONArray

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

the class RemoteServer method tutorialQuizResponse.

@Override
public void tutorialQuizResponse(int slideIndex, int answer, boolean correct, ServerRequestCallback<Void> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONNumber(slideIndex));
    params.set(1, new JSONNumber(answer));
    params.set(2, JSONBoolean.getInstance(correct));
    sendRequest(RPC_SCOPE, TUTORIAL_QUIZ_RESPONSE, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber)

Example 7 with JSONArray

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

the class RemoteServer method printCppCompletions.

public void printCppCompletions(String docId, String docPath, String docContents, boolean docDirty, int line, int column, ServerRequestCallback<Void> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(docId));
    params.set(1, new JSONString(docPath));
    params.set(2, new JSONString(docContents));
    params.set(3, JSONBoolean.getInstance(docDirty));
    params.set(4, new JSONNumber(line));
    params.set(5, new JSONNumber(column));
    sendRequest(RPC_SCOPE, "print_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 8 with JSONArray

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

the class RemoteServer method previewDataImport.

@Override
public void previewDataImport(DataImportOptions dataImportOptions, int maxCols, int maxFactors, ServerRequestCallback<DataImportPreviewResponse> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONObject(dataImportOptions));
    params.set(1, new JSONNumber(maxCols));
    params.set(2, new JSONNumber(maxFactors));
    sendRequest(RPC_SCOPE, PREVIEW_DATA_IMPORT, params, requestCallback);
}
Also used : JSONObject(com.google.gwt.json.client.JSONObject) JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber)

Example 9 with JSONArray

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

the class RemoteServer method quitSession.

public void quitSession(boolean saveWorkspace, String switchToProject, RVersionSpec switchToRVersion, String hostPageUrl, ServerRequestCallback<Boolean> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, JSONBoolean.getInstance(saveWorkspace));
    params.set(1, new JSONString(StringUtil.notNull(switchToProject)));
    if (switchToRVersion != null)
        params.set(2, new JSONObject(switchToRVersion));
    else
        params.set(2, JSONNull.getInstance());
    params.set(3, new JSONString(StringUtil.notNull(hostPageUrl)));
    sendRequest(RPC_SCOPE, QUIT_SESSION, params, requestCallback);
}
Also used : JSONObject(com.google.gwt.json.client.JSONObject) JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Example 10 with JSONArray

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

the class RemoteServer method svnCommit.

@Override
public void svnCommit(ArrayList<String> paths, String message, ServerRequestCallback<ConsoleProcess> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, JSONUtils.toJSONStringArray(paths));
    params.set(1, new JSONString(message));
    sendRequest(RPC_SCOPE, SVN_COMMIT, params, new ConsoleProcessCallbackAdapter(requestCallback));
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Aggregations

JSONArray (com.google.gwt.json.client.JSONArray)260 JSONString (com.google.gwt.json.client.JSONString)182 JSONNumber (com.google.gwt.json.client.JSONNumber)68 JSONObject (com.google.gwt.json.client.JSONObject)62 JSONValue (com.google.gwt.json.client.JSONValue)10 Breakpoint (org.rstudio.studio.client.common.debugging.model.Breakpoint)8 Point (org.rstudio.studio.client.workbench.views.plots.model.Point)8 ArrayList (java.util.ArrayList)6 HashMap (java.util.HashMap)6 Date (java.util.Date)5 Map (java.util.Map)5 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)2 JsArrayString (com.google.gwt.core.client.JsArrayString)2 JSONBoolean (com.google.gwt.json.client.JSONBoolean)2 GwtTestTest (com.googlecode.gwt.test.GwtTestTest)2 ContactOrganisation (com.googlecode.gwtphonegap.client.contacts.ContactOrganisation)2 Test (org.junit.Test)2 EntryPoint (com.google.gwt.core.client.EntryPoint)1 Style (com.google.gwt.dom.client.Style)1 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1