private static @Nullable Point getPositionMultiLine(Editor editor) {
      int visualCaretLine = editor.offsetToVisualPosition(editor.getCaretModel().getOffset()).line;
      int lineY = editor.visualPositionToXY(new VisualPosition(visualCaretLine, 0)).y;

      int iconWidth = EmptyIcon.ICON_16.getIconWidth();
      int iconHeight = EmptyIcon.ICON_16.getIconHeight();
      int panelWidth = NORMAL_BORDER_SIZE + iconWidth + iconWidth + NORMAL_BORDER_SIZE;
      int panelHeight = NORMAL_BORDER_SIZE + iconHeight + NORMAL_BORDER_SIZE;

      Rectangle visibleArea = editor.getScrollingModel().getVisibleArea();
      if (lineY < visibleArea.y) return null;
      int lineHeight = editor.getLineHeight();
      if (lineY + panelHeight >= visibleArea.y + visibleArea.height) return null;

      int x = visibleArea.x;
      int anotherLineWithShift = IntentionsUIImpl.SHOW_INTENTION_BULB_ON_ANOTHER_LINE.get(editor.getProject(), 0);
      if (anotherLineWithShift != 0) {
        x += anotherLineWithShift;
      }
      int y;
      if (anotherLineWithShift == 0 && lineHeight >= iconHeight && fitsInCaretLine(editor, x + panelWidth)) {
        // Center the light bulb icon in the caret line.
        // The (usually invisible) border may be outside the caret line.
        y = lineY + (lineHeight - panelHeight) / 2;
      }
      else if (lineY - panelHeight >= visibleArea.y) {
        // Place the light bulb panel above the caret line.
        y = lineY - panelHeight;
      }
      else {
        // Place the light bulb panel below the caret line.
        y = lineY + lineHeight;
      }

      return SwingUtilities.convertPoint(editor.getContentComponent(), new Point(x, y), getLayeredPane(editor));
    }
private static @Nullable Point getPositionMultiLine(Editor editor)