Exemple #1
0
        public IEnumerable <ITagSpan <IErrorTag> > GetTags(NormalizedSnapshotSpanCollection spans)
        {
            foreach (var span in spans)
            {
                StimErrorTag spanError = StimParser.ParseError(span);

                if (spanError != null)
                {
                    yield return(new TagSpan <IErrorTag>(span, spanError));
                }
            }
        }
Exemple #2
0
        public IList <ClassificationSpan> GetClassificationSpans(SnapshotSpan span)
        {
            classifications.Clear();

            if (span.Length == 0)
            {
                return(classifications);
            }

            ITextSnapshotLine line = span.Start.GetContainingLine();

            foreach (Tuple <StimParser.StimLineTypes, SnapshotSpan> segment in StimParser.Parse(line))
            {
                IClassificationType classificationType = mClassificationTypeRegistry.GetClassificationType(mClassifierTypeNames[segment.Item1]);
                classifications.Add(new ClassificationSpan(segment.Item2, classificationType));
            }

            return(classifications);
        }