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

Bug 462334

Summary: Structure diagram label in model explorer if diagram is unnamed
Product: [Modeling] Papyrus Reporter: Robert Lundbäck <robert.lundback>
Component: CoreAssignee: Alexey Shatilov <shatilov>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: benoit.maggi, borlander, cletavernier, papyrus-bugs, peter.cigehn, rschnekenburger, shatilov
Version: 1.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: montages
Bug Depends on:    
Bug Blocks: 469851    

Description Robert Lundbäck CLA 2015-03-17 05:52:35 EDT
A convenient way to not have to bother about naming of a Capsule's structure diagram is just let it be unnamed. It is proposed to let the label shown in the model explorer, in this case, be the same as the owning capsule. 

If a name is given on the diagram this shall of course be shown.

This way of dealing with naming is similar to parameter nodes and its parameter reported in bug 458386.
Comment 1 Camille Letavernier CLA 2015-03-17 06:16:22 EDT
*** Bug 462335 has been marked as a duplicate of this bug. ***
Comment 2 Peter Cigehn CLA 2015-08-17 09:33:25 EDT
This has now partly been fixed. In the latest Papyrus-RT build the name label of a composite structure diagram gets picked from its parent capsule. 

But if you give the composite structure diagram an explicit name (instead of leaving it empty), the name label is still picked from the parent capsule.

As proposed, the name shall only be picked from the capsule when the diagram itself is left unnamed. If the diagram is given an (explicit) name, then that name shall be displayed as the name label of the diagram.
Comment 3 Remi Schnekenburger CLA 2015-08-28 05:03:25 EDT
The label provider for diagrams should be updated => it does not check if the name is null or not.
Comment 4 Peter Cigehn CLA 2016-03-10 08:34:36 EST
In the latest build of Papyrus-RT this now works as expected, i.e. if the name of the capsule's structure diagram is left unnamed, then the name label is picked from the owning capsule. If the diagram have an explicit name, then that name used.

In base Papyrus on the Neon track there is a similar generic naming scheme, where unnamed diagrams gets a name label on the editor tab that looks like "(
<Diagram type> of <Root element>)". The name label in the model explorer though is named "Diagram <Name of diagram>", which causes a label of simply "Diagram" for unnamed diagrams in the model explorer.

I suggest that we put this one into resolved/verified fixed, since the original case was related specifically to the case of a capsules structure diagram which is fixed in Papyrus-RT.
Comment 5 Benoit Maggi CLA 2017-05-12 03:46:50 EDT
as suggested by Peter I change the bug to fixed.