use of org.rstudio.studio.client.server.ServerDataSource in project rstudio by rstudio.
the class Packages method doUpdatePackages.
private void doUpdatePackages(final PackageInstallContext installContext) {
new CheckForUpdatesDialog(globalDisplay_, new ServerDataSource<JsArray<PackageUpdate>>() {
public void requestData(ServerRequestCallback<JsArray<PackageUpdate>> requestCallback) {
server_.checkForPackageUpdates(requestCallback);
}
}, new OperationWithInput<ArrayList<PackageUpdate>>() {
@Override
public void execute(ArrayList<PackageUpdate> updates) {
InstallCommand cmd = buildUpdatePackagesCommand(updates, installContext);
executeWithLoadedPackageCheck(cmd);
}
}, new Operation() {
@Override
public void execute() {
// cancel emits an empty console input line to clear
// the busy indicator
events_.fireEvent(new SendToConsoleEvent("", true));
}
}).showModal();
}
Aggregations