PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new PsiElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { UCallExpression callExpression = AnalysisUastUtil.getUCallExpression(element); if (callExpression != null) { handleCallExpression(callExpression, holder); return; } if (!(element instanceof PsiIdentifier)) return; PsiElement parent = element.getParent(); UElement parentUElement = UastContextKt.toUElement(parent); if (parentUElement instanceof UCallableReferenceExpression) { handleCallableReferenceExpression((UCallableReferenceExpression)parentUElement, element, holder); } } }; }