/// <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) { List<ClassificationSpan> classifications = new List<ClassificationSpan>(); /* * Comment Classifications */ if (span.IsComment()) classifications.Add(new ClassificationSpan(span, _commentClassificationType)); /* * Keyword Classifications */ if (span.IsCommand()) { string command = span.GetCommand(); classifications.Add(new ClassificationSpan(new SnapshotSpan(span.Start, command.Length), _keywordClassificationType)); } return classifications; }