use of org.rstudio.studio.client.server.VoidServerRequestCallback in project rstudio by rstudio.
the class FindOutputPresenter method stop.
private void stop() {
if (currentFindHandle_ != null) {
server_.stopFind(currentFindHandle_, new VoidServerRequestCallback());
currentFindHandle_ = null;
}
view_.setStopSearchButtonVisible(false);
}
use of org.rstudio.studio.client.server.VoidServerRequestCallback in project rstudio by rstudio.
the class Source method getEditorContext.
private void getEditorContext(String id, String path, DocDisplay docDisplay) {
AceEditor editor = (AceEditor) docDisplay;
Selection selection = editor.getNativeSelection();
Range[] ranges = selection.getAllRanges();
JsArray<DocumentSelection> docSelections = JavaScriptObject.createArray().cast();
for (int i = 0; i < ranges.length; i++) {
docSelections.push(DocumentSelection.create(ranges[i], editor.getTextForRange(ranges[i])));
}
id = StringUtil.notNull(id);
path = StringUtil.notNull(path);
GetEditorContextEvent.SelectionData data = GetEditorContextEvent.SelectionData.create(id, path, editor.getCode(), docSelections);
server_.getEditorContextCompleted(data, new VoidServerRequestCallback());
}
use of org.rstudio.studio.client.server.VoidServerRequestCallback in project rstudio by rstudio.
the class Plots method onRemovePlot.
void onRemovePlot() {
// delete plot gesture indicates we are done with locator
safeClearLocator();
// confirm
globalDisplay_.showYesNoMessage(GlobalDisplay.MSG_QUESTION, "Remove Plot", "Are you sure you want to remove the current plot?", new ProgressOperation() {
public void execute(final ProgressIndicator indicator) {
indicator.onProgress("Removing plot...");
server_.removePlot(new VoidServerRequestCallback(indicator));
}
}, true);
view_.bringToFront();
}
use of org.rstudio.studio.client.server.VoidServerRequestCallback in project rstudio by rstudio.
the class NotebookQueueState method dequeueChunk.
public void dequeueChunk(int preambleRow) {
// find the chunk's ID
String chunkId = notebook_.getRowChunkId(preambleRow);
if (StringUtil.isNullOrEmpty(chunkId))
return;
notebook_.cleanChunkExecState(chunkId);
// clear from the execution queue and update display
for (int i = 0; i < queue_.getUnits().length(); i++) {
if (queue_.getUnits().get(i).getChunkId() == chunkId) {
NotebookQueueUnit unit = queue_.getUnits().get(i);
queue_.removeUnit(unit);
server_.updateNotebookExecQueue(unit, NotebookDocQueue.QUEUE_OP_DELETE, "", new VoidServerRequestCallback());
break;
}
}
}
use of org.rstudio.studio.client.server.VoidServerRequestCallback in project rstudio by rstudio.
the class NotebookQueueState method queueChunkRange.
private void queueChunkRange(ChunkExecUnit chunk) {
NotebookQueueUnit unit = unitFromScope(chunk);
renderLineState(chunk.getScope().getBodyStart().getRow(), unit.getPendingLines(), ChunkRowExecState.LINE_QUEUED);
notebook_.setChunkState(chunk.getScope(), ChunkContextToolbar.STATE_QUEUED);
queue_.addUnit(unit);
server_.updateNotebookExecQueue(unit, NotebookDocQueue.QUEUE_OP_ADD, "", new VoidServerRequestCallback());
}
Aggregations