internal SinkManager(SpellCheckerProvider spellingErrorsProvider, ITableDataSink sink) { _spellingErrorsProvider = spellingErrorsProvider; _sink = sink; spellingErrorsProvider.AddSinkManager(this); }
internal SpellChecker(SpellCheckerProvider provider, ITextView textView, ITextBuffer buffer) { _provider = provider; _buffer = buffer; _currentSnapshot = buffer.CurrentSnapshot; // Get the name of the underlying document buffer ITextDocument document; if (provider.TextDocumentFactoryService.TryGetTextDocument(textView.TextDataModel.DocumentBuffer, out document)) { this.FilePath = document.FilePath; // TODO we should listen for the file changing its name (ITextDocument.FileActionOccurred) } // turn on spell checking for the box we're using to do spell checking. _box.SpellCheck.IsEnabled = true; // We're assuming we're created on the UI thread so capture the dispatcher so we can do all of our updates on the UI thread. _uiThreadDispatcher = Dispatcher.CurrentDispatcher; this.Factory = new SpellingErrorsFactory(this, new SpellingErrorsSnapshot(this.FilePath, 0)); }