Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 570524

Summary: Issues in copy format to existing/new diagram based on source to target semantic elements mapping (border nodes, different sessions)
Product: [Modeling] Sirius Reporter: Florian Barbin <florian.barbin>
Component: DiagramAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glenn.plouhinec, laurent.redor, pierre-charles.david
Version: 6.4.1   
Target Milestone: 6.4.2   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=563117
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/175113
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/175902
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/175953
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/176151
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2a017de7cc51df1d29c7d0eec825803b9ad4c60b
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0d0c6026b41d1318d5c8a7646c1659b201e70708
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/176388
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/176463
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=faf6955f115283932d2d3803b6cbc8d403853faa
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=683712c03917f7206ba342a2b0cccc2b95606ffc
Whiteboard:
Attachments:
Description Flags
SourceAndTargetProjects.zip none

Description Florian Barbin CLA 2021-01-20 12:37:04 EST
In the new copy/paste format API (see bug 563117) unsynchronized border nodes are not created if we chose to create the new diagram from the source one.

There is no end user reproduction case, the existing automatic test will be updated to cover this case.
Comment 1 Eclipse Genie CLA 2021-01-20 12:39:16 EST
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/175113
Comment 2 Eclipse Genie CLA 2021-02-05 11:47:19 EST
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/175902
Comment 3 Eclipse Genie CLA 2021-02-08 03:36:24 EST
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/175953
Comment 4 Eclipse Genie CLA 2021-02-11 16:14:56 EST
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/176151
Comment 5 Laurent Redor CLA 2021-02-12 04:07:11 EST
Steps to validate (only in developement env or at least with source of org.eclipse.ui and org.eclipse.diagram.ui in your workspace):
* Apply the patch of bugzilla [563117](https://bugs.eclipse.org/bugs/show_bug.cgi?id=563117)
* Launch a runtime
* Import projects from SourceAndTargetProjects.zip
* Expand /SourceOfCopy/My.ecore
* Create a new diagram "DiagType8 of MyPackage"
* Move and resize the first 3 containers and move their border nodes
* Save the session
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Launch the action "Paste Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Expected: A new diagram named "newDiag" is created under MyPackage. Open it. The layout is the same than "DiagType8 of MyPackage". This behavior was OK before the fix. It is only to ensure that "patch to test API" is OK.
* Delete "newDiag"
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Expand /TargetOfCopy/My.ecore
* Launch the action "Paste Rep" on MyPackage of TargetOfCopy project (action from contextual menu)
* Expected: A new diagram named "newDiag" is created under MyPackage of TargetOfCopy project. Open it. The layout is the same than "DiagType8 of MyPackage". This behavior was KO before the fix (message in error log about source diagram description that doesn't match with target diagram description).
* Delete "newDiag"
* Create a new diagram "DiagType8 of MyPackagee" under MyPackage of TargetOfCopy project
* Move and resize the first 3 containers and move their border nodes
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Launch the action "Paste Rep" on MyPackage of TargetOfCopy project (action from contextual menu)
* Expected: The diagram under MyPackage of TargetOfCopy project has the same layout than the diagram under MyPackage of SourceOfCopy project. This behavior was KO before the fix (message in error log about source diagram description that doesn't match with target diagram description).
* Delete both diagrams "DiagType8 of MyPackage"
* Create a new diagram "DiagType8_unsync of MyPackage" under MyPackage of SourceOfCopy project
* Add p1 with tool "Select packages to add"
* Add C1-1 and C1-2 with tool "selectSubClass"
* Save the session
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Launch the action "Paste Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Expected: A new diagram named "newDiag" is created under MyPackage of SourceOfCopy project. Open it. The layout is the same than "DiagType8_unsync of MyPackage". This behavior was KO before the fix. The border nodes was transformed into nodes.
* Delete "newDiag"
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Expand /TargetOfCopy/My.ecore
* Launch the action "Paste Rep" on MyPackage of TargetOfCopy project (action from contextual menu)
* Expected: A new diagram named "newDiag" is created under MyPackage of TargetOfCopy project. Open it. The layout is the same than "DiagType8_unsync of MyPackage". This behavior was KO before the fix (message in error log about source diagram description that doesn't match with target diagram description).
* Delete "newDiag"
* Create a new diagram "DiagType8_unsync of MyPackage" under MyPackage of TargetOfCopy project
* Add p1 with tool "Select packages to add"
* Add C1-1 to "Container without children p1" with tool "selectSubClass"
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Launch the action "Paste Rep" on MyPackage of TargetOfCopy project (action from contextual menu)
* Expected: The diagram under MyPackage of TargetOfCopy project has the same layout than the diagram under MyPackage of SourceOfCopy project. This behavior was KO before the fix (message in error log about source diagram description that doesn't match with target diagram description).
* Delete both diagrams named "DiagType8_unsync of MyPackage"
* Create a new diagram "DiagType8_unsyncBN of MyPackage" under MyPackage of SourceOfCopy project
* Add C1-1 and C1-2 to "Container without children p1" with tool "selectSubClass"
* Add C1-1-2 to "Container without children p1-1" with tool "selectSubClass"
* Move and resize the first 3 containers and move their border nodes
* Save the session
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Launch the action "Paste Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Expected: A new diagram named "newDiag" is created under MyPackage of SourceOfCopy project. Open it. The layout is the same than "DiagType8_unsyncBN of MyPackage". This behavior was KO before the fix. The border nodes was transformed into nodes and a "SWTException: Widget is disposed" is displayed into the ErrorLog view.
* Delete "newDiag"
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Expand /TargetOfCopy/My.ecore
* Launch the action "Paste Rep" on MyPackage of TargetOfCopy project (action from contextual menu)
* Expected: A new diagram named "newDiag" is created under MyPackage of TargetOfCopy project. Open it. The layout is the same than "DiagType8_unsyncBN of MyPackage". This behavior was KO before the fix (message in error log about source diagram description that doesn't match with target diagram description).
* Delete "newDiag"
* Create a new diagram "DiagType8_unsyncBN of MyPackage" under MyPackage of TargetOfCopy project
* Add C1-1 to "Container without children p1" with tool "selectSubClass"
* Add C1-1-2 to "Container without children p1-1" with tool "selectSubClass"
* Move and resize the first 3 containers and move their border nodes
* Launch the action "Copy Rep" on MyPackage of SourceOfCopy project (action from contextual menu)
* Launch the action "Paste Rep" on MyPackage of TargetOfCopy project (action from contextual menu)
* Expected: The diagram under MyPackage of TargetOfCopy project has the same layout than the diagram under MyPackage of SourceOfCopy project. The border node C1-2 is also created as it is in the map filled by the "specific Copy/Paste Rep actions". This behavior was KO before the fix (message in error log about source diagram description that doesn't match with target diagram description).
* Delete both diagrams named "DiagType8_unsyncBN of MyPackage"
Comment 6 Laurent Redor CLA 2021-02-12 04:07:28 EST
Created attachment 285533 [details]
SourceAndTargetProjects.zip
Comment 9 Laurent Redor CLA 2021-02-12 04:38:43 EST
In this issue, another problem has been fixed concerning the copy/paste between a copy from a diagram from a session to a paste in a diagram of another session.
Comment 10 Eclipse Genie CLA 2021-02-17 06:21:27 EST
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/176388
Comment 11 Eclipse Genie CLA 2021-02-18 09:18:37 EST
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/176463
Comment 14 Glenn Plouhinec CLA 2021-03-05 06:35:42 EST
Validated with Sirius 6.4.2.
Comment 15 Pierre-Charles David CLA 2021-03-18 04:44:41 EDT
Available in Sirius 6.4.2: http://download.eclipse.org/sirius/updates/releases/6.4.2