Beispiel #1
0
 void TextView_Closed(object sender, EventArgs e)
 {
     currentBracePair                = null;
     bracePairCollection             = BracePairCollection.Empty;
     textView.Closed                -= TextView_Closed;
     textView.Options.OptionChanged -= Options_OptionChanged;
     textView.Caret.PositionChanged -= Caret_PositionChanged;
 }
Beispiel #2
0
 public BracePairService(ITextView textView)
 {
     if (textView == null)
     {
         throw new ArgumentNullException(nameof(textView));
     }
     this.textView                   = textView;
     this.bracePairCollection        = BracePairCollection.Empty;
     textView.Closed                += TextView_Closed;
     textView.Options.OptionChanged += Options_OptionChanged;
     UpdateBraceMatching();
 }
Beispiel #3
0
 public void SetBracePairCollection(BracePairCollection bracePairCollection)
 {
     this.bracePairCollection = bracePairCollection ?? BracePairCollection.Empty;
     RefreshAllTags();
 }