Search in sources :

Example 6 with RProjectConfig

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

the class ProjectBuildToolsPreferencesPane method onApply.

@Override
public boolean onApply(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setBuildType(buildTypeSelect_.getValue());
    for (BuildToolsPanel panel : buildToolsPanels_.values()) panel.save(options);
    // require reload if the build type or roxygen settings changed
    String initialBuildType = initialConfig_.getBuildType();
    String selectedBuildType = buildTypeSelect_.getValue();
    return !initialBuildType.equals(selectedBuildType);
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 7 with RProjectConfig

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

the class BuildToolsCustomPanel method load.

@Override
void load(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    pathSelector_.setText(config.getCustomScriptPath());
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 8 with RProjectConfig

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

the class BuildToolsCustomPanel method save.

@Override
void save(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setCustomScriptPath(pathSelector_.getText());
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 9 with RProjectConfig

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

the class BuildToolsMakefilePanel method save.

@Override
void save(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    config.setMakefilePath(pathSelector_.getText());
    options.getBuildOptions().setMakefileArgs(txtMakefileArgs_.getText().trim());
}
Also used : RProjectConfig(org.rstudio.studio.client.projects.model.RProjectConfig)

Example 10 with RProjectConfig

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

the class BuildToolsPackagePanel method load.

@Override
void load(RProjectOptions options) {
    RProjectConfig config = options.getConfig();
    pathSelector_.setText(config.getPackagePath());
    installAdditionalArguments_.setText(config.getPackageInstallArgs());
    buildAdditionalArguments_.setText(config.getPackageBuildArgs());
    buildBinaryAdditionalArguments_.setText(config.getPackageBuildBinaryArgs());
    checkAdditionalArguments_.setText(config.getPackageCheckArgs());
    roxygenOptions_ = new BuildToolsRoxygenOptions(config.getPackageRoxygenzieRd(), config.getPackageRoxygenizeCollate(), config.getPackageRoxygenizeNamespace(), config.getPackageRoxygenizeVignette(), options.getBuildOptions().getAutoRogyginizeOptions());
    boolean showRoxygenize = config.hasPackageRoxygenize() || options.getBuildContext().isRoxygen2Installed();
    roxygenizePanel_.setVisible(showRoxygenize);
    chkUseDevtools_.setValue(config.getPackageUseDevtools());
    chkUseRoxygen_.setValue(config.hasPackageRoxygenize());
    chkUseRoxygen_.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
            if (event.getValue()) {
                if (!roxygenOptions_.hasActiveRoclet()) {
                    roxygenOptions_.setRocletRd(true);
                    roxygenOptions_.setRocletCollate(true);
                    roxygenOptions_.setRocletNamespace(true);
                }
                btnConfigureRoxygen_.click();
            } else {
                roxygenOptions_.clearRoclets();
            }
        }
    });
}
Also used : 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