Bug 511887 - [Tooling] Ensure unique names of ports and capsule part when generalization is established
Summary: [Tooling] Ensure unique names of ports and capsule part when generalization i...
Status: NEW
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: tool (show other bugs)
Version: 0.8.0   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-08 02:55 EST by Peter Cigehn CLA
Modified: 2017-02-09 14:52 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Cigehn CLA 2017-02-08 02:55:46 EST
It must be ensured that ports and capsule parts have unique names, with respect to any inherited ports and capsule parts. In case the subclass capsule already owns ports and capsule parts that have a name that clashes with any of the inherited ports and capsule parts, then the name of the ports and capsule parts in the subclass should be adjusted, by adding some unique suffix, e.g. '_1', '_2' and so on, to avoid the name clash.

Steps to reproduce:

1) Create a UML-RT model based on the "UML-RT for C++" template
2) Create a capsule
3) Create a port and capsule part in this capsule
4) Create a second capsule
5) Create a port and capsule part in the second capsule, which have identical names to the ones in the first capsule
6) Establish a generalization from the second to the first capsule
7) Observe how the second capsule now have ports and capsule parts with identical, clashing names (and that the warning indicator in the properties view for clashing names is shown)

Expected result would have been that the names of the port and capsule parts should have been renamed with a unique suffix '_1'.

This is partly related to Bug 511777 regarding improvements to the name clash control to also consider the name spaces of any subclasses when changing name of existing (or adding new) elements in the superclass.

In the legacy tooling there is a live validation that checks unique names, and even blocks the possibility of creating or naming a port/capsule part in a subclass (or superclass) that introduces a name clash. The aspect of live validation probably should be covered by Bug 492833.
Comment 1 Charles Rivet CLA 2017-02-09 14:52:37 EST
Validation at code gen time, tool validation in Future