@Nullable
    Point getSelectionPositionInEditor() {
      if (myPane != this) {
        return null;
      }
      CustomFoldRegion foldRegion = myItem.getFoldRegion();
      if (foldRegion == null || foldRegion.getRenderer() != DocRenderer.this) {
        return null;
      }
      Point rendererLocation = foldRegion.getLocation();
      if (rendererLocation == null) {
        return null;
      }
      Rectangle boundsWithinRenderer = getEditorPaneBoundsWithinRenderer(foldRegion.getWidthInPixels(), foldRegion.getHeightInPixels());
      Rectangle2D locationInPane;
      try {
        locationInPane = modelToView2D(getSelectionStart());
      }
      catch (BadLocationException e) {
        LOG.error(e);
        locationInPane = new Rectangle();
      }
      return new Point(rendererLocation.x + boundsWithinRenderer.x + (int)locationInPane.getX(),
                       rendererLocation.y + boundsWithinRenderer.y + (int)locationInPane.getY());
    }
@Nullable
    Point getSelectionPositionInEditor()