예제 #1
0
        public static DkmSourcePosition GetSourcePosition(DkmInstructionSymbol instruction, DkmSourcePositionFlags flags, DkmInspectionSession inspectionSession, out bool startOfLine)
        {
            var insSym = instruction as DkmCustomInstructionSymbol;
            var loc    = new SourceLocation(insSym.AdditionalData);

            startOfLine = true;
            return(DkmSourcePosition.Create(DkmSourceFileId.Create(loc.FileName, null, null, null), new DkmTextSpan(loc.LineNumber, loc.LineNumber, 0, 0)));
        }
예제 #2
0
        public static DkmInstructionSymbol[] FindSymbols(DkmResolvedDocument resolvedDocument, DkmTextSpan textSpan, string text, out DkmSourcePosition[] symbolLocation)
        {
            var sourceFileId = DkmSourceFileId.Create(resolvedDocument.DocumentName, null, null, null);
            var resultSpan   = new DkmTextSpan(textSpan.StartLine, textSpan.StartLine, 0, 0);

            symbolLocation = new[] { DkmSourcePosition.Create(sourceFileId, resultSpan) };

            var location        = new SourceLocation(resolvedDocument.DocumentName, textSpan.StartLine);
            var encodedLocation = location.Encode();

            return(new[] { DkmCustomInstructionSymbol.Create(resolvedDocument.Module, Guids.PythonRuntimeTypeGuid, encodedLocation, 0, encodedLocation) });
        }
예제 #3
0
        public static DkmInstructionSymbol[] FindSymbols(DkmResolvedDocument resolvedDocument, DkmTextSpan textSpan, string text, out DkmSourcePosition[] symbolLocation) {
            var sourceFileId = DkmSourceFileId.Create(resolvedDocument.DocumentName, null, null, null);
            var resultSpan = new DkmTextSpan(textSpan.StartLine, textSpan.StartLine, 0, 0);
            symbolLocation = new[] { DkmSourcePosition.Create(sourceFileId, resultSpan) };

            var location = new SourceLocation(resolvedDocument.DocumentName, textSpan.StartLine);
            var encodedLocation = location.Encode();
            return new[] { DkmCustomInstructionSymbol.Create(resolvedDocument.Module, Guids.PythonRuntimeTypeGuid, encodedLocation, 0, encodedLocation) };
        }