Package org.rstudio.studio.client.common.compilepdf.model

Examples of org.rstudio.studio.client.common.compilepdf.model.CompilePdfResult


            JsArray<CompileError> data = event.getData();
            eventBus_.fireEvent(new CompilePdfErrorsEvent(data));
         }
         else if (type.equals(ClientEvent.CompilePdfCompletedEvent))
         {
            CompilePdfResult result = event.getData();
            eventBus_.fireEvent(new CompilePdfCompletedEvent(result));
         }
         else if (type.equals(ClientEvent.SynctexEditFile))
         {
            SourceLocation sourceLocation = event.getData();
View Full Code Here


   @Override
   public void onCompilePdfCompleted(CompilePdfCompletedEvent event)
   {
      hideProgress();
     
      CompilePdfResult result = event.getResult();
      if (result.getSucceeded())
      {
         closeDialog();
      }
      else
      {  
         // show error list if there are errors
         String label = "Compile PDF failed";
         if (CompileError.showErrorList(errors_))
         {
            label +=  " (double-click to view source location of error)";
            errorList_.showErrors(result.getTargetFile(),
                                  null,
                                  errors_,
                                  CompileErrorList.AUTO_SELECT_FIRST);
            container_.setWidget(errorList_);
            errorList_.focus();
View Full Code Here

      // only handle PDF compile events when we're the preferred viewer
      if (!prefs_.getPdfPreviewValue().equals(UIPrefs.PDF_PREVIEW_RSTUDIO))
         return;
     
      // only handle successful compiles
      final CompilePdfResult result = event.getResult();
      if (!result.getSucceeded())
         return;

      // when the PDF is finished rendering, optionally navigate to the desired
      // location, or set and restore the current location
      final PdfLocation pdfLocation = result.getPdfLocation();
      if (pdfLocation != null)
      {
         executeOnPdfLoad_ = new Operation()
         {
            @Override
            public void execute()
            {
               PdfJsWindow.navigateTo(pdfJsWindow_, pdfLocation);
            }
         };
      }
        
      lastSuccessfulPdfPath_ = result.getPdfPath();
      openPdfUrl(result.getViewPdfUrl(), result.isSynctexAvailable(),
                 pdfLocation == null);
   }
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.common.compilepdf.model.CompilePdfResult

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.