PsiElement (PsiElement place) { PsiElement parent = place.getUserData(ElementToWorkOn.PARENT); if (place.getUserData(ElementToWorkOn.OUT_OF_CODE_BLOCK) != null) return parent; if (parent == null) parent = place; while (true) { if (isExpressionAnchorElement(parent)) return parent; if (parent instanceof PsiExpression && parent.getParent() instanceof PsiLambdaExpression) return parent; parent = parent.getParent(); if (parent == null) return null; } }