Get PsiMethod at given line number in a file?

已回答

How to get the PsiMethod at a given line number in a VirtualFile or PsiFile?

0

The line number is not precise enough - you can get an element at the specified offset with:

PsiUtilCore.getElementAtOffset(@NotNull PsiFile file, int offset)
0

请先登录再写评论。