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: - Create a Class diagram - Put Interface element on the diagram and name it 'MyInterface' - Insert 'void op()' operation into Interface element - Put Class element on the diagram and name it 'MyClass' - Draw 'Implementation' link from Class element to Interface element - Go to source of 'MyClass' class element - Insert 'System.out.println("Hello World!");' line into 'void op()' operation ---------------------------------------------------------- public class MyClass implements MyInterface{ public MyClass() { } public void op() { System.out.println("Hello World!"); } } ---------------------------------------------------------- - Go to the diagram - Select 'MyInterface' interface element - Change 'op' operation type from 'void' to 'int' for Interface element - Go to the source of 'MyClass' class element 'op' operation body was removed ---------------------------------------------------------- public class MyClass implements MyInterface{ public MyClass() { } public int op() { return 0; } } ----------------------------------------------------------
Review: bug is as stated. Source code body should never be overwritten, or at least should be prompted to do something with it, like leave in method, but comment it out, or keep old operation but commented out.
with the new "generate code" feature, this bug is no longer valid.
this bug is no longer valid
all-nbms-griffin-061015