public CompletionSource(ElementCatalog catalog, ITextStructureNavigatorSelectorService structureNavigatorSelector, ITextView textView) { Catalog = catalog; StructureNavigatorSelector = structureNavigatorSelector; SLangTokenTagger generalTagger = new SLangTokenTaggerProvider().CreateTagger <SLangTokenTag>(textView.TextBuffer) as SLangTokenTagger; _lastTags = generalTagger._lastTags; }
public HighlightTagger(ITextView textView, ITextBuffer textBuffer) { _textView = textView; _textBuffer = textBuffer; SLangTokenTagger generalTagger = new SLangTokenTaggerProvider().CreateTagger <SLangTokenTag>(_textBuffer) as SLangTokenTagger; _lastTags = generalTagger._lastTags; // initialize empty highlights list _lastHighlights = new List <ITagSpan <TextMarkerTag> >(); // add events for tracking view changes _textView.Caret.PositionChanged += CaretPositionChanged; _textView.LayoutChanged += ViewLayoutChanged; // make initial update UpdateAtCaretPosition(textView.Caret.Position); }
public OutliningTagger(ITextBuffer buffer, ITextEditorFactoryService textEditorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IProjectionBufferFactoryService projectionBufferFactoryService, ITagAggregator <SLangTokenTag> SLangTagAggregator, IContentTypeRegistryService contentTypeRegistryService) { _buffer = buffer; _snapshot = buffer.CurrentSnapshot; _textEditorFactoryService = textEditorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _projectionBufferFactoryService = projectionBufferFactoryService; _contentTypeRegistryService = contentTypeRegistryService; _aggregator = SLangTagAggregator; SLangTokenTagger generalTagger = new SLangTokenTaggerProvider().CreateTagger <SLangTokenTag>(_buffer) as SLangTokenTagger; _outlineTokens = generalTagger._lastTags; _regions = new List <Region>(); CreateOutlineRegions(); _buffer.Changed += BufferChanged; }