Examples of RnwWeaveDirective


Examples of org.rstudio.studio.client.common.rnw.RnwWeaveDirective

   {
      if (docDisplay_.getFileType().canKnitToHTML() ||
          docDisplay_.getFileType().isRpres())
         return "knitr";

      RnwWeaveDirective rnwWeaveDirective = detectRnwWeaveDirective(
                         TexMagicComment.parseComments(docDisplay_.getCode()));
      if (rnwWeaveDirective != null)
      {
         RnwWeave rnwWeave = rnwWeaveDirective.getRnwWeave();
         if (rnwWeave != null)
            return rnwWeave.getName();
      }
       
      return rnwWeaveRegistry_.findTypeIgnoreCase(
View Full Code Here

Examples of org.rstudio.studio.client.common.rnw.RnwWeaveDirective

   private RnwWeaveDirective detectRnwWeaveDirective(
                                    ArrayList<TexMagicComment> magicComments)
   {
      for (TexMagicComment comment : magicComments)
      {
         RnwWeaveDirective rnwWeaveDirective =
                           RnwWeaveDirective.fromTexMagicComment(comment);
         if (rnwWeaveDirective != null)
            return rnwWeaveDirective;
      }
     
View Full Code Here

Examples of org.rstudio.studio.client.common.rnw.RnwWeaveDirective

         }
      }
  
      // for Rnw we first determine the RnwWeave type
      RnwWeave rnwWeave = null;
      RnwWeaveDirective rnwWeaveDirective = null;
      if (fileType.isRnw())
      {
         rnwWeaveDirective = detectRnwWeaveDirective(magicComments);
         if (rnwWeaveDirective != null)
         {
            rnwWeave = rnwWeaveDirective.getRnwWeave();
            if (rnwWeave == null)
            {
               // show warning and bail
               display.showWarningBar(
                  "Unknown Rnw weave method '" + rnwWeaveDirective.getName() +
                  "' specified (valid types are " +
                  rnwWeaveRegistry_.getPrintableTypeNames() ")");
              
               return;
            }   
View Full Code Here

Examples of org.rstudio.studio.client.common.rnw.RnwWeaveDirective

   public RnwWeave getActiveRnwWeave()
   {
      if (docDisplay_.getFileType().canKnitToHTML())
         return rnwWeaveRegistry_.findTypeIgnoreCase("knitr");

      RnwWeaveDirective rnwWeaveDirective = detectRnwWeaveDirective(
                         TexMagicComment.parseComments(docDisplay_.getCode()));
      if (rnwWeaveDirective != null)
         return rnwWeaveDirective.getRnwWeave();
      else
         return rnwWeaveRegistry_.findTypeIgnoreCase(
                                    prefs_.defaultSweaveEngine().getValue());
   }
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.