I’ve been implementing a java extension that performs a number of changes to a capella model. I used the approach that is described in the Sirius Developmer Manual. There, they suggest to implement a so called ‘RecordingCommand’ and execute that command on a TransactionalEditingDomain.
As far as I can tell, the command works. However, I would like to be able to show a user the impact of executing the command before going for it. Similar when the user tries to delete some model elements and Capella shows the impact of the deletion.
What would be the best way to achieve this? Preferably, I’d like ‘execute’ the command; perform a kind of an EMFCompare like operation comparing the new state of the model towards the state it had just before executing thh command; and then ask the user whether it is OK to continue or whether to ‘undo’ the command.