String (final PsiFile file, final int offset) { if (offset < 0 || file instanceof JspFile) { return null; } if (file instanceof PsiClassOwner) { return ReadAction.compute(() -> { PsiMethod method = DebuggerUtilsEx.findPsiMethod(file, offset); return method != null ? method.getName() : null; }); } return null; }