use of org.rstudio.studio.client.workbench.prefs.model.RPrefs in project rstudio by rstudio.
the class OptionsLoader method showOptions.
public void showOptions(final Class<?> paneClass) {
final ProgressIndicator indicator = globalDisplay_.getProgressIndicator("Error Reading Options");
indicator.onProgress("Reading options...");
server_.getRPrefs(new SimpleRequestCallback<RPrefs>() {
@Override
public void onResponseReceived(RPrefs rPrefs) {
indicator.onCompleted();
PreferencesDialog prefDialog = pPrefDialog_.get();
prefDialog.initialize(rPrefs);
if (paneClass != null)
prefDialog.activatePane(paneClass);
prefDialog.showModal();
// if the user changes global sweave or latex options notify
// them if this results in the current project being out
// of sync with the global settings
new SweaveProjectOptionsNotifier(prefDialog);
// the mac you can actually show prefs from a satellite window)
if (Desktop.isDesktop())
Desktop.getFrame().bringMainFrameToFront();
}
@Override
public void onError(ServerError error) {
indicator.onError(error.getUserMessage());
}
});
}
Aggregations