Пример #1
0
        public BraceMatchingTagger(BackgroundParser backgroundParser, ITextView textView, BraceMatcher braceMatcher)
        {
            backgroundParser.RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority.Medium, this);

            textView.Caret.PositionChanged += OnCaretPositionChanged;

            _textView     = textView;
            _braceMatcher = braceMatcher;
        }
Пример #2
0
        public BraceMatchingTagger(BackgroundParser backgroundParser, ITextView textView, BraceMatcher braceMatcher)
        {
            backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.NearImmediate,
                                                                     async x => await InvalidateTags(x.Snapshot, x.CancellationToken));

            textView.Caret.PositionChanged += OnCaretPositionChanged;

            _textView     = textView;
            _braceMatcher = braceMatcher;
        }