Community
Participate
Working Groups
Build ID: 3.3M7 Steps To Reproduce: 1. Create a Meta-Model having a container class containing nodes. A node has a bidirectional link with roles successor and predeccessor both of cardinality 0..1 2. Create respective GMF Mapping, Map container to canvas and node to node, the link to a link mapping 3. Generate diagram code 4. Run the diagram, create Node A, B, C. Connect A->B. Ensure predecessor and successor are set correctly. Now create a link C->B. Now predecessor of B is set to C instead of A. However, on the diagram now we have two links which is not in sync with the model. As far as I remember in some earlier version of GMF the second link was not createable Workaround exists: Create a target link creation constraint checking whether the target node also has an incomming edge More information: I'm using GMF 2.0M7 on Eclipse 3.3M7
Created attachment 70988 [details] domain model
Created attachment 70989 [details] gen model
Created attachment 70990 [details] sketch model
Created attachment 70991 [details] diagram gen model
I've attached models that allow to reproduce the problem. There are two possible solutions: you may wish to forbid link creation if this leads to existing link destruction (that's what you've done with ocl constraints) and automatic link destruction (canonical edit policy should handle this). I propose to do the following: if you want to forbid creation - add corresponding constraints, but GMF should destroy stale links anyway (and it does this actually but only when diagram is reopened). So I reassign this to Alexander Shatalin since he maintains canonical edit policies.
Canonical Synchronization issue was reported as a part of Bug #148275
Aligned milestone to match bug #148275
Moving to the next version.
[GMF Restructure] Bug 319140 : product GMF and component Generation was the original product and component for this bug