Beispiel #1
0
        /// <summary>
        /// Given a text view creates a new instance of the code completion controller and subscribes 
        /// to the text view keyboard events
        /// </summary>
        /// <param name="provider"></param>
        /// <param name="subjectBuffers"></param>
        /// <param name="subjectTextView"></param>
        /// <param name="context"></param>
        public Controller(ControllerProvider provider, ITextBuffer buffer, ITextView subjectTextView)
        {
            this.provider = provider;
            this.buffer = buffer;
            this.textView = subjectTextView;

            WpfTextView = subjectTextView as IWpfTextView;
            if (WpfTextView != null)
            {
                WpfTextView.VisualElement.KeyDown += new System.Windows.Input.KeyEventHandler(VisualElement_KeyDown);
                WpfTextView.VisualElement.KeyUp += new System.Windows.Input.KeyEventHandler(VisualElement_KeyUp);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Given a text view creates a new instance of the code completion controller and subscribes
        /// to the text view keyboard events
        /// </summary>
        /// <param name="provider"></param>
        /// <param name="subjectBuffers"></param>
        /// <param name="subjectTextView"></param>
        /// <param name="context"></param>
        public Controller(ControllerProvider provider, ITextBuffer buffer, ITextView subjectTextView)
        {
            this.provider = provider;
            this.buffer   = buffer;
            this.textView = subjectTextView;

            WpfTextView = subjectTextView as IWpfTextView;
            if (WpfTextView != null)
            {
                WpfTextView.VisualElement.KeyDown += new System.Windows.Input.KeyEventHandler(VisualElement_KeyDown);
                WpfTextView.VisualElement.KeyUp   += new System.Windows.Input.KeyEventHandler(VisualElement_KeyUp);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Given a text view creates a new instance of the code completion controller and subscribes 
        /// to the text view keyboard events
        /// </summary>
        /// <param name="provider"></param>
        /// <param name="subjectBuffers"></param>
        /// <param name="subjectTextView"></param>
        /// <param name="context"></param>
        public Controller(ControllerProvider provider, IList<ITextBuffer> subjectBuffers, ITextView subjectTextView, IEnvironment context)
        {
            this.provider = provider;
            this.subjectBuffers = subjectBuffers;
            this.subjectTextView = subjectTextView;
            this.context = context;

            WpfTextView = subjectTextView as IWpfTextView;
            if (WpfTextView != null)
            {
                WpfTextView.VisualElement.KeyDown += new System.Windows.Input.KeyEventHandler(VisualElement_KeyDown);
                WpfTextView.VisualElement.KeyUp += new System.Windows.Input.KeyEventHandler(VisualElement_KeyUp);
            }
        }