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);
}
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);
}
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);
}
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);
}
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));
}
Aggregations