Beispiel #1
0
        private IWpfTextView GetLastActiveRTextView()
        {
            var textView = _textViewTracker.GetLastActiveTextView(_contentType);

            return(textView != null && !textView.IsClosed && textView.VisualElement.IsVisible
                ? textView
                : null);
        }
        private ITextView GetActiveView()
        {
            var activeReplWindow = _activeReplTracker.LastActiveWindow;

            if (activeReplWindow != null && _activeReplTracker.IsActive)
            {
                return(activeReplWindow.InteractiveWindow.TextView);
            }
            return(_textViewTracker.GetLastActiveTextView(RContentTypeDefinition.ContentType));
        }
 private IWpfTextView GetLastActiveRTextView()
 {
     foreach (var c in _contentTypes)
     {
         var textView = _textViewTracker.GetLastActiveTextView(c);
         if (textView != null && !textView.IsClosed && textView.VisualElement.IsVisible)
         {
             return(textView);
         }
     }
     return(null);
 }
 private ITextView GetActiveTextView()
 {
     return(_activeTextViewTracker.GetLastActiveTextView(RContentTypeDefinition.ContentType));
 }
Beispiel #5
0
 protected override void SetStatus()
 {
     Supported = true;
     Enabled   = _viewTracker.GetLastActiveTextView(_rContentType) != null;
 }