Search in sources :

Example 1 with RSConnectPublishWizard

use of org.rstudio.studio.client.rsconnect.ui.RSConnectPublishWizard in project rstudio by rstudio.

the class RSConnect method publishWithWizard.

private void publishWithWizard(final RSConnectPublishInput input) {
    RSConnectPublishWizard wizard = new RSConnectPublishWizard(input, new ProgressOperationWithInput<RSConnectPublishResult>() {

        @Override
        public void execute(RSConnectPublishResult result, ProgressIndicator indicator) {
            switch(result.getPublishType()) {
                case RSConnectPublishResult.PUBLISH_STATIC:
                case RSConnectPublishResult.PUBLISH_CODE:
                    // always launch the browser--the wizard implies we're 
                    // doing a first-time publish, and we may need to do some
                    // post-publish configuration
                    fireRSConnectPublishEvent(result, true);
                    indicator.onCompleted();
                    break;
                case RSConnectPublishResult.PUBLISH_RPUBS:
                    uploadToRPubs(input, result, indicator);
                    break;
            }
        }
    });
    wizard.showModal();
}
Also used : ProgressIndicator(org.rstudio.core.client.widget.ProgressIndicator) RSConnectPublishResult(org.rstudio.studio.client.rsconnect.model.RSConnectPublishResult) RSConnectPublishWizard(org.rstudio.studio.client.rsconnect.ui.RSConnectPublishWizard)

Aggregations

ProgressIndicator (org.rstudio.core.client.widget.ProgressIndicator)1 RSConnectPublishResult (org.rstudio.studio.client.rsconnect.model.RSConnectPublishResult)1 RSConnectPublishWizard (org.rstudio.studio.client.rsconnect.ui.RSConnectPublishWizard)1