NClass icon indicating copy to clipboard operation
NClass copied to clipboard

Creating elements with same name in one diagram is not strict enough

Open mrpetro opened this issue 6 years ago • 1 comments

Current NClass allows to have elements (doesn't matter what type they are) having same name under one diagram. This leads to very odd situations when trying to delete or copy elements with duplicated names. It also causes bad code to be generated for C# and Java. Following picture shows rules that elements naming should follow: duplicated naming rules

mrpetro avatar Jan 05 '18 21:01 mrpetro

Yep, a better name validation in the class diagrams is needed. Currently I can think of the following 3 cases:

  • create a new element. Then a duplicate name should be disallowed
  • copy a element. The new elements should be renamed according to some scheme. E.g Shape_Copy1, Shape_Copy2, etc.
  • Maybe deserializing also. Not quite sure about it though.

gbaychev avatar Jan 06 '18 13:01 gbaychev