public TeXCommentTagger(ITextBuffer buffer)
        {
            this.buffer      = buffer;
            tagsPerVersion   = new TextSnapshotValuesPerVersionCache <PooledStructEnumerable <ITagSpan <TeXCommentTag> > >(GenerateAllTags);
            texCommentBlocks = TextSnapshotTeXCommentBlocksProvider.Get(buffer);

            //buffer.Changed += (sender, args) => HandleBufferChanged(args);
        }
Example #2
0
 protected IntraTextAdornmentTagger(IWpfTextView textView)
 {
     this.TextView    = textView;
     Snapshot         = textView.TextBuffer.CurrentSnapshot;
     TexCommentBlocks = TextSnapshotTeXCommentBlocksProvider.Get(textView.TextBuffer);
     //this.view.LayoutChanged += HandleLayoutChanged;
     this.TextView.TextBuffer.Changed    += HandleBufferChanged;
     ((FrameworkElement)textView).Loaded += TextView_Loaded;
     perSnapshotResults = new TextSnapshotValuesPerVersionCache <PooledStructEnumerable <ITagSpan <IntraTextAdornmentTag> > >(GetAdornmentTagsOnSnapshot);
 }