use of org.rstudio.studio.client.workbench.views.environment.model.EnvironmentFrame in project rstudio by rstudio.
the class EnvironmentPane method rebuildEnvironmentMenu.
private void rebuildEnvironmentMenu() {
environmentMenu_.clearItems();
if (environments_ == null) {
return;
}
for (int i = 0; i < environments_.length(); i++) {
final EnvironmentFrame frame = environments_.get(i);
ImageResource img = imageOfEnvironment(frame.getName(), frame.isLocal());
environmentMenu_.addItem(ImageMenuItem.create(img, friendlyNameOfEnvironment(frame.getName()), new Scheduler.ScheduledCommand() {
@Override
public void execute() {
loadEnvironmentFrame(frame);
}
}, 2));
}
}
Aggregations