szabototo89 / CodeSharper

Refactoring tool, written in C# and using TDD for developing
1 stars 0 forks source link

Get TextSpan from cursor position #4

Closed szabototo89 closed 10 years ago

szabototo89 commented 10 years ago

I have to implement a method which returns given TextSpan by cursor position:

var span = GetTextSpanFromPosition(column, line);
szabototo89 commented 10 years ago

It is implemented in TextInformationManager class:

var source = @"one,two,three";
var manager = CsvCompiler.CompileFromString(source).TextInformationManager;
var result = manager.GetNodesByTextLocation(new TextLocation(4, 1));