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