@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode) throws IncorrectOperationException {
    ASTNode body = null;
    if (BasicJavaAstTreeUtil.is(astNode, BASIC_LAMBDA_EXPRESSION)) {
      final ASTNode lastChild = astNode.getLastChildNode();
      if (BasicJavaAstTreeUtil.is(lastChild, EXPRESSION_SET) ||
          BasicJavaAstTreeUtil.is(lastChild, BASIC_CODE_BLOCK)) {
        body = lastChild;
      }
    }
    else if (BasicJavaAstTreeUtil.is(astNode, BASIC_SWITCH_LABELED_RULE)) {
      body = BasicJavaAstTreeUtil.getRuleBody(astNode);
    }
    else {
      return;
    }
    if (body != null) return;
    PsiElement psiElement = BasicJavaAstTreeUtil.toPsi(astNode);
    if (psiElement == null) {
      return;
    }
    PsiElement arrow = PsiTreeUtil.getDeepestVisibleLast(psiElement);
    if (arrow == null || !arrow.getNode().getElementType().equals(JavaTokenType.ARROW)) return;
    int offset = arrow.getTextRange().getEndOffset();
    processor.insertBracesWithNewLine(editor, offset);
    editor.getCaretModel().moveToOffset(offset + 1);
    processor.commit(editor);
    processor.reformat(editor, psiElement);
    processor.setSkipEnter(BasicJavaAstTreeUtil.is(astNode, BASIC_LAMBDA_EXPRESSION));
  }
@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode)