Esempio n. 1
0
 private IClassification ClassificationFor(PartitionToken partition)
 {
     switch (partition.Type)
     {
         case PartitionTokenType.CommentBegin:
         case PartitionTokenType.CommentContents:
         case PartitionTokenType.CommentEnd:
         case PartitionTokenType.CommentLineBegin:
         case PartitionTokenType.CommentLineContents:
         case PartitionTokenType.CommentLineEnd:
             return _standardClassificationRegistry.Comment;
         case PartitionTokenType.StringBegin:
         case PartitionTokenType.StringContents:
         case PartitionTokenType.StringEnd:
         case PartitionTokenType.StringSingleBegin:
         case PartitionTokenType.StringSingleContents:
         case PartitionTokenType.StringSingleEnd:
             return _standardClassificationRegistry.String;
     }
     throw new ArgumentOutOfRangeException();
 }
Esempio n. 2
0
        private IClassification ClassificationFor(PartitionToken partition)
        {
            switch (partition.Type)
            {
            case PartitionTokenType.CommentBegin:
            case PartitionTokenType.CommentContents:
            case PartitionTokenType.CommentEnd:
            case PartitionTokenType.CommentLineBegin:
            case PartitionTokenType.CommentLineContents:
            case PartitionTokenType.CommentLineEnd:
                return(_standardClassificationRegistry.Comment);

            case PartitionTokenType.StringBegin:
            case PartitionTokenType.StringContents:
            case PartitionTokenType.StringEnd:
            case PartitionTokenType.StringSingleBegin:
            case PartitionTokenType.StringSingleContents:
            case PartitionTokenType.StringSingleEnd:
                return(_standardClassificationRegistry.String);
            }
            throw new ArgumentOutOfRangeException();
        }
Esempio n. 3
0
 private static TextSpan TextSpanForPartitionOfLine(ITextSnapshotLine line, PartitionToken partitionToken)
 {
     return(new TextSpan(line.Snapshot, new Span(line.Start + partitionToken.Begin, partitionToken.Length)));
 }
Esempio n. 4
0
 private static TextSpan TextSpanForPartitionOfLine(ITextSnapshotLine line, PartitionToken partitionToken)
 {
     return new TextSpan(line.Snapshot, new Span(line.Start + partitionToken.Begin, partitionToken.Length));
 }