PsiIfStatement (@NotNull PsiIfStatement ifStatement, @NotNull PsiStatement branch, CommentTracker ct) { final PsiElement parent = ifStatement.getParent(); if (parent != null && !(parent instanceof PsiCodeBlock)) { branch = (PsiStatement)branch.copy(); ifStatement = (PsiIfStatement)wrapWithCodeBlock(ifStatement); } addAfter(ifStatement, branch, ct); return ifStatement; }