Set Group.ungroupable to true and then the CommandHandler.ungroupSelection command will be able to do what you want to a selected Group.
Set Group.ungroupable to true and then the CommandHandler.ungroupSelection command will be able to do what you want to a selected Group.