use of org.rstudio.studio.client.workbench.views.packages.events.RaisePackagePaneEvent in project rstudio by rstudio.
the class PackagesPane method setActions.
@Override
public void setActions(ArrayList<Packages.Action> actions) {
// command that manages the layout of the packages list and action center
Command manageActionCenterLayout = new Command() {
@Override
public void execute() {
resizeActionCenter();
}
};
if (actions == null || actions.size() == 0) {
if (actionCenter_ != null) {
packagesTableContainer_.remove(actionCenter_);
actionCenter_ = null;
layoutPackagesTable();
packagesTableContainer_.animate(ACTION_CENTER_ANIMATION_MS);
}
} else {
// in a non-collapsed center, raise the packages pane
if (actionCenter_ == null || ((!actionCenter_.collapsed()) && (actionCenter_.getActionCount() != actions.size()))) {
events_.fireEvent(new RaisePackagePaneEvent());
}
// create the action center if it doesn't already exist
if (actionCenter_ == null) {
actionCenter_ = new ActionCenter(manageActionCenterLayout);
packagesTableContainer_.add(actionCenter_);
}
actionCenter_.setActions(actions);
resizeActionCenter();
}
}
Aggregations