/// <summary> /// Attaches events for invoking Statement completion /// </summary> public IntellisenseController(IntellisenseControllerProvider provider, ITextView textView) { _textView = textView; _provider = provider; _classifier = _provider._classifierAgg.GetClassifier(_textView.TextBuffer); _editOps = provider._EditOperationsFactory.GetEditorOperations(textView); _incSearch = provider._IncrementalSearch.GetIncrementalSearch(textView); _textView.MouseHover += TextViewMouseHover; textView.Properties.AddProperty(typeof(IntellisenseController), this); // added so our key processors can get back to us }
public void ReplWindowCreated(IReplWindow window) { var textView = window.TextView; var editFilter = new EditFilter( textView, _editorOperationsFactory.GetEditorOperations(textView), _editorOptionsFactory.GetOptions(textView), _compModel.GetService <IIntellisenseSessionStackMapService>().GetStackForTextView(textView), _compModel ); IntellisenseController controller = IntellisenseControllerProvider.GetOrCreateController(_compModel, textView); controller.AttachKeyboardFilter(); editFilter.AttachKeyboardFilter(_adaptersFactory.GetViewAdapter(window.TextView)); }
/// <summary> /// Attaches events for invoking Statement completion /// </summary> public IntellisenseController(IntellisenseControllerProvider provider, ITextView textView, System.IServiceProvider serviceProvider) { _textView = textView; _provider = provider; _classifier = _provider._classifierAgg.GetClassifier(_textView.TextBuffer); _editOps = provider._EditOperationsFactory.GetEditorOperations(textView); _incSearch = provider._IncrementalSearch.GetIncrementalSearch(textView); _textView.MouseHover += TextViewMouseHover; _serviceProvider = serviceProvider; if (textView.TextBuffer.IsNodeJsContent()) { try { _expansionClient = new ExpansionClient(textView, provider._adaptersFactory, _serviceProvider); var textMgr = (IVsTextManager2)_serviceProvider.GetService(typeof(SVsTextManager)); textMgr.GetExpansionManager(out _expansionMgr); } catch (ArgumentException ex) { // No expansion client for this buffer, but we can continue without it Debug.Fail(ex.ToString()); } } textView.Properties.AddProperty(typeof(IntellisenseController), this); // added so our key processors can get back to us }