vitruv-tools / Vitruv

View-based Development and Model Consistency Framework
http://vitruv.tools
Eclipse Public License 1.0
14 stars 19 forks source link

Remove the TransactionalChangeDomain from the VSUM #402

Closed jGleitz closed 3 years ago

jGleitz commented 3 years ago

The VSUM resource set uses a TransactionalChangeDomain. This means that all modifications to the VSUM need to run through a command. This has a significant impact on the code base because it affects many code locations. Additionally, it leads to unexpected effects, because model modifications can technically occur always, as EMF offers no read-only model objects. For example, JaMoPP sends modification events for model objects that are still being loaded.

The only use of the TransactionalChangeDomain seems to be in ChangePropagatorImpl, where the changed objects are determined through the domain. This code should be changed to get the information from the changes that were recorded in the VSUM.

After this modification, all code related to TransactionalChangeDomain and VitruviusRecordingCommand can be removed, which should be a significant simplification. It would also close #382.

HeikoKlare commented 3 years ago

I want to emphasize that removing the TransactionalEditingDomain would be a huge improvement. It would reduce code complexity and is supposed to improve performance. But, even more importantly, it will ease debugging, as changes are not wrapped into commands executed by the domain but can be applied directly.

As soon as I have the time and there are no urgent bugs to fix, I will definitely try this out.