예제 #1
0
        private TagSpan <T> CreateTag()
        {
            var sourceLocation = CheckLocationIsInFile(DebuggingService.NextStatementLocation)
                                 ?? CheckLocationIsInFile(DebuggingService.CurrentFrame?.SourceLocation)
                                 ?? CheckLocationIsInFile(DebuggingService.GetCurrentVisibleFrame()?.SourceLocation);

            if (sourceLocation == null)
            {
                return(null);
            }
            var span           = snapshotAtStartOfDebugging.SpanFromMDColumnAndLine(sourceLocation.Line, sourceLocation.Column, sourceLocation.EndLine, sourceLocation.EndColumn);
            var translatedSpan = span.TranslateTo(textBuffer.CurrentSnapshot, SpanTrackingMode.EdgeExclusive);

            return(new TagSpan <T> (translatedSpan, tag));
        }