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.
reproducible with 070323 Assembled/realized interfaces are removed after component removal if in iconic view. Can lead to data loss. steps: 1. create component diagram 2. add component 3. select interface in palette 4. click on the component and in free space 5. repeat step 4 6. transform second interface to non-iconic view 7. select assembly connector in palette 8. repeat step 4 9. select component only (on diagram) and press delete 10. select checkbox "remove from model" and press Yes in confirmation dialog all iconic interfaces are removed from model (non-iconic remains)
The described testcase creates one component, two provided interfaces (without consuming component connected) and a required interface (without supplier). The iconic interface (assembly connector) is implemented in TSConnector (from TomSawyer library) with a definition -- "A connector is a specialized node that may be placed at the end or the beginning of an edge path. A connector is always owned by a drawable node." So when a component is selected on graph to be deleted, its connector is selected inexplicitly, if the connector is not connected to other components, it will be deleted as well which is the case here. Please test a scenario with assembly connector connecting to both provided and required interfaces, delete one component and verify the iconic interface stays. The assembly connector is type of interface, once it's transformed to non-iconic form its underlying implementation has switched to regular Interface node from TSConnector, the ownership constraint is gone, that's why its behavior is different. It now serves as a standalone standard interface realized by a component rather than a single interface provided by the component. I think the current behavior is intended and correct, any counterarguments?
- is it TS definition or uml specification definition? Is it good to argue behavior/changes by ts internal behavior? - another use case 1) component provide interface 2) some class implement the interface on another diagram 3) ok, don't need component any more, select and remove from model oh, my interface gone away too... - another example: several components provide(use/assemble) the same interface (but different presentations of the interface on the same diagram or on different diagrams), and I delete one of component - if component-iconic interface have really tight relation why interfaces aren't removed if components are removed from project tree - is it really good to delete something without warnings/asking, as I remember we asked users if they want to delete accessors but accessors really have no sense after deletion of attribute.. - etc :)
Changed the logic not to remove lollipop interfaces and assembly connectors that are connected to a component being deleted.
verified in netbeans-6.0-nightly-200705250000-full