Set<PsiClass> (final PsiFile file, int lineNumber) { Document document = file.getViewProvider().getDocument(); Set<PsiClass> res = new HashSet<>(); if (document != null) { XDebuggerUtil.getInstance().iterateLine(file.getProject(), document, lineNumber, element -> { PsiClass aClass = ClassUtils.getContainingClass(element); if (aClass != null) { res.add(aClass); } return true; }); } return res; }