public SourceRScriptCommand(IRInteractiveWorkflow interactiveWorkflow, IActiveWpfTextViewTracker activeTextViewTracker)
     : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSourceRScript) {
     _interactiveWorkflow = interactiveWorkflow;
     _activeTextViewTracker = activeTextViewTracker;
     _operations = interactiveWorkflow.Operations;
     _monitorSelection = VsAppShell.Current.GetGlobalService<IVsMonitorSelection>(typeof(SVsShellMonitorSelection));
     if (_monitorSelection != null) {
         var debugUIContextGuid = new Guid(UIContextGuids.Debugging);
         if (ErrorHandler.Failed(_monitorSelection.GetCmdUIContextCookie(ref debugUIContextGuid, out _debugUIContextCookie))) {
             _monitorSelection = null;
         }
     }
 }
Пример #2
0
 public SourceRScriptCommand(IRInteractiveWorkflow interactiveWorkflow, IActiveWpfTextViewTracker activeTextViewTracker)
     : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSourceRScript)
 {
     _interactiveWorkflow   = interactiveWorkflow;
     _activeTextViewTracker = activeTextViewTracker;
     _operations            = interactiveWorkflow.Operations;
     _monitorSelection      = VsAppShell.Current.GetGlobalService <IVsMonitorSelection>(typeof(SVsShellMonitorSelection));
     if (_monitorSelection != null)
     {
         var debugUIContextGuid = new Guid(UIContextGuids.Debugging);
         if (ErrorHandler.Failed(_monitorSelection.GetCmdUIContextCookie(ref debugUIContextGuid, out _debugUIContextCookie)))
         {
             _monitorSelection = null;
         }
     }
 }