void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiElement anchorStatement = CommonJavaRefactoringUtil.getParentStatement(element, false); LOG.assertTrue(anchorStatement != null); if (anchorStatement.getParent() instanceof PsiLambdaExpression) { final PsiCodeBlock body = CommonJavaRefactoringUtil.expandExpressionLambdaToCodeBlock((PsiLambdaExpression)anchorStatement.getParent()); anchorStatement = body.getStatements()[0]; } PsiElement[] elements = {anchorStatement}; PsiElement prev = PsiTreeUtil.skipWhitespacesBackward(anchorStatement); if (prev instanceof PsiComment && JavaSuppressionUtil.getSuppressedInspectionIdsIn(prev) != null) { elements = new PsiElement[] {prev, anchorStatement}; } final PsiIfStatement ifStatement = new JavaWithIfSurrounder() .surroundStatements(project, anchorStatement.getParent(), elements, myText + mySuffix); new MergeIfAndIntention().processIntention(ifStatement.getFirstChild()); }