void (@Nullable UExpression body, UElement context) { if (body == null) return; List<PsiElement> anchors = new ArrayList<>(); for (UExpression expression : findReturnedExpressions(body, context)) { PsiClass panelClass = findReturnedClass(expression); if (panelClass == null || hasRedefinedContext(panelClass)) continue; ContainerUtil.addIfNotNull(anchors, expression.getSourcePsi()); } if (!anchors.isEmpty() && !hasAccessibilityMethodCalls(body)) { for (PsiElement anchor : anchors) { myHolder.registerProblem(anchor, DevKitBundle.message("inspection.message.accessible.context.not.defined.for.jpanel")); } } }