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

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


                    {
                       if (!SavePlotAsPdfOptions.areEqual(
                                                options,
                                                currentOptions))
                       {
                          UIPrefs prefs = uiPrefs_.get();
                          prefs.savePlotAsPdfOptions().setGlobalValue(options);
                          prefs.writeUIPrefs();   
                       }
                    }   
                 })
            }
View Full Code Here


      newProjectParent_ = new DirectoryChooserTextBox(
            "Create project as subdirectory of:", txtProjectName_);
      addWidget(newProjectParent_);
     
      // if git is available then add git init
      UIPrefs uiPrefs = RStudioGinjector.INSTANCE.getUIPrefs();
      SessionInfo sessionInfo =
         RStudioGinjector.INSTANCE.getSession().getSessionInfo();
     
      HorizontalPanel optionsPanel = null;
      if (getOptionsSideBySide())
         optionsPanel = new HorizontalPanel();
     
      chkGitInit_ = new CheckBox("Create a git repository");
      chkGitInit_.addStyleName(styles.wizardCheckbox());
      if (sessionInfo.isVcsAvailable(VCSConstants.GIT_ID))
      { 
         chkGitInit_.setValue(uiPrefs.newProjGitInit().getValue());
         chkGitInit_.getElement().getStyle().setMarginRight(7, Unit.PX);
         if (optionsPanel != null)
         {
            optionsPanel.add(chkGitInit_);
         }
         else
         {
            addSpacer();
            addWidget(chkGitInit_);
         }
      }
     
      // Initialize project with packrat
      chkPackratInit_ = new CheckBox("Use packrat with this project");
      chkPackratInit_.setValue(uiPrefs.newProjUsePackrat().getValue());
     
      if (optionsPanel != null)
      {
         optionsPanel.add(chkPackratInit_);
      }
View Full Code Here

             {
                indicator.onCompleted();
               
                // update project ui prefs
                RProjectConfig config = options.getConfig();
                UIPrefs uiPrefs = pUIPrefs_.get();
                uiPrefs.useSpacesForTab().setProjectValue(
                                           config.getUseSpacesForTab());
                uiPrefs.numSpacesForTab().setProjectValue(
                                           config.getNumSpacesForTab());
                uiPrefs.autoAppendNewline().setProjectValue(
                                           config.getAutoAppendNewline());
                uiPrefs.stripTrailingWhitespace().setProjectValue(
                                           config.getStripTrailingWhitespace());
                uiPrefs.defaultEncoding().setProjectValue(
                                           config.getEncoding());
                uiPrefs.defaultSweaveEngine().setProjectValue(
                                           config.getDefaultSweaveEngine());
                uiPrefs.defaultLatexProgram().setProjectValue(
                                           config.getDefaultLatexProgram());
                uiPrefs.rootDocument().setProjectValue(
                                           config.getRootDocument());
                uiPrefs.useRoxygen().setProjectValue(
                                           config.hasPackageRoxygenize());
               
                // convert packrat option changes to console actions
                emitPackratConsoleActions(options.getPackratOptions());
               
View Full Code Here

      createProjectCmds.addCommand(new SerializedCommand()
      {
         @Override
         public void onExecute(final Command continuation)
         {
            UIPrefs uiPrefs = pUIPrefs_.get();
           
            // update default project location pref if necessary
            if ((newProject.getNewDefaultProjectLocation() != null) ||
                (newProject.getCreateGitRepo() !=
                 uiPrefs.newProjGitInit().getValue()))
            {
               indicator.onProgress("Saving defaults...");

               if (newProject.getNewDefaultProjectLocation() != null)
               {
                  uiPrefs.defaultProjectLocation().setGlobalValue(
                     newProject.getNewDefaultProjectLocation());
               }
              
               if (newProject.getCreateGitRepo() !=
                   uiPrefs.newProjGitInit().getValue())
               {
                  uiPrefs.newProjGitInit().setGlobalValue(
                                          newProject.getCreateGitRepo());
               }
              
               if (newProject.getUsePackrat() !=
                   uiPrefs.newProjUsePackrat().getValue())
               {
                  uiPrefs.newProjUsePackrat().setGlobalValue(
                                          newProject.getUsePackrat());
               }
              
               // call the server -- in all cases continue on with
               // creating the project (swallow errors updating the pref)
View Full Code Here

      );
   }-*/;

   private void setShinyViewerType(int viewerType)
   {
      UIPrefs prefs = pPrefs_.get();
      prefs.shinyViewerType().setGlobalValue(viewerType);
      prefs.writeUIPrefs();
      server_.setShinyViewerType(viewerType, new VoidServerRequestCallback());
   }
View Full Code Here

TOP

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

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.