/// <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); } }
/// <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); } }