Search in sources :

Example 1 with RProjectBuildOptions

use of org.rstudio.studio.client.projects.model.RProjectBuildOptions in project rstudio by rstudio.

the class BuildToolsPackagePanel method save.

@Override
void save(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setPackageUseDevtools(chkUseDevtools_.getValue());
    config.setPackagePath(pathSelector_.getText());
    config.setPackageInstallArgs(installAdditionalArguments_.getText());
    config.setPackageBuildArgs(buildAdditionalArguments_.getText());
    config.setPackageBuildBinaryArgs(buildBinaryAdditionalArguments_.getText());
    config.setPackageCheckArgs(checkAdditionalArguments_.getText());
    config.setPackageRoxygenize(roxygenOptions_.getRocletRd(), roxygenOptions_.getRocletCollate(), roxygenOptions_.getRocletNamespace(), roxygenOptions_.getRocletVignette());
    RProjectBuildOptions buildOptions = options.getBuildOptions();
    buildOptions.setAutoRoxyginizeOptions(roxygenOptions_.getAutoRoxygenize());
}
Also used : RProjectBuildOptions(org.rstudio.studio.client.projects.model.RProjectBuildOptions) RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 2 with RProjectBuildOptions

use of org.rstudio.studio.client.projects.model.RProjectBuildOptions in project rstudio by rstudio.

the class BuildToolsWebsitePanel method load.

@Override
void load(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    pathSelector_.setText(config.getWebsitePath());
    RProjectBuildOptions buildOptions = options.getBuildOptions();
    chkPreviewAfterBuilding_.setValue(buildOptions.getPreviewWebsite());
    chkLivePreviewSite_.setValue(buildOptions.getLivePreviewWebsite());
    RProjectBuildContext buildContext = options.getBuildContext();
    if (buildContext.isBookdownSite()) {
        // change caption
        chkPreviewAfterBuilding_.setText("Preview book after building");
        // get all available output formats
        JsArrayString formatsJson = buildContext.getWebsiteOutputFormats();
        ArrayList<String> formatNames = new ArrayList<String>();
        ArrayList<String> formats = new ArrayList<String>();
        // always include "All Formats"
        formatNames.add("(All Formats)");
        formats.add("all");
        for (int i = 0; i < formatsJson.length(); i++) {
            formatNames.add(formatsJson.get(i));
            formats.add(formatsJson.get(i));
        }
        websiteOutputFormat_.setChoices(formatNames.toArray(new String[] {}), formats.toArray(new String[] {}));
        websiteOutputFormat_.setValue(buildOptions.getWebsiteOutputFormat());
        websiteOutputFormat_.setVisible(true);
    }
}
Also used : RProjectBuildOptions(org.rstudio.studio.client.projects.model.RProjectBuildOptions) ArrayList(java.util.ArrayList) RProjectBuildContext(org.rstudio.studio.client.projects.model.RProjectBuildContext) JsArrayString(com.google.gwt.core.client.JsArrayString) JsArrayString(com.google.gwt.core.client.JsArrayString) RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 3 with RProjectBuildOptions

use of org.rstudio.studio.client.projects.model.RProjectBuildOptions in project rstudio by rstudio.

the class BuildToolsWebsitePanel method save.

@Override
void save(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setWebsitePath(pathSelector_.getText());
    RProjectBuildOptions buildOptions = options.getBuildOptions();
    buildOptions.setPreviewWebsite(chkPreviewAfterBuilding_.getValue());
    buildOptions.setLivePreviewWebsite(chkLivePreviewSite_.getValue());
    buildOptions.setWebsiteOutputFormat(websiteOutputFormat_.getValue());
}
Also used : RProjectBuildOptions(org.rstudio.studio.client.projects.model.RProjectBuildOptions) RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Aggregations

RProjectBuildOptions (org.rstudio.studio.client.projects.model.RProjectBuildOptions)3 RProjectConfig (org.rstudio.studio.client.projects.model.RProjectConfig)3 JsArrayString (com.google.gwt.core.client.JsArrayString)1 ArrayList (java.util.ArrayList)1 RProjectBuildContext (org.rstudio.studio.client.projects.model.RProjectBuildContext)1