public TagAggregator(TagAggregatorFactoryService factory, ITextView textView, IBufferGraph bufferGraph, TagAggregatorOptions options) { this.TagAggregatorFactoryService = factory; this.textView = textView; this.BufferGraph = bufferGraph; this.options = options; this.joinableTaskHelper = new JoinableTaskHelper(factory.JoinableTaskContext); if (textView != null) { textView.Closed += this.OnTextView_Closed; } taggers = new Dictionary <ITextBuffer, IList <ITagger <T> > >(); uniqueTaggers = new List <Tuple <ITagger <T>, int> >(); if (((TagAggregatorOptions2)options).HasFlag(TagAggregatorOptions2.DeferTaggerCreation)) { this.joinableTaskHelper.RunOnUIThread((Action)(this.EnsureInitialized)); } else { this.Initialize(); } this.BufferGraph.GraphBufferContentTypeChanged += new EventHandler <GraphBufferContentTypeChangedEventArgs>(BufferGraph_GraphBufferContentTypeChanged); this.BufferGraph.GraphBuffersChanged += new EventHandler <GraphBuffersChangedEventArgs>(BufferGraph_GraphBuffersChanged); }
public ITagAggregator <T> CreateTagAggregator <T>(ITextBuffer textBuffer, TagAggregatorOptions options) where T : ITag { if (textBuffer == null) { throw new ArgumentNullException(nameof(textBuffer)); } return(new TextBufferTagAggregator <T>(taggerFactory, bufferGraphFactoryService.CreateBufferGraph(textBuffer), textBuffer, options)); }
public ITagAggregator <T> CreateTagAggregator <T>(ITextView textView, TagAggregatorOptions options) where T : ITag { if (textView == null) { throw new ArgumentNullException(nameof(textView)); } return(new TextViewTagAggregator <T>(taggerFactory, textView, options)); }
public ITagAggregator <T> CreateTagAggregator <T>(ITextView textView, TagAggregatorOptions options) where T : ITag { if (textView == null) { throw new ArgumentNullException(nameof(textView)); } return(new TagAggregator <T>(this, textView, textView.BufferGraph, options)); }
public ITagAggregator <T> CreateTagAggregator <T>(ITextBuffer textBuffer, TagAggregatorOptions options) where T : ITag { if (textBuffer == null) { throw new ArgumentNullException("textBuffer"); } return(new TagAggregator <T>(this, null, this.BufferGraphFactoryService.CreateBufferGraph(textBuffer), options)); }
public ITagAggregator <T> CreateTagAggregator <T>(ITextBuffer textBuffer, TagAggregatorOptions options) where T : ITag { if (typeof(T) == typeof(DeveroomTag)) { var taggerProvider = new DeveroomTaggerProvider(_ideScope, null); taggerProvider.CreateImmediateParsingTagger = true; return(new StubTagAggregator <T>((ITagger <T>)taggerProvider.CreateTagger <DeveroomTag>(textBuffer), VsxStubObjects.BufferGraphFactoryService.CreateBufferGraph(textBuffer))); } throw new NotSupportedException(); }
protected TagAggregatorBase(ITextBuffer textBuffer, TagAggregatorOptions options) { if (textBuffer == null) { throw new ArgumentNullException(nameof(textBuffer)); } this.dispatcher = Dispatcher.CurrentDispatcher; this.batchedTagsChangedList = new List <IMappingSpan>(); this.lockObj = new object(); TextBuffer = textBuffer; TextBuffer.ContentTypeChanged += TextBuffer_ContentTypeChanged; this.taggers = Array.Empty <ITagger <T> >(); }
public TagAggregator(TagAggregatorFactoryService factory, ITextView textView, IBufferGraph bufferGraph, TagAggregatorOptions options) { this.TagAggregatorFactoryService = factory; this.textView = textView; this.BufferGraph = bufferGraph; this.options = options; this.joinableTaskHelper = new JoinableTaskHelper(factory.JoinableTaskContext); if (textView != null) { textView.Closed += this.OnTextView_Closed; } if (((TagAggregatorOptions2)options).HasFlag(TagAggregatorOptions2.DeferTaggerCreation)) { this.joinableTaskHelper.RunOnUIThread((Action)(this.EnsureInitialized)); } else { this.Initialize(); } }
public TextViewTagAggregator(ITaggerFactory taggerFactory, ITextView textView, TagAggregatorOptions options) : base(textView.BufferGraph, textView.TextBuffer, options) { this.taggerFactory = taggerFactory; this.textView = textView; textView.Closed += TextView_Closed; Initialize(); }
public TextBufferTagAggregator(ITaggerFactory taggerFactory, IBufferGraph bufferGraph, ITextBuffer textBuffer, TagAggregatorOptions options) : base(bufferGraph, textBuffer, options) { this.taggerFactory = taggerFactory; Initialize(); }
protected TagAggregatorBase(IBufferGraph bufferGraph, ITextBuffer textBuffer, TagAggregatorOptions options) { dispatcher = Dispatcher.CurrentDispatcher; batchedTagsChangedList = new List <IMappingSpan>(); lockObj = new object(); BufferGraph = bufferGraph ?? throw new ArgumentNullException(nameof(bufferGraph)); TextBuffer = textBuffer ?? throw new ArgumentNullException(nameof(textBuffer)); TextBuffer.ContentTypeChanged += TextBuffer_ContentTypeChanged; taggers = Array.Empty <ITagger <T> >(); }