示例#1
0
 public void Dispose()
 {
     if (_errorProvider != null)
     {
         _errorProvider.Tasks.Clear();
         _errorProvider.Dispose();
     }
     BufferIdleEventUtil.RemoveBufferIdleEventListener(_buffer, ReparseFile);
 }
        public OutlineTagger(ITextBuffer buffer)
        {
            _buffer   = buffer;
            _snapshot = buffer.CurrentSnapshot;
            _regions  = new List <Region>();

            ReparseFile(null, EventArgs.Empty);

            // listen for changes to the buffer, but don't process until the user stops typing
            BufferIdleEventUtil.AddBufferIdleEventListener(_buffer, ReparseFile);
        }
示例#3
0
        internal ErrorTagger(ITextBuffer buffer, IBufferTagAggregatorFactoryService aggregatorFactory, IServiceProvider serviceProvider, ITextDocumentFactoryService textDocumentFactory)
        {
            _buffer = buffer;

            _aggregator = aggregatorFactory.CreateTagAggregator <PkgDefTokenTag>(buffer);

            if (!textDocumentFactory.TryGetTextDocument(_buffer, out _document))
            {
                _document = null;
            }

            _errorProvider = new ErrorListProvider(serviceProvider);

            ReparseFile(null, EventArgs.Empty);

            BufferIdleEventUtil.AddBufferIdleEventListener(_buffer, ReparseFile);
        }
 public void Dispose()
 {
     BufferIdleEventUtil.RemoveBufferIdleEventListener(_buffer, ReparseFile);
 }