diff --git a/Codist/Classifiers/CSharpClassifier.cs b/Codist/Classifiers/CSharpClassifier.cs index dd3969b9..8214fd15 100644 --- a/Codist/Classifiers/CSharpClassifier.cs +++ b/Codist/Classifiers/CSharpClassifier.cs @@ -16,20 +16,10 @@ namespace Codist.Classifiers { - /// - /// Classifier provider. It adds the classifier to the set of classifiers. - /// [Export(typeof(IClassifierProvider))] [ContentType(Constants.CodeTypes.CSharp)] sealed class CSharpClassifierProvider : IClassifierProvider { - /// - /// Gets a classifier for the given text buffer. - /// - /// The to classify. - /// - /// A classifier for the text buffer, or null if the provider cannot do so in its current state. - /// public IClassifier GetClassifier(ITextBuffer textBuffer) { return Config.Instance.Features.MatchFlags(Features.SyntaxHighlight) ? textBuffer.Properties.GetOrCreateSingletonProperty(() => new CSharpClassifier(ServicesHelper.Instance.ClassificationTypeRegistry, textBuffer)) @@ -45,9 +35,6 @@ sealed class CSharpClassifier : IClassifier readonly ITextBuffer _TextBuffer; - /// - /// Initializes a new instance of the class. - /// internal CSharpClassifier( IClassificationTypeRegistryService registry, ITextBuffer buffer) { @@ -60,28 +47,8 @@ internal CSharpClassifier( _TextBuffer = buffer; } - /// - /// An event that occurs when the classification of a span of text has changed. - /// - /// - /// This event gets raised if a non-text change would affect the classification in some way, - /// for example typing /* would cause the classification to change in C# without directly - /// affecting the span. - /// public event EventHandler ClassificationChanged; - /// - /// Gets all the objects that intersect with the given range - /// of text. - /// - /// - /// 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. - /// - /// The span currently being classified. - /// - /// A list of ClassificationSpans that represent spans identified to be of this classification. - /// public IList GetClassificationSpans(SnapshotSpan span) { var snapshot = span.Snapshot; var workspace = snapshot.TextBuffer.GetWorkspace(); @@ -200,7 +167,7 @@ public IList GetClassificationSpans(SnapshotSpan span) { return result; } - private static void GetAttributeNotationSpan(ITextSnapshot snapshot, List result, TextSpan textSpan, CompilationUnitSyntax unitCompilation) { + static void GetAttributeNotationSpan(ITextSnapshot snapshot, List result, TextSpan textSpan, CompilationUnitSyntax unitCompilation) { var spanNode = unitCompilation.FindNode(textSpan, true, false); if (spanNode.HasLeadingTrivia != false && spanNode.GetLeadingTrivia().FullSpan.Contains(textSpan) != false) { return; @@ -210,45 +177,6 @@ private static void GetAttributeNotationSpan(ITextSnapshot snapshot, List spans, ITextSnapshot textSnapshot, SyntaxList attributeList) { - if (attributeList.Count > 0) { - spans.Add(CreateClassificationSpan(textSnapshot, attributeList.Span, _Classifications.AttributeNotation)); - } } } @@ -375,7 +303,7 @@ static void ClassifyPunctuation(TextSpan itemSpan, ITextSnapshot snapshot, List< } } - private static void MarkClassificationTypeForBrace(TextSpan itemSpan, ITextSnapshot snapshot, List result, IClassificationType type, SpecialHighlightOptions options) { + static void MarkClassificationTypeForBrace(TextSpan itemSpan, ITextSnapshot snapshot, List result, IClassificationType type, SpecialHighlightOptions options) { if (Config.Instance.SpecialHighlightOptions.MatchFlags(SpecialHighlightOptions.SpecialPunctuation)) { result.Add(CreateClassificationSpan(snapshot, itemSpan, _GeneralClassifications.SpecialPunctuation)); }