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

Bug 527109

Summary: Enhance management of diagram elements visibility on diagrams
Product: [Modeling] Sirius Reporter: Pierre Guilet <pierre.guilet>
Component: DiagramAssignee: Pierre Guilet <pierre.guilet>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: florian.barbin, julien.dupont, laurent.redor, maxime.porhel, pierre-charles.david, steve.monnier
Version: 5.0.0Keywords: triaged
Target Milestone: 6.1.0   
Hardware: PC   
OS: Windows NT   
See Also: https://git.eclipse.org/r/111554
https://git.eclipse.org/r/111553
https://git.eclipse.org/r/111552
https://git.eclipse.org/r/112875
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=367c0df67bc38d8e458bbc59731cbc01f55f26fe
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=491cd5704e51282f6cb74c8a50380ebf58569df7
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5f0b59fa8b6d88e0c862bd676c1ae19c378768f6
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=06a3692998e4dddce596ac45330ebb5d91d413d0
https://git.eclipse.org/r/122967
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5dee3b0b0f6094d11627d8d7ce6f0439a0572694
https://git.eclipse.org/r/125712
https://git.eclipse.org/r/125711
https://git.eclipse.org/r/125713
https://git.eclipse.org/r/125855
https://git.eclipse.org/r/125914
https://git.eclipse.org/r/126538
https://git.eclipse.org/r/127083
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6e574f4ac213201a87de34334850de01c04a1d76
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0e972c80a789f47fc33de935122e9c56dec12aac
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3c77de0e6e1dd01a9887e6b8a6867e4857d49967
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=254f806c763563051ced8e39ae9defd1c9cb1d10
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=fc136a892b32a867e75d8e0b218a8c3868d8103a
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8ba161bf7798cdc51b376988297786a5d2605c06
https://git.eclipse.org/r/127284
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=325ecd1f207849e49f0f29a6d0507934e4be29f1
https://git.eclipse.org/r/127297
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=92383974fb169a3e7a813fccfd731f11e9157326
https://git.eclipse.org/r/127318
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=cbd5ee41fc97439a1005c49e4f7dc76cbc31308f
https://git.eclipse.org/r/127333
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6f8d5d8c28db47015e64fcde61b09629d44430f1
https://git.eclipse.org/r/127416
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=abfdd9dc039327b5d19ddf5a133f62b7715d6707
https://git.eclipse.org/r/127762
https://git.eclipse.org/r/127764
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=439351165960464c8623456e00ba5faff8fa3059
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=41f2886c98e5ebe12f5ef7ac231b23172403a14d
https://git.eclipse.org/r/128906
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5f1e77d9139b091d8c142e228a6248ecc89af78f
https://git.eclipse.org/r/129614
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8ceee4b2baf6d0422b58f40084b721a0bb7dd5f4
https://git.eclipse.org/r/130029
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ee17eaffb672a7f85ad90dc5e0a4fbe9a0a3c32f
https://git.eclipse.org/r/130056
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d295b3b13c50df14cbec3595dfddb042a4570f2c
https://git.eclipse.org/r/130757
https://git.eclipse.org/r/130756
https://git.eclipse.org/r/130762
https://git.eclipse.org/r/130790
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=192174084189f754c76328383d4e08dfcb1e4ea8
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=26225147878aee3e6b7eee3cece7c736bc400d1b
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9dd89d7bb5fa5acc51722c8c6ebf0156e9506e9f
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=aae93420a53352b578ed63d2544b0d6a091198bd
Whiteboard:
Attachments:
Description Flags
Demo of the POC with a Capella diagram
none
Demo of the POC with a Capella diagram
none
project to test visibility
none
project to test visibility none

Description Pierre Guilet CLA 2017-11-10 05:53:10 EST
Different mechanisms exist to show/hide diagram elements. One using contextual menu actions on selected element, one global to all diagram elements using a wizard and one using the outline.
N.B the show/hide functionality is independent from the VSM filter functionality. Diagram elements can be hidden by both. It means making it visible from one mechanism will not make it visible on the diagram. It must be visible from both mechanism point of view. 

- Show/hide modification done by the editing Wizard:

To change the hidden status of diagram elements a wizard is available.

This wizard can be opened by using the toolbar button or contextual action on the diagram selection only.

It shows all diagram's elements hidden and not hidden.

A diagram element is said hidden if it is unchecked in the wizard. Also the element should not be visible in the diagram. If checked, the element should be visible.

- Show/hide modification done by the Outline

The hidden status of diagram elements can be also changed by using contextual menu actions on the tree representation of the diagram editor's outline.

- Show/hide modification done by contextual menus action on diagram elements

The last way to hide diagram elements is too select one or many from a diagram editor and to select the "hide" contextual menu action.

This mechanism cannot be used to show diagram elements because invisible elements cannot be selected.

- Known issues/limitations:

The current mechanism is not efficient from a user perspective is the following situations:
- When a user want to know what diagram elements are hidden and to show some he can only use the edit wizard and the outline. He cannot do that from the diagram directly by selecting the invisible element because by definition they cannot be seen. So he has to know what invisible element he wants to show from a string representation without relation to its position in the diagram and the area the user is currently looking at. Then the user must find it in the wizard or outline and show it.

- Solution: 

To address concerns about current _Show/hide_ functionality the ideal solution would be to be able to activate an edit mode allowing to see and distinguish hidden/shown element to efficiently change these status like the layouting mode.

This mode will show diagram elements that are hidden with light transparency to distinguish those with visible diagram elements. 

Functionalities:

- Having a button in the tabbar of diagram editors allowing to activate/deactivate _show/hide mode_ like the _layouting_ button.
- Having a _Show/hide_ mode where we can see invisible elements that are not filtered by VSM filters.
- The _show_ menu action and button will be available on selected invisible elements as well as the _hide_ menu action and button on visible elements to change visibility status.
- Invisible elements will have some contrast with visible element like transparency.
Comment 1 Eclipse Genie CLA 2017-11-14 10:38:29 EST
New Gerrit change created: https://git.eclipse.org/r/111554
Comment 2 Eclipse Genie CLA 2017-11-14 10:38:33 EST
New Gerrit change created: https://git.eclipse.org/r/111553
Comment 3 Eclipse Genie CLA 2017-11-14 10:38:35 EST
New Gerrit change created: https://git.eclipse.org/r/111552
Comment 4 Eclipse Genie CLA 2017-12-05 09:12:40 EST
New Gerrit change created: https://git.eclipse.org/r/112875
Comment 5 Pierre Guilet CLA 2017-12-08 11:20:02 EST
The current functionality is a POC.
The implemented features are the following:
- A "Showing mode" button is present next to the "Layouting mode" button and allows to activate a mode to edit visibility status of diagram elements. This button will be available only if the system property "org.eclipse.sirius.ui.activateShowingMode" is set to true.

-This mode shows invisible diagram elements with a transparency.
-This mode currently allows to change the visibility status of element by using a double click on the elements.
-This mode does not restrict actions available on invisible elements.

Incomplete features:
- The double click actions on diagram elements while in showing mode should not change the general diagram element visibility but should change the user manual hidden status. Current behaviour will not persist visibility changes when saving. 
- The transparency applied on diagram element does not take in consideration all kind of parts.

Features to consider to improve the functionality:
-Restriction of actions available while in Showing mode that does not make sense.
-Making visible an invisible diagram element should take in consideration the reasons why it is invisible in the first place other than the manual hidden action. If a diagram element is invisible because of a filter activated, the filter should be deactivated when double clicking it.   
-Double click should change the hidden status and not the visibility one that is caused by several reasons. 
-Double click on an hidden edge should also reveal source and target node and all hidden parent recursively. 
-The showing mode button's icon could be improved 
-Layouting and showing mode should be exclusive. So we should have a drop down menu allowing to select one mode among others. 
-Transparency on hidden elements should be available for all parts.
-Making configurable the elements to make visible with transparency when in showing mode to avoid noise we know we never want to show.
Comment 6 Laurent Redor CLA 2017-12-20 12:29:06 EST
Created attachment 271989 [details]
Demo of the POC with a Capella diagram

Capella-showingMode.webm : This video is a demo of the POC in a Capella diagram.
Comment 11 Laurent Redor CLA 2017-12-21 03:29:51 EST
The code corresponding to the POC has been merged on Sirius master branch. This branch currently corresponds to the next Sirius 5.1.1. and will be shortly branched to be the Sirius 6.0.0.
To enable this POC, eclipse must be launched with VM argument "-Dorg.eclipse.sirius.ui.activateShowingMode=true"

To have a similar video as in comment 6, gerrit must also be merged on Capella side:
* branch 1.2.x: https://git.polarsys.org/r/5422 --> [527109] Disable WizardEditPolicy in Showing mode
* branch master: https://git.polarsys.org/r/5423 --> [527109] Disable WizardEditPolicy in Showing mode
Comment 12 Eclipse Genie CLA 2018-05-18 11:44:19 EDT
New Gerrit change created: https://git.eclipse.org/r/122967
Comment 14 Eclipse Genie CLA 2018-07-06 10:27:31 EDT
New Gerrit change created: https://git.eclipse.org/r/125712
Comment 15 Eclipse Genie CLA 2018-07-06 10:27:34 EDT
New Gerrit change created: https://git.eclipse.org/r/125711
Comment 16 Eclipse Genie CLA 2018-07-06 10:27:37 EDT
New Gerrit change created: https://git.eclipse.org/r/125713
Comment 17 Eclipse Genie CLA 2018-07-10 04:54:25 EDT
New Gerrit change created: https://git.eclipse.org/r/125855
Comment 18 Eclipse Genie CLA 2018-07-11 05:27:15 EDT
New Gerrit change created: https://git.eclipse.org/r/125914
Comment 19 Maxime Porhel CLA 2018-07-19 03:56:24 EDT
Created attachment 275041 [details]
Demo of the POC with a Capella diagram
Comment 20 Eclipse Genie CLA 2018-07-24 05:17:52 EDT
New Gerrit change created: https://git.eclipse.org/r/126538
Comment 21 Eclipse Genie CLA 2018-08-06 05:07:11 EDT
New Gerrit change created: https://git.eclipse.org/r/127083
Comment 28 Eclipse Genie CLA 2018-08-10 05:03:45 EDT
New Gerrit change created: https://git.eclipse.org/r/127284
Comment 30 Eclipse Genie CLA 2018-08-10 08:58:08 EDT
New Gerrit change created: https://git.eclipse.org/r/127297
Comment 32 Pierre Guilet CLA 2018-08-10 09:02:34 EDT
A pass will be done later on the icons
Comment 33 Eclipse Genie CLA 2018-08-11 10:21:49 EDT
New Gerrit change created: https://git.eclipse.org/r/127318
Comment 35 Eclipse Genie CLA 2018-08-13 05:17:55 EDT
New Gerrit change created: https://git.eclipse.org/r/127333
Comment 37 Eclipse Genie CLA 2018-08-14 10:41:28 EDT
New Gerrit change created: https://git.eclipse.org/r/127416
Comment 39 Eclipse Genie CLA 2018-08-21 08:51:00 EDT
New Gerrit change created: https://git.eclipse.org/r/127762
Comment 40 Eclipse Genie CLA 2018-08-21 09:03:14 EDT
New Gerrit change created: https://git.eclipse.org/r/127764
Comment 43 Eclipse Genie CLA 2018-09-07 08:01:38 EDT
New Gerrit change created: https://git.eclipse.org/r/128906
Comment 45 Eclipse Genie CLA 2018-09-18 08:10:56 EDT
New Gerrit change created: https://git.eclipse.org/r/129614
Comment 47 Pierre Guilet CLA 2018-09-26 10:57:03 EDT
Created attachment 276003 [details]
project to test visibility
Comment 48 Pierre Guilet CLA 2018-09-26 11:10:00 EDT
Created attachment 276004 [details]
project to test visibility
Comment 49 Pierre Guilet CLA 2018-09-26 11:22:10 EDT
To validate this issue you should:
- Import the attached project and open the available representation.
- Read the documentation Sirius>Diagrams>Edit modes. This should allows you to understand how to:
    - activate/deactivate the visibility mode
    - how to make visible/invisible any diagram element
- Try to make visible/invisible all available diagram elements (label, edges, containers, nodes) This should work.
- The action hide should not be visible in the contextual menu of an hidden diagram element.
- The tooltip of the edit mode menu should be "Change Diagram edition mode"
- You should be able to switch edit mode with the dropwdown menu whether a diagram element is selected or not. 
- The right active mode should be selected in the dropdown menu.
Comment 50 Pierre Guilet CLA 2018-09-26 11:22:46 EDT
The hide element and label buttons are available in tabbar for an invisible selected element whereas they should not.
Comment 51 Eclipse Genie CLA 2018-09-26 11:56:44 EDT
New Gerrit change created: https://git.eclipse.org/r/130029
Comment 52 Pierre Guilet CLA 2018-09-26 11:58:18 EDT
Validation:
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=527109#c49
Also make sure the hide action for invisible diagram element is disabled
Comment 54 Eclipse Genie CLA 2018-09-27 04:08:17 EDT
New Gerrit change created: https://git.eclipse.org/r/130056
Comment 56 Eclipse Genie CLA 2018-10-10 10:18:28 EDT
New Gerrit change created: https://git.eclipse.org/r/130757
Comment 57 Eclipse Genie CLA 2018-10-10 10:18:30 EDT
New Gerrit change created: https://git.eclipse.org/r/130756
Comment 58 Eclipse Genie CLA 2018-10-10 12:57:31 EDT
New Gerrit change created: https://git.eclipse.org/r/130762
Comment 59 Maxime Porhel CLA 2018-10-11 04:53:16 EDT
Several new changes have been pushed to gerrit to improve this new feature.
Comment 60 Eclipse Genie CLA 2018-10-11 05:49:33 EDT
New Gerrit change created: https://git.eclipse.org/r/130790
Comment 65 Eclipse Genie CLA 2018-10-15 12:28:46 EDT
New Gerrit change created: https://git.eclipse.org/r/130939
Comment 66 Maxime Porhel CLA 2018-10-17 04:35:55 EDT
Bug 540188 has been created to handle the issue corrected by https://git.eclipse.org/r/130939

As 6.1.0 is planned for tomorrow, new tickets will be created if additional issues are found instead of reopening this one.
Comment 67 Pierre-Charles David CLA 2018-10-19 12:48:01 EDT
Available in Sirius 6.1.0, see https://wiki.eclipse.org/Sirius/6.1.0