Position of PsiElement in editor

After searching through the code and forum messages I did not find and answer yet to my problem.

Is it possible to find the position (x, y) of a PsiElement in the editor?

0

For any offset you can use editor.visualPositionToPoint2D(editor.offsetToVisualPosition(offset)). editor.visualPositionToXY can also be used, if integer precision is enough.

0

Thanks! This worked.

0

请先登录再写评论。