private static boolean handleBetweenSquareBraces(Editor editor,
                                                   int caret,
                                                   DataContext context,
                                                   EditorActionHandler originalHandler) {
    String text = editor.getDocument().getText();
    if (text.isEmpty()) return false;
    final EditorHighlighter highlighter = editor.getHighlighter();
    if (caret < 1 || caret > text.length() - 1) {
      return false;
    }
    HighlighterIterator iterator = highlighter.createIterator(caret - 1);
    if (GroovyTokenTypes.mLBRACK == iterator.getTokenType()) {
      iterator = highlighter.createIterator(caret);
      if (GroovyTokenTypes.mRBRACK == iterator.getTokenType()) {
        originalHandler.execute(editor, editor.getCaretModel().getCurrentCaret(), context);
        originalHandler.execute(editor, editor.getCaretModel().getCurrentCaret(), context);
        editor.getCaretModel().moveCaretRelatively(0, -1, false, false, true);
        insertSpacesByGroovyContinuationIndent(editor);
        return true;
      }
    }
    return false;
  }
private static boolean handleBetweenSquareBraces(Editor editor,
                                                   int caret,
                                                   DataContext context,
                                                   EditorActionHandler originalHandler)