List<JavaLambdaTreeElement> (@NotNull TreeElement node) { if (!(node instanceof PsiTreeElementBase)) { return Collections.emptyList(); } PsiElement element = ((PsiTreeElementBase<?>)node).getElement(); return SyntaxTraverser.psiTraverser(element) .expand(o -> o == element || !(o instanceof PsiMember || o instanceof PsiLambdaExpression)) .filter(PsiLambdaExpression.class) .filter(o -> o != element) .map(o -> new JavaLambdaTreeElement(o)) .toList(); }