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

Bug 496466

Summary: Extend copy/paste layout feature with style notions
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Julien Dupont <julien.dupont>
Severity: enhancement    
Priority: P3 CC: julien.dupont
Version: unspecifiedKeywords: triaged
Target Milestone: 4.1.0   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/75693
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=818037cab466c47e60983061d80246a224d862c0
https://git.eclipse.org/r/76143
https://git.eclipse.org/r/76352
https://git.eclipse.org/r/76882
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0019649cfd90381e34c632ddb8ced43eb0d69b4b
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=cbdf959ee962aecbe4f56c6142a37705c2af0522
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=82b5631fe94e15694077427ccfd9c7c87ed93ae8
https://git.eclipse.org/r/77953
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=47ed3d8bc8438d1ed6ed77743365d6e5a53f06f2
https://git.eclipse.org/r/78111
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3fa6183955b05795c44c68e3d910b1c0eb503081
https://git.eclipse.org/r/78304
https://git.eclipse.org/r/78303
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=540530d6871584df10a20fbd7bc6703c308ad32f
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d9849da9fee8f7b9e8bebd7b1af2b22babb1a92a
https://git.eclipse.org/r/78526
https://git.eclipse.org/r/78525
https://git.eclipse.org/r/78528
https://git.eclipse.org/r/78527
https://git.eclipse.org/r/78529
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b27d327d38932982a89d9215930421e403c97e5d
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=274602e164f3006eb8924fadc4879a8e9a62d3ac
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=71de945f776e3955896a63d3f9b7a5150d9bbb26
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=dda4e01094ef362a91635282b4dd4f24bd350c69
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=eb1b1b6bfb44e5e4d2d68ad557ef8b99556fd86b
https://git.eclipse.org/r/78840
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8646070af5e9215f0d6b0c2ecb23d6975238d7d3
https://git.eclipse.org/r/78882
https://git.eclipse.org/r/78881
https://git.eclipse.org/r/78880
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=510c13da259ad854c8ac55726e1f9607167e43f6
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=673b4de0eeb06cc87c15295bd741a0f465dc4a61
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1dcd33112221bba76fdc3f9a3657deb1dd00d5a6
https://git.eclipse.org/r/79117
https://git.eclipse.org/r/79118
https://git.eclipse.org/r/79119
https://git.eclipse.org/r/79125
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=bb1419b293e5524290245918cb12eadc72dc2b93
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9ce7f9baa03bbc27654e53be79e9ed1a7938b105
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0ad066a071687f40b3757ba6b148a8498908fb16
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2e389961ec140cbad351b972a9cd6ea3b62b0c53
https://git.eclipse.org/r/79424
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1ed66fe6dbfe032dbaf82af97cd6164a1bf1dd68
https://git.eclipse.org/r/79704
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c6af24d0a376e87a3b02bead47b3772bfc871bf6
Whiteboard:
Attachments:
Description Flags
CopyPasteFormat project for steps to reproduce of comment 32 none

Description Laurent Redor CLA 2016-06-21 09:39:10 EDT
A feature request has been created about adding a notion of copy+paste special in Sirius (bug 491895). A first step, a simpler step, would be to extend the copy/paste layout feature with style notions (like font format, colors, ... and all attributes concerning the style of the nodes and edges).

The idea of this feature would be to have:
* as currently, a Copy Layout action, that would probably renamed, a copy the style attributes in addition to layout attributes
* and then a Paste action that would present 3 choices:
** Paste Layout And Style
** Paste Layout Only
** Paste Style Only
Comment 1 Eclipse Genie CLA 2016-06-22 05:18:16 EDT
New Gerrit change created: https://git.eclipse.org/r/75693
Comment 4 Eclipse Genie CLA 2016-06-28 11:49:48 EDT
New Gerrit change created: https://git.eclipse.org/r/76143
Comment 5 Eclipse Genie CLA 2016-06-30 11:09:09 EDT
New Gerrit change created: https://git.eclipse.org/r/76352
Comment 6 Eclipse Genie CLA 2016-07-07 12:21:22 EDT
New Gerrit change created: https://git.eclipse.org/r/76882
Comment 10 Eclipse Genie CLA 2016-07-27 04:57:56 EDT
New Gerrit change created: https://git.eclipse.org/r/77953
Comment 12 Eclipse Genie CLA 2016-07-29 03:07:55 EDT
New Gerrit change created: https://git.eclipse.org/r/78111
Comment 14 Eclipse Genie CLA 2016-08-02 06:12:05 EDT
New Gerrit change created: https://git.eclipse.org/r/78304
Comment 15 Eclipse Genie CLA 2016-08-02 06:12:07 EDT
New Gerrit change created: https://git.eclipse.org/r/78303
Comment 18 Eclipse Genie CLA 2016-08-05 06:01:37 EDT
New Gerrit change created: https://git.eclipse.org/r/78526
Comment 19 Eclipse Genie CLA 2016-08-05 06:01:39 EDT
New Gerrit change created: https://git.eclipse.org/r/78525
Comment 20 Eclipse Genie CLA 2016-08-05 06:01:41 EDT
New Gerrit change created: https://git.eclipse.org/r/78528
Comment 21 Eclipse Genie CLA 2016-08-05 06:01:42 EDT
New Gerrit change created: https://git.eclipse.org/r/78527
Comment 22 Eclipse Genie CLA 2016-08-05 06:01:54 EDT
New Gerrit change created: https://git.eclipse.org/r/78529
Comment 32 Laurent Redor CLA 2016-08-11 05:35:39 EDT
If the source style is not the same as the target style, there are problems with some style attributes (for example backgroundColor of Dot and color of Square).

The concerned attribute is not considered as "custom features" and the next refresh resets this attribute.

Steps to reproduce:
* Import CopyPasteFormat project
* Open diagrams "diagramWithBlueDot" and "repDiamondAdaptedForCopyPasteFormatTest"
* In "repDiamondAdaptedForCopyPasteFormatTest" select LC1 and LC2
* Launch the Copy Format action
* In "diagramWithBlueDot", select the diagram
* Launch the Paste Format action
* Launch a manual refresh-->KO, the background colors are not kept.
Comment 33 Laurent Redor CLA 2016-08-11 05:41:01 EDT
The above problem exists on color attributes and with width/height attributes sometimes named horizontalDiameter/verticalDiameter.
The width/height is less problematic as it can not be really customized (except with Style tab of properties view but without effect).

In the above scenario, after the refresh, the figure is changed ("diamond" is reset to a "dot"). But it is normal as the refresh considers the original mapping which uses a DotStyle.
Comment 34 Laurent Redor CLA 2016-08-11 05:41:43 EDT
Created attachment 263554 [details]
CopyPasteFormat project for steps to reproduce of comment 32
Comment 35 Eclipse Genie CLA 2016-08-11 05:45:03 EDT
New Gerrit change created: https://git.eclipse.org/r/78840
Comment 37 Eclipse Genie CLA 2016-08-11 12:02:24 EDT
New Gerrit change created: https://git.eclipse.org/r/78882
Comment 38 Eclipse Genie CLA 2016-08-11 12:02:26 EDT
New Gerrit change created: https://git.eclipse.org/r/78881
Comment 39 Eclipse Genie CLA 2016-08-11 12:02:27 EDT
New Gerrit change created: https://git.eclipse.org/r/78880
Comment 43 Eclipse Genie CLA 2016-08-16 08:50:42 EDT
New Gerrit change created: https://git.eclipse.org/r/79117
Comment 44 Eclipse Genie CLA 2016-08-16 08:50:56 EDT
New Gerrit change created: https://git.eclipse.org/r/79118
Comment 45 Eclipse Genie CLA 2016-08-16 08:50:57 EDT
New Gerrit change created: https://git.eclipse.org/r/79119
Comment 46 Eclipse Genie CLA 2016-08-16 09:33:41 EDT
New Gerrit change created: https://git.eclipse.org/r/79125
Comment 51 Eclipse Genie CLA 2016-08-22 06:19:00 EDT
New Gerrit change created: https://git.eclipse.org/r/79424
Comment 53 Eclipse Genie CLA 2016-08-25 04:54:51 EDT
New Gerrit change created: https://git.eclipse.org/r/79704
Comment 55 Pierre-Charles David CLA 2016-10-18 11:07:26 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.