@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode) throws IncorrectOperationException {
    if (!(BasicJavaAstTreeUtil.is(astNode, BASIC_NEW_EXPRESSION))) return;
    int count = 0;
    for (ASTNode element = astNode.getFirstChildNode(); element != null; element = element.getTreeNext()) {
      if (BasicJavaAstTreeUtil.is(element, JavaTokenType.LBRACKET)) {
        count++;
      }
      else if (BasicJavaAstTreeUtil.is(element, JavaTokenType.RBRACKET)) {
        count--;
      }
    }
    if (count > 0) {
      editor.getDocument().insertString(astNode.getTextRange().getEndOffset(), "]");
    }
  }
@Override
  public void apply(Editor editor, AbstractBasicJavaSmartEnterProcessor processor, @NotNull ASTNode astNode)