public GetLocation ( int offset ) : TextLocation | ||
offset | int | |
return | TextLocation |
private static void AddFold(TextDocument document, ICollection<NewFolding> foldMarkers, int startOffset, int endOffset, string label) { // Do not add folding if start and end are on the same line. int startLine = document.GetLocation(startOffset).Line; int endLine = document.GetLocation(endOffset).Line; if (startLine >= endLine) return; foldMarkers.Add(new NewFolding(startOffset, endOffset) { Name = label }); }
public D_Parser.Dom.CodeLocation ToLocation(int offset) { var dl = document.GetLocation(offset); return(new CodeLocation(dl.Column, dl.Line)); }