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);
}
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());
}
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());
}
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());
}
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();
}
}
});
}
Aggregations