use of org.rstudio.studio.client.workbench.views.packages.model.PackageInfo in project rstudio by rstudio.
the class PackagesPane method createPackagesTable.
private void createPackagesTable() {
try {
packagesTableContainer_.clear();
actionCenter_ = null;
packagesTable_ = new DataGrid<PackageInfo>(packagesDataProvider_.getList().size(), dataGridRes_);
} catch (Exception e) {
// in superdevmode, try a few times
if (SuperDevMode.isActive()) {
if (gridRenderRetryCount_ >= 5) {
Debug.log("WARNING: Failed to render packages pane data grid");
}
gridRenderRetryCount_++;
Debug.log("WARNING: Retrying packages data grid render (" + gridRenderRetryCount_ + ")");
Timer t = new Timer() {
@Override
public void run() {
createPackagesTable();
}
};
t.schedule(5);
}
}
if (packagesTable_ != null) {
initPackagesTable();
}
}
use of org.rstudio.studio.client.workbench.views.packages.model.PackageInfo in project rstudio by rstudio.
the class Packages method onPackageStatusChanged.
public void onPackageStatusChanged(PackageStatusChangedEvent event) {
PackageStatus status = event.getPackageStatus();
view_.setPackageStatus(status);
// also update the list of allPackages_
for (int i = 0; i < allPackages_.size(); i++) {
PackageInfo packageInfo = allPackages_.get(i);
if (packageInfo.getName().equals(status.getName()) && packageInfo.getLibrary().equals(status.getLib())) {
allPackages_.set(i, status.isLoaded() ? packageInfo.asLoaded() : packageInfo.asUnloaded());
}
}
}
Aggregations