The optional parameters for a Location seem to be duplicate information:
- Offset/Length define the starting character and end character of the selection
- Begin/end line/column seem to be used for the same thing
However, begin/end line/column don't seem to be working: the location at
|project://file.java|(0,100,<1,1>,<1,1>)
and the location at
|project://file.java|(0,100,<9,2>,<17,23>)
return both the same content (when shown using e.g. readFile() ).
This leads to two questions:
What is the use of the begin/end line/column if they aren't used for any practical reasons?
Is there a way to construct a location when only begin/end line/column are known, but not the offset/length? (without accessing the file)
I found a related question to this question (How to construct a location?), but the answer given there does not explain this.