@Override
protected void initialize(RPrefs prefs)
{
// packages prefs
PackagesPrefs packagesPrefs = prefs.getPackagesPrefs();
cranMirrorTextBox_.setEnabled(true);
if (!packagesPrefs.getCRANMirror().isEmpty())
{
cranMirror_ = packagesPrefs.getCRANMirror();
cranMirrorTextBox_.setText(cranMirror_.getDisplay());
}
useInternet2_.setEnabled(true);
useInternet2_.setValue(packagesPrefs.getUseInternet2());
useInternet2_.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event)
{
globalDisplay_.showMessage(
MessageDialog.INFO,
"Restart R Required",
"You must restart your R session for this setting " +
"to take effect.");
}
});
cleanupAfterCheckSuccess_.setEnabled(true);
cleanupAfterCheckSuccess_.setValue(packagesPrefs.getCleanupAfterCheckSuccess());
viewDirAfterCheckFailure_.setEnabled(true);
viewDirAfterCheckFailure_.setValue(packagesPrefs.getViewDirAfterCheckFailure());
hideObjectFiles_.setEnabled(true);
hideObjectFiles_.setValue(packagesPrefs.getHideObjectFiles());
useDevtools_.setEnabled(true);
useDevtools_.setValue(packagesPrefs.getUseDevtools());
}