This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
steps to reproduce: 1. create 'a' and 'b' classes 2. add attribute 'd' to 'a' 3' drag 'd' with CTRL from 'a' to 'b' 4' drag 'd' with CTRL from 'a' to 'b' there are two attributes with name 'd' in class 'b'
from user survey
This is a very minor issue that is user avoidable. Can be waived for this release.
You can also do the same with operations. Intent is to implement a polymorphic method, isSimlar, is check if the element being DnD'ed is "similar" to any existing. For attributes, just need to check the name, but operation, must check the name of the operation (same as attr's) and check the number and type of the parameters. And Classifiers need to check name and package, and so on. If a "similar" element is found, then it would be standard behavior to popup a dialog notifying the user why the DnD failed, but this requires UI and L10N changes. Need QE to provide guidance here. Solution has been implemented, and now in testing phase.
Solution works with attr's and ops. A silent failure will have to do for this release, which is better than it succeeding when it should not. Next release, sort of informational dialog or opportunity to change the name of the dropped element will be implemented. Waiting for QA approval to integrate.
It was decided not to integrate this fix into UML on NB 5.5 release because we are past code freeze and this is not a showstopper or regression. There is no serious side effect and the proper fix would be to alert with a dialog and allow to change the name, but UI changes require L10N and docs updates and we are past that deadline. This fix will be itegrated into the UML on NB 6.0 release with the proper dialog prompting.
The functionality is in place, and the dialog UI is complete. Only thing left is to validate the "new name" entry and A11Y.
Proper valid name checking and error reporting and A11Y in place.
Drag the attribute with CTRL from one class to another which has the same attribute. The 'Duplicate Element Found' dialog pops up. Nevertheless the 'OK' button is enabled on the dialog. Press 'OK' button. The second attribute is added. So the class contains two attributes with the same name.
OK button was not being disabled when the dialog was first displayed.
"Duplicate Element Found" dialog now appears. Verified in trunk instrumented build 200709180324.