Automatically create the corresponding undo commands, so that plugins and scripts which add/delete items will be added to the undo stack without any work required.