Examples of RmdTemplateFormatOption


Examples of org.rstudio.studio.client.rmarkdown.model.RmdTemplateFormatOption

      // transferable, try to find it in one of the other formats
      JsArrayString options = template.getFormat(format).getOptions();
      for (int i = 0; i < options.length(); i++)
      {
         String optionName = options.get(i);
         RmdTemplateFormatOption option = template.getOption(optionName);
         if (!option.isTransferable())
            continue;
        
         // option is transferable, is it present in another front matter entry?
         JsArrayString formats = frontMatter.getFormatList();
         for (int j = 0; j < formats.length(); j++)
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdTemplateFormatOption

      optionWidgets_ = new ArrayList<RmdFormatOption>();
      JsArrayString options = format.getOptions();
      for (int i = 0; i < options.length(); i++)
      {
         RmdFormatOption optionWidget;
         RmdTemplateFormatOption option = findOption(format.getName(),
                                                     options.get(i));
         if (option == null)
            continue;
        
         String initialValue = option.getDefaultValue();

         // check to see whether a value for this format and option were
         // specified in the front matter
         String frontMatterValue = getFrontMatterDefault(
               format.getName(), option.getName());
         if (frontMatterValue != null)
            initialValue = frontMatterValue;
        
         optionWidget = createWidgetForOption(option, initialValue);
         if (optionWidget == null)
            continue;
        
         optionWidget.asWidget().addStyleName(style.optionWidget());

         FlowPanel panel = null;
         String category = option.getCategory();
         if (tabs_.containsKey(category))
         {
            panel = tabs_.get(category);
         }
         else
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdTemplateFormatOption

   }
  
   private RmdTemplateFormatOption findOption(String formatName,
                                              String optionName)
   {
      RmdTemplateFormatOption result = null;
      for (int i = 0; i < options_.length(); i++)
      {
         RmdTemplateFormatOption option = options_.get(i);
        
         // Not the option we're looking for
         if (!option.getName().equals(optionName))
            continue;

         String optionFormatName = option.getFormatName();
         if (optionFormatName.length() > 0)
         {
            // A format-specific option: if it's for this format we're done,
            // otherwise keep looking
            if (optionFormatName.equals(formatName))
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdTemplateFormatOption

            if (optionCache_.containsKey(option))
            {
               // If the option is specifically labeled as transferable
               // between formats, add a generic key to be applied to other
               // formats
               RmdTemplateFormatOption formatOption = optionCache_.get(option);
               if (formatOption.isTransferable())
               {
                  frontMatterCache_.put(option, value);
               }
            }
         }
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdTemplateFormatOption

      if (optionCache_ != null)
         return;
      optionCache_ = new HashMap<String, RmdTemplateFormatOption>();
      for (int i = 0; i < options_.length(); i++)
      {
         RmdTemplateFormatOption option = options_.get(i);
         if (option.getFormatName().length() > 0)
            continue;
         optionCache_.put(option.getName(), option);
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.