NClass
NClass copied to clipboard
Creating elements with same name in one diagram is not strict enough
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:
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.