boolean (PsiElement element) { if (getCallChainRoot(element) == null) { return false; } final PsiElement parent = PsiUtil.skipParenthesizedExprUp(element.getParent()); return (parent instanceof PsiStatement || parent instanceof PsiVariable || parent instanceof PsiAssignmentExpression || parent instanceof PsiLambdaExpression) && (element instanceof PsiExpression && CodeBlockSurrounder.canSurround((PsiExpression)element)); }