public IEnumerable <ITagSpan <ReplGlyphTag> > /*!*/ GetTags(NormalizedSnapshotSpanCollection /*!*/ spans) { foreach (SnapshotSpan span in spans) { foreach (var prompt in _promptProvider.GetOverlappingPrompts(span)) { var tagSpan = new SnapshotSpan(prompt.Value, 0); switch (prompt.Key) { case ReplSpanKind.Prompt: yield return(new TagSpan <ReplGlyphTag>(tagSpan, ReplGlyphTag.MainPrompt)); break; case ReplSpanKind.SecondaryPrompt: yield return(new TagSpan <ReplGlyphTag>(tagSpan, ReplGlyphTag.SecondaryPrompt)); break; case ReplSpanKind.StandardInputPrompt: yield return(new TagSpan <ReplGlyphTag>(tagSpan, ReplGlyphTag.InputPrompt)); break; } } } }
private void RefreshGlyphsOver(ITextViewLine textViewLine) { foreach (var prompt in _promptProvider.GetOverlappingPrompts(textViewLine.Extent)) { SnapshotSpan span = new SnapshotSpan(prompt.Value, 0); ReplSpanKind kind = prompt.Key; if (textViewLine.End == prompt.Value || textViewLine.Extent.Contains(prompt.Value)) { _visualManager.AddGlyph(_promptProvider.GetPromptText(kind), span); } } }