Bug 525933 - Cannot find a way to create a transient layer on Sirius 5.1.0
Summary: Cannot find a way to create a transient layer on Sirius 5.1.0
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 5.1.0   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: 5.1.0   Edit
Assignee: Laurent Redor CLA
QA Contact: Maxime Porhel CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-10-12 09:00 EDT by Lionel Odolant CLA
Modified: 2017-12-11 08:00 EST (History)
4 users (show)

See Also:


Attachments
Contain two eclipse plugins, one (transiant design) contains a diagram and two extensions while the other (test) is a runtime project which enable those functionalities (11.04 KB, application/zip)
2017-10-12 09:00 EDT, Lionel Odolant CLA
no flags Details
testTransientLayer.zip (2.70 KB, application/x-zip-compressed)
2017-10-25 05:48 EDT, Laurent Redor CLA
no flags Details
testTransientLayer.zip (3.26 KB, application/x-zip-compressed)
2017-10-26 10:03 EDT, Laurent Redor CLA
no flags Details
testTransientLayerWithAllLayersEnabled.zip (3.28 KB, application/x-zip-compressed)
2017-10-26 10:04 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Odolant CLA 2017-10-12 09:00:15 EDT
Created attachment 270955 [details]
Contain two eclipse plugins, one (transiant design) contains a diagram and two extensions while the other (test) is a runtime project which enable those functionalities

Sirius 5.0.0 introduces the Transient layer functionalities [1]
From what I understand, transient capabilities should be enabled when it is active by default.

I tried two use cases: 
1) One with an optional layer active by default
2) One with an always active layer (which I expected to be active by default)

The first use case allows us to activate a transient layer, but does not enable our tooling.
The second use case does not allow us to do anything.

The only way we found to use it is to avoid using it as a transient layer by adding an empty mapping (known workaround).

Attached file contained two projects, one which contains my design with the three extensions layers.

Maybe it's just something I did not understand but I don't find a way to use the transient layer.

[1] https://www.eclipse.org/sirius/doc/Release_Notes.html#SpecifierVisibleChanges
Comment 1 Eclipse Genie CLA 2017-10-12 11:41:27 EDT
New Gerrit change created: https://git.eclipse.org/r/109925
Comment 2 Eclipse Genie CLA 2017-10-12 11:41:40 EDT
New Gerrit change created: https://git.eclipse.org/r/109924
Comment 3 Laurent Fasani CLA 2017-10-12 11:48:57 EDT
reproducible on Sirius 5.1

First issue: the tool in "active by default" transient layer are not displayed in the palette
Second issue: when activating a optional layer containing tools, the palette is not update.

Two quick commits have been done to fix each issue.
Nevertheless, they have to be verified and junit test case are needed.

So, for now, we have not defined the version of sirius, this fix will be integrated in.
Comment 4 Pierre-Charles David CLA 2017-10-17 11:13:07 EDT
It looks like a rather bad regression, so moving this to 5.1.0.
Comment 5 Laurent Redor CLA 2017-10-25 05:47:45 EDT
Steps to reproduce on Sirius 4.1.7:
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* --> OK: By default, the tool sections "TransientOptionalSection" (layer "TransientOptional") and "TransientRequiredSection" (layer "TransientRequired") are visible by default.
* Activate layer "Workaround"
* --> OK: tool section "WorkaroundSection" appears in the palette
* Save
* Close the diagram
* Open the diagram
* --> OK: The 3 tool sections are enabled.

Steps to reproduce on Sirius 5.1.0:
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* --> KO: By default, there is no tool section visible. For tool section "TransientOptionalSection" (layer "TransientOptional"), it is expected (see an extract of the documentation extract below). But for tool section "TransientRequiredSection" (layer "TransientRequired"), it should be enabled by default at diagram opening
* Activate layer "Workaround"
* --> OK: tool section "WorkaroundSection" appears in the palette
* Activate layer "TransientOptional"
* --> KO: tool section "TransientOptionalSection" does appears in the palette
* Save
* Close the diagram
* Open the diagram
* --> KO: There is only "WorkaroundSection" in the palette. "TransientRequiredSection" should also be visible. It is expected to not have "TransientOptionalSection" in the palette.


Extract of release notes: "The notion of transient layer has been introduced in Sirius 5.0. (Refer to Sirius Specifier and Sirius User documentation in Diagram chapter). A transient layer is an additional layer containing only decorations or tools. If you have such layer in your VSM, users may encounter some unexpected behaviors. If the layer is not active by default then it will not be applied when opening your diagram even if it was activated before. If the layer is active by default then it will be automatically applied when opening your diagram. We consider this behavior as a known limitation and an enhancement may be done in a further release. In the meantime, there is a workaround which consists to add a fake mapping (that is any mapping with its fields empty) so that the layer will not be considered as transient."

Contrary to what has been exchanged with Lionel, even if there are two bugs (see steps to reproduce above or see comment 3 of Laurent F.), the workaround is OK.
Comment 6 Laurent Redor CLA 2017-10-25 05:48:12 EDT
Created attachment 271166 [details]
testTransientLayer.zip
Comment 7 Eclipse Genie CLA 2017-10-25 13:50:37 EDT
New Gerrit change created: https://git.eclipse.org/r/110611
Comment 8 Eclipse Genie CLA 2017-10-26 08:38:06 EDT
New Gerrit change created: https://git.eclipse.org/r/110637
Comment 9 Laurent Redor CLA 2017-10-26 10:03:41 EDT
List of scenario to validate:

Steps 1 to validate for "pallete content problem":
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* --> Tool section "TransientRequiredSection" must be displayed as layer "TransientRequired" should be enabled by default at diagram opening.
* Activate layer "Workaround"
* --> Tool section "WorkaroundSection" appears in the palette
* Activate layer "TransientOptional"
* --> Tool section "TransientOptionalSection" appears in the palette
* Save
* Close the diagram
* Open the diagram
* --> The 3 tool sections are visible in the palette.
* Close the diagram and the session.
* Open the session
* Open the diagram
* --> The tool section "TransientOptionalSection" is not visible in the palette (as its activation state is not persisted). The 2 other tool sections are visible.

Steps 2 to validate for "pallete content problem":
* Import testTransientLayer project (from testTransientLayerWithAllLayerEnabled.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* --> Tool sections "TransientRequiredSection" and "WorkaroundSection" must be displayed. The enabled layer "TransientOptional" of version Sirius 4.1.7, containing tool section "TransientOptionalSection" is "converted" as transient layer during the migration. And so it is not enabled.

Steps to validate for "Contextual menu provided by tool sections of VSM":
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* Open contextual menu on the diagram
* --> You should not see the action "PopupMenuInTransientOptionalLayer/ActionInTransientOptionalLayer"
* Activate the layer "TransientOptional"
* --> You should see the action "PopupMenuInTransientOptionalLayer/ActionInTransientOptionalLayer"
* Activate the layer "TransientOptional"
* --> You should not see the action "PopupMenuInTransientOptionalLayer/ActionInTransientOptionalLayer"

Steps to validate for "Label of ChangeLayerActivation (visible in Undo/Redo menu)":
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* Activate layer "Workaround"
* --> The undo menu (menu Edit/Undo...") label is "Undo Show "Workaround" layer"
* Activate layer "TransientOptional"
* --> The undo menu (menu Edit/Undo...") label is "Undo Show "TransientOptional" layer"

Steps to validate for "Drop tool":
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* Activate layer "TransientOptional"
* Drag'n'drop "C1" from ModelExplorer view to the diagram
* --> A blue node C1 is added in the diagram.

Steps to validate for "Detection of target for paste tool":
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* Activate layer "TransientOptional"
* Drag'n'drop "C1" from ModelExplorer view to the diagram
* --> A blue node C1 is added in the diagram.
* Use "Copy" contextual menu on node "C1"
* use "Paste" contextual menu on diagram
* --> A new blue node Copy is added in the diagram (the corresponding semantic class Copy is added in package test).
 
Steps to validate for "Update of an existing diagram using a newly activated diagram extension"
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* --> Tool section "TransientRequiredSection" must be displayed
* Activate viewpoint "testTransientViewpoint2"
* --> A new tool section named "TransientRequiredSection2" is now visible.

Steps to validate for "Check decorator on Layers icon of tabbar after transient layer activation":
* Import testTransientLayer project (from testTransientLayer.zip, project created with Sirius 4.1.7)
* Open diagram "newDiagram"
* Activate layer "TransientOptional"
* --> The icon for Layers in tabbar is changed (a check decorator is added in the bottom right corner)
Comment 10 Laurent Redor CLA 2017-10-26 10:03:59 EDT
Created attachment 271191 [details]
testTransientLayer.zip
Comment 11 Laurent Redor CLA 2017-10-26 10:04:12 EDT
Created attachment 271192 [details]
testTransientLayerWithAllLayersEnabled.zip
Comment 16 Maxime Porhel CLA 2017-11-02 11:39:15 EDT
Validated on Sirius 5.1.0 rc4

Note: typo in third scenario the second "* Activate the layer "TransientOptional" " instruction should be 'Disable the layer...'
Comment 17 Pierre-Charles David CLA 2017-11-08 03:37:34 EST
Available in Sirius 5.1.0, see https://wiki.eclipse.org/Sirius/5.1.0.
Comment 18 Eclipse Genie CLA 2017-11-09 09:34:56 EST
New Gerrit change created: https://git.eclipse.org/r/111305
Comment 20 Eclipse Genie CLA 2017-12-06 06:23:54 EST
New Gerrit change created: https://git.eclipse.org/r/112938
Comment 22 Eclipse Genie CLA 2017-12-11 02:50:38 EST
New Gerrit change created: https://git.eclipse.org/r/113131