Package org.rstudio.studio.client.workbench.prefs.model

Examples of org.rstudio.studio.client.workbench.prefs.model.GeneralPrefs


  
   @Override
   protected void initialize(RPrefs rPrefs)
   {
      // general prefs
      GeneralPrefs generalPrefs = rPrefs.getGeneralPrefs();
     
      saveWorkspace_.setEnabled(true);
      loadRData_.setEnabled(true);
      dirChooser_.setEnabled(true);
     
      int saveWorkspaceIndex;
      switch (generalPrefs.getSaveAction())
      {
         case SaveAction.NOSAVE:
            saveWorkspaceIndex = 1;
            break;
         case SaveAction.SAVE:
            saveWorkspaceIndex = 0;
            break;
         case SaveAction.SAVEASK:
         default:
            saveWorkspaceIndex = 2;
            break;
      }
      saveWorkspace_.getListBox().setSelectedIndex(saveWorkspaceIndex);

      loadRData_.setValue(generalPrefs.getLoadRData());
      dirChooser_.setText(generalPrefs.getInitialWorkingDirectory());
       
      // history prefs
      HistoryPrefs historyPrefs = rPrefs.getHistoryPrefs();
     
      alwaysSaveHistory_.setEnabled(true);
      removeHistoryDuplicates_.setEnabled(true);
     
      alwaysSaveHistory_.setValue(historyPrefs.getAlwaysSave());
      removeHistoryDuplicates_.setValue(historyPrefs.getRemoveDuplicates());
     
      rProfileOnResume_.setValue(generalPrefs.getRprofileOnResume());
      rProfileOnResume_.setEnabled(true);
    
      // projects prefs
      ProjectsPrefs projectsPrefs = rPrefs.getProjectsPrefs();
      restoreLastProject_.setEnabled(true);
View Full Code Here


               saveAction = SaveAction.SAVEASK;
               break;
         }

         // set general prefs
         GeneralPrefs generalPrefs = GeneralPrefs.create(saveAction,
                                                         loadRData_.getValue(),
                                                         rProfileOnResume_.getValue(),
                                                         dirChooser_.getText());
         rPrefs.setGeneralPrefs(generalPrefs);
        
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.workbench.prefs.model.GeneralPrefs

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.