boolean (final int newChildIndex) { final List<Block> subBlocks = getSubBlocks(); for (int i = 0; i < newChildIndex; i++) { if (i >= subBlocks.size()) return false; final Block block = subBlocks.get(i); if (block instanceof LeafBlock) { if (((LeafBlock)block).getTreeNode().getElementType() == JavaTokenType.RPARENTH) return false; } } return true; }