Show popup above inlay hints

Answered

I am showing inline inlay hint at caret position and block inlay hints below it. I have a popup and I am using showinbestpositionfor(editor) to show the popup. The popup is covering the inlay hints. I want the popup to show above the inline inlay hint. How to achive this?

0
1 comment

Hi,

I suggest trying the following solution:

RelativePoint bestPopupLocation = JBPopupFactory.getInstance().guessBestPopupLocation(editor);
Point point = bestPopupLocation.getScreenPoint();
point.y -= 30; // change the popup vertical position according to your needs
RelativePoint newPopupLocation = new RelativePoint(point);
popup.show(newPopupLocation);
0

Please sign in to leave a comment.