@RequiresEdt
  public int getPreferredWidth(int beginLine, int endLine) {
    assert !myEditor.isPurePaintingMode();
    return ReadAction.compute(() -> {
      myEditor.getSoftWrapModel().prepareToMapping();
      return mySizeManager.getPreferredWidth(beginLine, endLine);
    });
  }
@RequiresEdt
  public int getPreferredWidth(int beginLine, int endLine)