A set of editor APIs for programmed operations can combine the programmed processing logic you want with the editorutility.