use of org.rstudio.core.client.command.EnabledChangedHandler in project rstudio by rstudio.
the class RSConnectPublishButton method initialize.
@Inject
public void initialize(RSConnectServerOperations server, RMarkdownServerOperations rmdServer, EventBus events, Commands commands, GlobalDisplay display, Provider<UIPrefs> pUiPrefs, Session session, PlotPublishMRUList plotMru) {
server_ = server;
rmdServer_ = rmdServer;
events_ = events;
commands_ = commands;
display_ = display;
session_ = session;
pUiPrefs_ = pUiPrefs;
plotMru_ = plotMru;
// initialize visibility if requested
if (boundCommand_ != null) {
boundCommand_.addVisibleChangedHandler(new VisibleChangedHandler() {
@Override
public void onVisibleChanged(AppCommand command) {
applyVisiblity();
}
});
boundCommand_.addEnabledChangedHandler(new EnabledChangedHandler() {
@Override
public void onEnabledChanged(AppCommand command) {
applyVisiblity();
}
});
}
events_.addHandler(RSConnectDeploymentCompletedEvent.TYPE, this);
events_.addHandler(RPubsUploadStatusEvent.TYPE, this);
events_.addHandler(RmdRenderCompletedEvent.TYPE, this);
events_.addHandler(HTMLPreviewCompletedEvent.TYPE, this);
}
Aggregations