boolean (PsiElement psiElement, PsiFile file, @NotNull Editor editor, boolean modified) { GrCodeBlock block = getControlStatementBlock(editor.getCaretModel().getOffset(), psiElement); if (block != null) { PsiElement firstElement = block.getFirstChild().getNextSibling(); final int offset = firstElement != null ? firstElement.getTextRange().getStartOffset() - 1 : block.getTextRange().getEndOffset(); editor.getCaretModel().moveToOffset(offset); } plainEnter(editor); return true; }