Package org.rstudio.studio.client.packrat.model

Examples of org.rstudio.studio.client.packrat.model.PackratContext


            "library."
        );
        spaced(label);
        add(label);
       
        PackratContext context = options.getPackratContext();
        RProjectPackratOptions packratOptions = options.getPackratOptions();
                
        chkUsePackrat_ = new CheckBox("Use packrat with this project");
        chkUsePackrat_.setValue(context.isPackified());
        chkUsePackrat_.addValueChangeHandler(
                                new ValueChangeHandler<Boolean>() {

         @Override
         public void onValueChange(ValueChangeEvent<Boolean> event)
         {
            if (event.getValue())
               verifyPrerequisites();
            else
               manageUI(false);
         }
        });
      
        spaced(chkUsePackrat_);
        add(chkUsePackrat_);
       
        chkAutoSnapshot_ = new CheckBox("Automatically snapshot local changes");
        chkAutoSnapshot_.setValue(packratOptions.getAutoSnapshot());
        lessSpaced(chkAutoSnapshot_);
        add(chkAutoSnapshot_);
       
        String vcsName = session_.getSessionInfo().getVcsName();
        chkVcsIgnoreLib_ = new CheckBox(vcsName + " ignore packrat library");
        chkVcsIgnoreLib_.setValue(packratOptions.getVcsIgnoreLib());
        lessSpaced(chkVcsIgnoreLib_);
        add(chkVcsIgnoreLib_);
       
        chkVcsIgnoreSrc_ = new CheckBox(vcsName + " ignore packrat sources");
        chkVcsIgnoreSrc_.setValue(packratOptions.getVcsIgnoreSrc());
        lessSpaced(chkVcsIgnoreSrc_);
        add(chkVcsIgnoreSrc_);
       
        chkUseCache_ = new CheckBox("Use global cache for installed packages");
        chkUseCache_.setValue(packratOptions.getUseCache());
        spaced(chkUseCache_);
        add(chkUseCache_);
       
        panelExternalPackages_ = new VerticalPanel();
        panelExternalPackages_.add(new LabelWithHelp(
              "External packages (comma separated):",
              "packrat_external_packages",
              false));
        taExternalPackages_ = new FixedTextArea(3);
        taExternalPackages_.addStyleName(styles.externalPackages());
        taExternalPackages_.setText(
              StringUtil.join(
                    Arrays.asList(
                          JsUtil.toStringArray(
                                packratOptions.getExternalPackages()
                          )
                    ),
                    ", "));
        taExternalPackages_.getElement().getStyle().setMarginBottom(8, Unit.PX);
        panelExternalPackages_.add(taExternalPackages_);
        add(panelExternalPackages_);
       
        widgetLocalRepos_ = new LocalRepositoriesWidget();
        String[] localRepos =
              JsUtil.toStringArray(packratOptions.getLocalRepos());
        for (int i = 0; i < localRepos.length; ++i)
        {
           widgetLocalRepos_.addItem(localRepos[i]);
        }
        add(widgetLocalRepos_);
       
        manageUI(context.isPackified());

        HelpLink helpLink = new HelpLink("Learn more about Packrat",
                                         "packrat",
                                         false);
        helpLink.getElement().getStyle().setMarginTop(15, Unit.PX);
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.packrat.model.PackratContext

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.