private void removeChildrenBlock(RenderableBlock renderable, WorkspaceWidget widget, Container container) {
        widget.removeBlock(renderable);
        container.remove(renderable);
        container.validate();
        container.repaint();
        renderable.setParentWidget(null);
        //Workspace.getInstance().notifyListeners(new WorkspaceEvent(widget, renderable.getBlockID(), WorkspaceEvent.BLOCK_REMOVED));
        for (BlockConnector child : workspace.getEnv().getBlock(renderable.getBlockID()).getSockets()) {
            if (child == null || child.getBlockID().equals(Block.NULL)) {
                continue;
            }
            RenderableBlock childRenderable = workspace.getEnv().getRenderableBlock(child.getBlockID());
            if (childRenderable == null) {
                continue;
            }
            removeBlock(childRenderable, widget, container);
        }
        // If it is a procedure block, we want to delete the entire stack
        if (workspace.getEnv().getBlock(renderable.getBlockID()).isProcedureDeclBlock()) {
            if (workspace.getEnv().getBlock(renderable.getBlockID()).getAfterBlockID() != Block.NULL) {
                removeAfterBlock(workspace.getEnv().getRenderableBlock(workspace.getEnv().getBlock(renderable.getBlockID()).getAfterBlockID()),
                        widget, container);
                this.disconnectBlock(workspace.getEnv().getBlock(workspace.getEnv().getBlock(renderable.getBlockID()).getAfterBlockID()), widget);
            }
        }
        if (renderable.hasComment()) {
            renderable.removeComment();
        }
        workspace.notifyListeners(new WorkspaceEvent(workspace, widget, renderable.getBlockID(), WorkspaceEvent.BLOCK_REMOVED));
    }