Ejemplo n.º 1
0
 private void HandleCancel(RCompletionController controller)
 {
     if (!controller.HasActiveCompletionSession && !controller.HasActiveSignatureSession(TextView))
     {
         Workflow.Operations.CancelAsync().DoNotWait();
         // Post interrupt command which knows if it can interrupt R or not
         Workflow.Shell.PostCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdInterruptR);
     }
 }
Ejemplo n.º 2
0
        private bool HandleCancel(RCompletionController controller)
        {
            if (controller.HasActiveCompletionSession || controller.HasActiveSignatureSession(TextView))
            {
                controller.DismissAllSessions();
                return(true);
            }

            // If session is reading user input, do not terminate it
            if (!Workflow.RSession.IsReadingUserInput)
            {
                Workflow.Shell.PostCommand(RGuidList.RCmdSetGuid, RPackageCommandId.icmdInterruptR);
            }

            return(false);
        }