Esempio n. 1
0
 public HighlightWordTagger(ITextView view, ITextBuffer sourceBuffer, ITextSearchService
                            textSearchService, ITextStructureNavigator textStructureNavigator)
 {
     this.View                   = view;
     this.fileFullPath           = GetFileFullPath(view);
     this.SourceBuffer           = sourceBuffer;
     this.TextSearchService      = textSearchService;
     this.TextStructureNavigator = textStructureNavigator;
     this.highlightedEntities    = Enumerable.Empty <HighlightedEntity>();
     this.highlightedSpans       = new NormalizedSnapshotSpanCollection();
     HighlightedEntitySet.GetInstance().entityChanged += OnHighlightedEntityChanged;
     this.View.Caret.PositionChanged += CaretPositionChanged;
     this.View.LayoutChanged         += ViewLayoutChanged;
 }
Esempio n. 2
0
 public static HighlightedEntitySet GetInstance()
 {
     return(instance ?? (instance = new HighlightedEntitySet()));
 }