示例#1
0
        internal SinkManager(ErrorHighLightProvider spellingErrorsProvider, ITableDataSink sink)
        {
            _spellingErrorsProvider = spellingErrorsProvider;
            _sink = sink;

            spellingErrorsProvider.AddSinkManager(this);
        }
示例#2
0
        internal ErrorHighLightChecker(ErrorHighLightProvider provider, ITextView textView, ITextBuffer buffer)
        {
            _provider        = provider;
            _buffer          = buffer;
            _currentSnapshot = buffer.CurrentSnapshot;
            _textview        = textView;
            // 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)
            }


            // 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 ErrorFactory(this, new ErrorSnapShot(this._filePath, 0));
        }