use of org.rstudio.studio.client.server.Void in project rstudio by rstudio.
the class Projects method onShowDiagnosticsProject.
@Handler
public void onShowDiagnosticsProject() {
final ProgressIndicator indicator = globalDisplay_.getProgressIndicator("Lint");
indicator.onProgress("Analyzing project sources...");
projServer_.analyzeProject(new ServerRequestCallback<Void>() {
@Override
public void onResponseReceived(Void response) {
indicator.onCompleted();
}
@Override
public void onError(ServerError error) {
Debug.logError(error);
indicator.onCompleted();
}
});
}
use of org.rstudio.studio.client.server.Void in project rstudio by rstudio.
the class CodeBrowserEditingTarget method showFunction.
public void showFunction(SearchPathFunctionDefinition functionDef) {
// set the current function
currentFunction_ = functionDef;
view_.showFunction(functionDef);
view_.scrollToLeft();
name_.setValue(functionDef.getName(), true);
// we only show the warning bar (for debug line matching) once per
// function; don't keep showing it if the user dismisses
shownWarningBar_ = false;
// update document properties if necessary
final CodeBrowserContents contents = CodeBrowserContents.create(getContext());
if (!contents.equalTo(getContents())) {
HashMap<String, String> props = new HashMap<String, String>();
contents.fillProperties(props);
server_.modifyDocumentProperties(doc_.getId(), props, new SimpleRequestCallback<Void>("Error") {
@Override
public void onResponseReceived(Void response) {
contents.fillProperties(doc_.getProperties());
}
});
}
}
use of org.rstudio.studio.client.server.Void in project rstudio by rstudio.
the class Presentation method confirmClose.
public void confirmClose(Command onConfirmed) {
// don't allow close if this is a tutorial
if (currentState_.isTutorial()) {
globalDisplay_.showMessage(MessageDisplay.MSG_WARNING, "Unable to Close", "Tutorials cannot be closed");
return;
}
final ProgressIndicator progress = new GlobalProgressDelayer(globalDisplay_, 0, "Closing Presentation...").getIndicator();
server_.closePresentationPane(new ServerRequestCallback<Void>() {
@Override
public void onResponseReceived(Void resp) {
reloadWorkbench();
}
@Override
public void onError(ServerError error) {
progress.onError(error.getUserMessage());
}
});
}
use of org.rstudio.studio.client.server.Void in project rstudio by rstudio.
the class PreferencesDialog method doSaveChanges.
@Override
protected void doSaveChanges(final RPrefs rPrefs, final Operation onCompleted, final ProgressIndicator progressIndicator, final boolean reload) {
// save changes
server_.setPrefs(rPrefs, session_.getSessionInfo().getUiPrefs(), new SimpleRequestCallback<Void>() {
@Override
public void onResponseReceived(Void response) {
progressIndicator.onCompleted();
if (onCompleted != null)
onCompleted.execute();
if (reload)
reload();
}
@Override
public void onError(ServerError error) {
progressIndicator.onError(error.getUserMessage());
}
});
// broadcast UI pref changes to satellites
RStudioGinjector.INSTANCE.getSatelliteManager().dispatchCrossWindowEvent(new UiPrefsChangedEvent(UiPrefsChangedEvent.Data.create(UiPrefsChangedEvent.GLOBAL_TYPE, session_.getSessionInfo().getUiPrefs())));
}
use of org.rstudio.studio.client.server.Void in project rstudio by rstudio.
the class TextEditingTargetSpelling method checkSpelling.
public void checkSpelling() {
if (isSpellChecking_)
return;
isSpellChecking_ = true;
new CheckSpelling(spellChecker_, docDisplay_, new SpellingDialog(), new InitialProgressDialog(1000), new ResultCallback<Void, Exception>() {
@Override
public void onSuccess(Void result) {
isSpellChecking_ = false;
}
@Override
public void onFailure(Exception e) {
isSpellChecking_ = false;
}
@Override
public void onCancelled() {
isSpellChecking_ = false;
}
});
}
Aggregations