Community
Participate
Working Groups
Change DiagramModificationListener's to be adapters on the ResourceSet that attach to all its Resources, rather than ResourceSetListeners. The scenario that I'm running into is as follows: I have a diagram editor open with a view to a model element. Modifying the model element results in refactoring of the diagram. This happens with a CompositeTransactionalCommand where one of its children is performing the refactoring. Upon executing this command, when the refactoring is performed, the FileSynchronizer creates an async runnable that unloads the diagram resource. Once the command commits, the FileDiagramModificationListener receives notifications and computes the timestamp and sets the diagram document content. The FileDiagramModificationListener should have computed the timestamp and content before the FileSynchronizer did its thing. Then the diagram resource wouldn't have been unloaded unnecessarily. The problem I found is that because notifcations are only fired when the transaction commits, the FileSynchronizer does its thing before the DiagramModifcationListeners. By making the DiagramModificationListeners adapters, notifications will be processed immediately.
Created attachment 46301 [details] patch for FileDiagramModificationListener and DiagramModificationListener This patch changes the FileDiagramModificationListener and DiagramModificationListener to be adapters on the ResourceSet and its Resources.
Committed the fix to R1_0_maintenance. Please send a detailed delivery note to our team.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug