public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView) { _window = codeWindow; _textView = textView; var model = CommonPackage.ComponentModel; var adaptersFactory = model.GetService<IVsEditorAdaptersFactoryService>(); var factory = model.GetService<IEditorOperationsFactoryService>(); EditFilter editFilter = _filter = new EditFilter(textView, factory.GetEditorOperations(textView)); var adapter = adaptersFactory.GetViewAdapter(textView); editFilter.AttachKeyboardFilter(adapter); var viewFilter = new TextViewFilter(); viewFilter.AttachFilter(adapter); }
public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView, IVsStatusbar statusBar) { _window = codeWindow; _textView = textView; var model = CommonPackage.ComponentModel; var adaptersFactory = model.GetService <IVsEditorAdaptersFactoryService>(); var factory = model.GetService <IEditorOperationsFactoryService>(); EditFilter editFilter = _filter = new EditFilter(textView, factory.GetEditorOperations(textView), statusBar); var textViewAdapter = adaptersFactory.GetViewAdapter(textView); editFilter.AttachKeyboardFilter(textViewAdapter); var viewFilter = new TextViewFilter(); viewFilter.AttachFilter(textViewAdapter); }