Package org.rstudio.core.client.widget

Examples of org.rstudio.core.client.widget.ProgressIndicator


            }
         });
      }
      else
      {
         final ProgressIndicator indicator = new GlobalProgressDelayer(
               globalDisplay_, 500, "Starting shell...").getIndicator();
        
         server_.startShellDialog(new ServerRequestCallback<ConsoleProcess>() {

            @Override
            public void onResponseReceived(ConsoleProcess proc)
            {
               indicator.onCompleted();
               new ConsoleProgressDialog(proc, server_).showModal();
            }
           
            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());
            }
         });
      }
   }
View Full Code Here


                                                 this);
      }

      public void execute(final String input, final ProgressIndicator progress)
      {
         context_.mkdir(input, new ProgressIndicator()
         {
            public void onProgress(String message)
            {
               progress.onProgress(message);
            }
View Full Code Here

      showOptions(true);
   }
  
   private void showOptions(final boolean activateSourceControl)
   {
      final ProgressIndicator indicator = globalDisplay_.getProgressIndicator(
                                                      "Error Reading Options");
      indicator.onProgress("Reading options...");

      server_.getRPrefs(
         new SimpleRequestCallback<RPrefs>() {

            @Override
            public void onResponseReceived(RPrefs rPrefs)
            {
               indicator.onCompleted();
               PreferencesDialog prefDialog = pPrefDialog_.get();
               prefDialog.initialize(rPrefs);
               if (activateSourceControl)
                  prefDialog.activateSourceControl();
               prefDialog.showModal();
              
               // if the user changes global sweave or latex options notify
               // them if this results in the current project being out
               // of sync with the global settings
               new SweaveProjectOptionsNotifier(prefDialog);
              
               // activate main window if we are in desktop mode (because on
               // the mac you can actually show prefs from a satellite window)
               if (Desktop.isDesktop())
                  Desktop.getFrame().bringMainFrameToFront();
            }

            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());
            }          
         });       
   }
View Full Code Here

      deps.setLength(dependencies.length);
      for (int i = 0; i<deps.length(); i++)
         deps.set(i, dependencies[i]);
     
      // create progress indicator
      final ProgressIndicator progress = new GlobalProgressDelayer(
            globalDisplay_,
            250,
            progressCaption + "...").getIndicator();
     
      // query for unsatisfied dependencies
      server_.unsatisfiedDependencies(
            deps, silentUpdate, new ServerRequestCallback<JsArray<Dependency>>() {

         @Override
         public void onResponseReceived(
                              final JsArray<Dependency> unsatisfiedDeps)
         {
            progress.onCompleted();
           
            // if we've satisfied all dependencies then execute the command
            if (unsatisfiedDeps.length() == 0)
            {
               command.execute();
            }
           
            // otherwise ask the user if they want to install the
            // unsatisifed dependencies
            else
            {
               Command installCommand = new Command() {
                  @Override
                  public void execute()
                  {
                     installDependencies(unsatisfiedDeps, silentUpdate, command);
                  }
               };
              
               if (userPrompt != null)
               {
                  userPrompt.execute(installCommand);
               }
               else
               {
                  confirmPackageInstallation(userAction,
                                             unsatisfiedDeps,
                                             installCommand);                          
               }
            }
         }
        
         @Override
         public void onError(ServerError error)
         {
            progress.onError(error.getUserMessage());
           
         }
      });
     
   }
View Full Code Here

                                SourceLocation sourceLocation)
   {
      if (handleDesktopSynctex())
      {
         // apply concordane
         final ProgressIndicator indicator = getSyncProgress()
         server_.applyForwardConcordance(
                                 pdfFile,
                                 sourceLocation,
                                 new ServerRequestCallback<SourceLocation>() {
            @Override
            public void onResponseReceived(SourceLocation sourceLocation)
            {
               indicator.onCompleted();
              
               if (sourceLocation != null)
               {
                  Desktop.getFrame().externalSynctexView(
                                 pdfFile,
                                 sourceLocation.getFile(),
                                 sourceLocation.getLine(),
                                 sourceLocation.getColumn());   
               }
            }
           
            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());
            }
           
         });
        
         return true;
View Full Code Here

   private void doForwardSearch(String rootDocument,
                                JavaScriptObject sourceLocationObject)
   {
      SourceLocation sourceLocation = sourceLocationObject.cast();
     
      final ProgressIndicator indicator = getSyncProgress();
      server_.synctexForwardSearch(
         rootDocument,
         sourceLocation,
         new ServerRequestCallback<PdfLocation>() {

            @Override
            public void onResponseReceived(PdfLocation location)
            {
               indicator.onCompleted();
              
               if (location != null)
                  eventBus_.fireEvent(new SynctexViewPdfEvent(location));
            }
           
            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());    
            }
              
       });
   }
View Full Code Here

  
   private void doInverseSearch(JavaScriptObject pdfLocationObject)
   {
      PdfLocation pdfLocation = pdfLocationObject.cast();
     
      final ProgressIndicator indicator = getSyncProgress()
      server_.synctexInverseSearch(
          pdfLocation,
          new ServerRequestCallback<SourceLocation>() {

             @Override
             public void onResponseReceived(SourceLocation location)
             {
                indicator.onCompleted();
               
                if (location != null)
                   goToSourceLocation(location);
             }

             @Override
             public void onError(ServerError error)
             {
                indicator.onError(error.getUserMessage());    
             }    
        });  
  
View Full Code Here

  
  
   private void doDesktopInverseSearch(String file, int line, int column)
   {
      // apply concordance
      final ProgressIndicator indicator = getSyncProgress()
      server_.applyInverseConcordance(
                              SourceLocation.create(file, line, column, true),
                              new ServerRequestCallback<SourceLocation>() {
         @Override
         public void onResponseReceived(SourceLocation sourceLocation)
         {
            indicator.onCompleted();
           
            if (sourceLocation != null)
               goToSourceLocation(sourceLocation);
         }
        
         @Override
         public void onError(ServerError error)
         {
            indicator.onError(error.getUserMessage());
         }
        
      });
     
   }
View Full Code Here

               public void execute()
               {
                  final GlobalDisplay globalDisplay = RStudioGinjector.INSTANCE
                        .getGlobalDisplay();

                  buttonSpec.progressOperation.execute(new ProgressIndicator()
                  {
                     public void onProgress(String message)
                     {
                        if (dismissProgress_ != null)
                           dismissProgress_.execute();
View Full Code Here

  
   public void showDialog(final IgnoreList ignoreList,
                          final Strategy strategy)
   {
      // show progress
      final ProgressIndicator globalIndicator = new GlobalProgressDelayer(
                       globalDisplay_,
                       500,
                       "Getting ignored files for path...").getIndicator();
     
      // get existing ignores
      final String fullPath = projPathToFullPath(ignoreList.getPath());
      strategy.getIgnores(fullPath,
                          new ServerRequestCallback<ProcessResult>() {
         @Override
         public void onResponseReceived(final ProcessResult result)
         {
            globalIndicator.onCompleted();
           
            if (checkForProcessError(strategy.getDialogCaption(), result))
               return;
               
            // show the ignore dialog
            String ignored = getIgnored(ignoreList, result.getOutput());
            showDialog(fullPath, ignored, strategy);
         }
        
         @Override
         public void onError(ServerError error)
         {
            globalIndicator.onError(error.getUserMessage());
         }
      });
   }
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.widget.ProgressIndicator

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.