@Override
  public @NotNull LogicalPosition offsetToLogicalPosition(final int offset) {
    assertValid();
    int lineNumber = myDocumentWindow.getLineNumber(offset);
    int lineStartOffset = myDocumentWindow.getLineStartOffset(lineNumber);
    int column = calcLogicalColumnNumber(offset - lineStartOffset, lineNumber, lineStartOffset);
    return new LogicalPosition(lineNumber, column);
  }
@Override
  public @NotNull LogicalPosition offsetToLogicalPosition(final int offset)