Beispiel #1
0
        protected override void OnCreate()
        {
            _window = _componentModel.GetService <IInteractiveWindowFactoryService>().CreateWindow(_evaluator);
            _window.SubmissionBufferAdded += SubmissionBufferAdded;
            _textViewHost = _window.GetTextViewHost();
            var viewAdapter = _editorAdapters.GetViewAdapter(_textViewHost.TextView);

            _findTarget    = viewAdapter as IVsFindTarget;
            _commandTarget = viewAdapter as IOleCommandTarget;
        }
        protected override void OnCreate()
        {
            _window = _componentModel.GetService <IInteractiveWindowFactoryService>().CreateWindow(_evaluator);
            _window.SubmissionBufferAdded += SubmissionBufferAdded;
            _textViewHost = _window.GetTextViewHost();
            var textView = _textViewHost.TextView;

            textView.Options.SetOptionValue(EnableFindOptionName, true);
            AutomationProperties.SetName(textView.VisualElement, Caption);

            var viewAdapter = _editorAdapters.GetViewAdapter(textView);

            _findTarget    = viewAdapter as IVsFindTarget;
            _commandTarget = viewAdapter as IOleCommandTarget;
        }
Beispiel #3
0
 internal Task InvokeAsync(Action action)
 {
     return(((System.Windows.UIElement)_window.GetTextViewHost()).Dispatcher.InvokeAsync(action).Task);
 }
 protected override void OnCreate()
 {
     _window = _componentModel.GetService<IInteractiveWindowFactoryService>().CreateWindow(_evaluator);
     _window.SubmissionBufferAdded += SubmissionBufferAdded;
     _textViewHost = _window.GetTextViewHost();
     var viewAdapter = _editorAdapters.GetViewAdapter(_textViewHost.TextView);
     _findTarget = viewAdapter as IVsFindTarget;
     _commandTarget = viewAdapter as IOleCommandTarget;
 }