PsiElement (@NotNull PsiElement element) { element = element.getParent(); while (element != null && !(element instanceof PsiLambdaExpression) && !(element instanceof PsiAnonymousClass)) { element = element.getParent(); } return getLatestElementInCurrentScope(element); }