Package org.rstudio.core.client.widget

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


            GlobalDisplay.MSG_INFO,
            "Application Updated",
            "An updated version of RStudio is available. Your browser will " +
            "now be refreshed with the new version. All current work and data " +
            "will be preserved during the update.",
            new Operation() {
               public void execute()
               {
                  Window.Location.reload();
               }
View Full Code Here


      {
         ArrayList<String> buttonLabels = new ArrayList<String>();
         ArrayList<Operation> buttonOperations = new ArrayList<Operation>();
        
         buttonLabels.add("Quit and Download...");
         buttonOperations.add(new Operation() {
            @Override
            public void execute()
            {
               appQuit_.prepareForQuit("Update RStudio", new QuitContext()
               {
                  @Override
                  public void onReadyToQuit(boolean saveChanges)
                  {
                     Desktop.getFrame().browseUrl(result.getUpdateUrl());
                     appQuit_.performQuit(saveChanges, null);
                  }
               });
            }
         });

         buttonLabels.add("Remind Later");
         buttonOperations.add(new Operation() {
            @Override
            public void execute()
            {
               // Don't do anything here; the prompt will re-appear the next
               // time we do an update check
            }
         });

         // Only provide the option to ignore the update if it's not urgent.
         if (result.getUpdateUrgency() == 0)
         {
            buttonLabels.add("Ignore Update");
            buttonOperations.add(new Operation() {
               @Override
               public void execute()
               {
                  ignoredUpdates_.addIgnoredUpdate(result.getUpdateVersion());
                  ignoredUpdatesDirty_ = true;
View Full Code Here

      globalDisplay_.showYesNoMessage(
         MessageDialog.QUESTION,
         "Confirm Restart RStudio",
         "You need to restart RStudio in order for this change to take " +
         "effect. Do you want to do this now?",
         new Operation()
         {
            @Override
            public void execute()
            {
               forceClosed(new Command() {
View Full Code Here

                  MessageDialog.QUESTION,
                  "Confirm New Git Repository",
                  "Do you want to initialize a new git repository " +
                  "for this project?",
                  false,
                  new Operation() {
                     @Override
                     public void execute()
                     {
                        server_.gitInitRepo(
                          projDir,
                          new VoidServerRequestCallback(indicator) {
                             @Override
                             public void onSuccess()
                             {
                                onConfirmed.execute();
                             }
                             @Override
                             public void onFailure()
                             {
                                setVcsSelection(VCSConstants.NO_ID);
                             }
                          });
                       
                     }
                  },
                  new Operation() {
                     @Override
                     public void execute()
                     {
                        setVcsSelection(VCSConstants.NO_ID);
                        indicator.onCompleted();
View Full Code Here

      // prompt to confirm
      String projectPath = projFile.getParentPathString();
      globalDisplay_.showYesNoMessage(GlobalDisplay.MSG_QUESTION, 
         "Confirm Open Project",                            
         "Do you want to open the project " + projectPath + "?",                        
          new Operation()
          {
             public void execute()
             {
                 switchToProject(event.getFile().getPath());
             }
View Full Code Here

            globalDisplay_.showYesNoMessage(
              MessageDialog.QUESTION,
              "Install Shiny Package",
              userAction + " requires installation of an updated version " +
              "of the shiny package.\n\nDo you want to install shiny now?",
                  new Operation() {

                     @Override
                     public void execute()
                     {
                        yesCommand.execute();
View Full Code Here

                              new ServerRequestCallback<SessionInfo>() {

         public void onResponseReceived(final SessionInfo sessionInfo)
         {
            // initialize workbench after verifying agreement
            verifyAgreement(sessionInfo, new Operation() {
               public void execute()
               {
                  dismissLoadingProgress.execute();

                  session_.setSessionInfo(sessionInfo);
View Full Code Here

            // title and contents  
            title,
            agreement.getContents(),
            
            // bail to sign in page if the user doesn't confirm
            new Operation()
            {
               public void execute()
               {
                  if (Desktop.isDesktop())
                  {
                     Desktop.getFrame().setPendingQuit(
                                       DesktopFrame.PENDING_QUIT_AND_EXIT);
                     server_.quitSession(false,
                                         null,
                                         new SimpleRequestCallback<Boolean>());
                  }
                  else
                     navigateToSignIn();
               }
            },
       
            // user confirmed
            new Operation() {
               public void execute()
               {
                  // call verified operation
                  verifiedOperation.execute();
                 
View Full Code Here

        
               // don't include cancel
               false,
              
               // Yes operation
               new Operation() { public void execute() {
                 
                  // call interrupt then call this method back on success
                  server_.abort(null, new ServerRequestCallback<Void>() {

                     @Override
                     public void onResponseReceived(Void response)
                     {
                        // reload the application
                        reloadWithDelay(1000);
                     }
                    
                     @Override
                     public void onError(ServerError error)
                     {
                        // if we get an error during interrupt then just
                        // forward the error on to the original handler
                        requestCallback.onError(error);    
                     }
                    
                  });
                    
               }},
              
               // No operation
               new Operation() { public void execute() {
                 
                  // keep trying (reload to clear out any crufty app
                  // or networking state)
                  reloadWithDelay(1);
               }},
View Full Code Here

      {
         globalDisplay_.showYesNoMessage(
               MessageDialog.QUESTION,
               caption,
               "The R session is currently busy. Are you sure you want to quit?",
               new Operation() {
                  @Override
                  public void execute()
                  {
                     handleUnsavedChanges(caption, quitContext);
                  }},
View Full Code Here

TOP

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

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.