use of org.rstudio.studio.client.projects.model.RProjectVcsOptions in project rstudio by rstudio.
the class ProjectSourceControlPreferencesPane method initialize.
@Override
protected void initialize(RProjectOptions options) {
// save the context
vcsContext_ = options.getVcsContext();
// populate the vcs selections list
String[] vcsSelections = new String[] { NONE };
JsArrayString applicableVcs = vcsContext_.getApplicableVcs();
if (applicableVcs.length() > 0) {
vcsSelections = new String[applicableVcs.length() + 1];
vcsSelections[0] = NONE;
for (int i = 0; i < applicableVcs.length(); i++) vcsSelections[i + 1] = applicableVcs.get(i);
}
vcsSelect_.setChoices(vcsSelections);
// set override or default
RProjectVcsOptions vcsOptions = options.getVcsOptions();
if (vcsOptions.getActiveVcsOverride().length() > 0)
setVcsSelection(vcsOptions.getActiveVcsOverride());
else
setVcsSelection(vcsContext_.getDetectedVcs());
}
use of org.rstudio.studio.client.projects.model.RProjectVcsOptions in project rstudio by rstudio.
the class ProjectSourceControlPreferencesPane method onApply.
@Override
public boolean onApply(RProjectOptions options) {
RProjectVcsOptions vcsOptions = options.getVcsOptions();
setVcsOptions(vcsOptions);
return false;
}
Aggregations