Package org.rstudio.core.client.widget

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


                  "however it is not currently installed. You should " +
                  "ensure that " + weave.getPackageName() + " is installed " +
                  "prior to compiling a PDF." +
                  "\n\nAre you sure you want to change this option?",
                  false,
                  new Operation() {
                     @Override
                     public void execute()
                     {
                     }
                   },
                  new Operation() {
                     @Override
                     public void execute()
                     {
                        setValue(rnwWeaveRegistry_.getTypes().get(0).getName());
                    
View Full Code Here


   {
      entry.expanded = false;
      entry.isExpanding = true;
      if (drawProgress)
         redrawRowSafely(idx);
      observer_.fillObjectContents(entry.rObject, new Operation() {
         public void execute()
         {
            entry.expanded = true;
            entry.isExpanding = false;
            redrawRowSafely(idx);
View Full Code Here

            globalDisplay_.showYesNoMessage(
                  GlobalDisplay.MSG_WARNING,
                  "Revert Changes",
                  "Changes to the selected " + noun + " will be lost, including " +
                  "staged changes.\n\nAre you sure you want to continue?",
                  new Operation()
                  {
                     @Override
                     public void execute()
                     {
                        view_.getChangelistTable().selectNextUnselectedItem();

                        server_.gitRevert(
                              paths,
                              new SimpleRequestCallback<Void>("Revert Changes"));
                       
                        view_.getChangelistTable().focus();
                     }
                  },
                  false);
         }
      });
     
      view_.getIgnoreButton().addClickHandler(new ClickHandler() {

         @Override
         public void onClick(ClickEvent event)
         {
            gitPresenterCore_.onVcsIgnore(
                              view_.getChangelistTable().getSelectedItems());
         }
      });

      view_.getCommitIsAmend().addValueChangeHandler(new ValueChangeHandler<Boolean>()
      {
         @Override
         public void onValueChange(ValueChangeEvent<Boolean> booleanValueChangeEvent)
         {
            server_.gitHistory("", null, 0, 1, null, new ServerRequestCallback<RpcObjectList<CommitInfo>>() {
               @Override
               public void onResponseReceived(RpcObjectList<CommitInfo> response)
               {
                  if (response.length() == 1)
                  {
                     String description = response.get(0).getDescription();

                     if (view_.getCommitIsAmend().getValue())
                     {
                        if (view_.getCommitMessage().getText().length() == 0)
                           view_.getCommitMessage().setText(description);
                     }
                     else
                     {
                        if (view_.getCommitMessage().getText().equals(description))
                           view_.getCommitMessage().setText("");
                     }
                  }
               }

               @Override
               public void onError(ServerError error)
               {
                  Debug.logError(error);
               }
            });
         }
      });

      view_.getStageAllButton().addClickHandler(
            new ApplyPatchClickHandler(PatchMode.Stage, false));
      view_.getDiscardAllButton().addClickHandler(new ClickHandler()
      {
         @Override
         public void onClick(ClickEvent event)
         {
            String which = view_.getLineTableDisplay().getSelectedLines().size() == 0
                           ? "All unstaged"
                           : "The selected";
            globalDisplay.showYesNoMessage(
                  GlobalDisplay.MSG_WARNING,
                  "Discard All",
                  which + " changes in this file will be " +
                  "lost.\n\nAre you sure you want to continue?",
                  new Operation() {
                     @Override
                     public void execute() {
                        new ApplyPatchClickHandler(PatchMode.Working, true).execute();
                     }
                  },
View Full Code Here

      globalDisplay_.showYesNoMessage(
            GlobalDisplay.MSG_WARNING,
            "Revert Changes",
            "Changes to the selected " + noun + " will be lost, including " +
            "staged changes.\n\nAre you sure you want to continue?",
            new Operation()
            {
               @Override
               public void execute()
               {
                  if (onRevertConfirmed != null)
View Full Code Here

   }

   private Operation completeFileUploadOperation(final FileUploadToken token,
                                                 final boolean commit)
   {
      return new Operation()
      {
         public void execute()
         {
            String msg = (commit ? "Completing" : "Cancelling") +
            " file upload...";
View Full Code Here

            globalDisplay.showYesNoMessage(
                  GlobalDisplay.MSG_WARNING,
                  "Discard All",
                  which + " changes in this file will be " +
                  "lost.\n\nAre you sure you want to continue?",
                  new Operation()
                  {
                     @Override
                     public void execute()
                     {
                        new DiscardClickHandler().execute();
View Full Code Here

            // the file exists--offer to clean it up and continue.
            globalDisplay_.showYesNoMessage(GlobalDisplay.MSG_QUESTION,
                  "Overwrite " + (template.createDir() ? "Directory" : "File"),
                  targetFile + " exists. Overwrite it?", false,
                  new Operation()
                  {
                     @Override
                     public void execute()
                     {
                        cleanAndCreateTemplate(template, target, fsi);
View Full Code Here

            resultCallback.onCancelled();
         showFileTooLargeWarning(file, target.getFileSizeLimit());
      }
      else if (file.getLength() > target.getLargeFileSize())
      {
         confirmOpenLargeFile(file, new Operation() {
            public void execute()
            {
               openFileFromServer(file, fileType, resultCallback);
            }
         }, new Operation() {
            public void execute()
            {
               // user (wisely) cancelled
               if (resultCallback != null)
                  resultCallback.onCancelled();
View Full Code Here

         MessageDialog.WARNING,
         "Stop Running Compile",
         "There is a PDF compilation currently running. If you " +
         operation + " it will be terminated. Are you " +
         "sure you want to stop the running PDF compilation?",
         new Operation() {
            @Override
            public void execute()
            {
               terminateCompilePdf(onTerminated);
            }},
View Full Code Here

      {
        globalDisplay_.showYesNoMessage(GlobalDisplay.MSG_QUESTION,
              "Stop R Markdown Rendering",
              "The rendering of '" + targetFile_ + "' is in progress. Do you "+
              "want to terminate and close the tab?", false,
              new Operation()
              {
                 @Override
                 public void execute()
                 {
                    // Close the tab immediately and terminate the knit
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.