@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode) throws IncorrectOperationException {
    if (!(BasicJavaAstTreeUtil.is(astNode, BASIC_CATCH_SECTION))) return;

    ASTNode body = BasicJavaAstTreeUtil.getCatchBlock(astNode);
    if (body != null && BasicJavaAstTreeUtil.getLBrace(body) != null && BasicJavaAstTreeUtil.getRBrace(body) != null) return;

    final ASTNode rParenth = BasicJavaAstTreeUtil.getRParenth(astNode);
    if (rParenth == null) return;

    processor.insertBraces(editor, rParenth.getTextRange().getEndOffset());
  }
@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode)