Point (int offset, boolean leanForward, boolean beforeSoftWrap) { return ReadAction.compute(() -> { Point2D point2D = offsetToPoint2D(offset, leanForward, beforeSoftWrap); return new Point((int)point2D.getX(), (int)point2D.getY()); }); }