* the offset we want info on
* @return a tuple with the line, col of the passed offset in the document
*/
public Pair<Integer, Integer> getLineAndCol(final int offset) {
try {
final IRegion region = doc.getLineInformationOfOffset(offset);
final int line = doc.getLineOfOffset(offset);
final int col = offset - region.getOffset();
return new Pair<Integer, Integer>(line, col);
} catch (final BadLocationException e) {
throw new RuntimeException(e);
}
}