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