Example #1
0
        /// <summary>
        /// This method scans the given SnapshotSpan for potential matches for this classification.
        /// In this instance, it classifies everything and returns each span as a new ClassificationSpan.
        /// </summary>
        /// <param name="trackingSpan">The span currently being classified</param>
        /// <returns>A list of ClassificationSpans that represent spans identified to be of this classification</returns>
        public IList<ClassificationSpan> GetClassificationSpans(SnapshotSpan span)
        {
            span = span.GetEnclosingParagraph();

            List<ClassificationSpan> classifications = new List<ClassificationSpan>();

            foreach (var parser in _parsers)
            {
                parser.Parse(span, _classificationRegistry, classifications);
            }
            return classifications;
        }