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

            //buffer.Changed += (sender, args) => HandleBufferChanged(args);
        }
        internal TeXSyntaxClassifier(ITextBuffer buffer, IClassificationTypeRegistryService registry)
        {
            this.buffer = buffer;
            this.classificationTypeRegistry = registry;
            texCommentBlocks = TextSnapshotTeXCommentBlocksProvider.Get(buffer);

            commandClassificationType   = classificationTypeRegistry.GetClassificationType("TeX.command");
            mathBlockClassificationType = classificationTypeRegistry.GetClassificationType("TeX.mathBlock");
        }
示例#3
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);
 }