private ErrorStatusTracker( IWpfTextView textView, ErrorStatusTextViewCreationListener factory) { this.textView = textView; this.factory = factory; this.errorTagAggregator = factory.TagAggregatorFactoryService.CreateTagAggregator <IErrorTag>(textView.TextBuffer); this.errorTagAggregator.BatchedTagsChanged += this.OnBatchedTagsChanged; textView.Closed += OnTextViewClosed; textView.Caret.PositionChanged += this.OnCaretPositionChanged; //textView.VisualElement.GotKeyboardFocus += this.OnGotKeyboardFocus; }
public static void Attach(IWpfTextView textView, ErrorStatusTextViewCreationListener factory) => new ErrorStatusTracker(textView, factory);