Search in sources :

Example 1 with RProjectConfig

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

the class ProjectCompilePdfPreferencesPane method onApply.

@Override
public boolean onApply(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setDefaultSweaveEngine(defaultSweaveEngine_.getValue());
    config.setDefaultLatexProgram(defaultLatexProgram_.getValue());
    config.setRootDocument(rootDoc_.getText().trim());
    return false;
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 2 with RProjectConfig

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

the class ProjectCompilePdfPreferencesPane method initialize.

@Override
protected void initialize(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    defaultSweaveEngine_.setValue(config.getDefaultSweaveEngine());
    defaultLatexProgram_.setValue(config.getDefaultLatexProgram());
    rootDoc_.setText(config.getRootDocument());
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 3 with RProjectConfig

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

the class ProjectEditingPreferencesPane method onApply.

@Override
public boolean onApply(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setEnableCodeIndexing(enableCodeIndexing_.getValue());
    config.setUseSpacesForTab(chkSpacesForTab_.getValue());
    config.setNumSpacesForTab(getTabWidth());
    config.setAutoAppendNewline(chkAutoAppendNewline_.getValue());
    config.setStripTrailingWhitespace(chkStripTrailingWhitespace_.getValue());
    config.setLineEndings(lineEndings_.getIntValue());
    config.setEncoding(encodingValue_);
    return false;
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 4 with RProjectConfig

use of org.rstudio.studio.client.projects.model.RProjectConfig 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 5 with RProjectConfig

use of org.rstudio.studio.client.projects.model.RProjectConfig 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)

Aggregations

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