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 element - Create 'B' Class element - Draw a Navigable Aggregation link from 'A' to 'B' - Generate code for the UML project the code for the aggregation link is not correctly added ( see issue 104956) - Insert 'int a' attribute to 'A' class element - Insert 'void op()' operation to 'A' class element - Generate code for the UML project The code for the attribute and the operation is not generated
build netbeans-6.0-nightly-200705310000-full-windows.exe
The root issue is that attributes and operations are not generated if code generation is invoked the second time Steps to reproduce: - Create 'A' Class element - Create 'B' Class element - Generate code for the UML project - Insert 'int a' attribute to 'A' class element - Insert 'void op()' operation to 'A' class element - Generate code for the UML project Leave the checkboxes on the Generate Code dialog as selected The code for the attribute and the operation is not generated The IDE log file contains the following exception: java.lang.IllegalArgumentException: Prefix string too short
Created attachment 43106 [details] IDE log file
The 2nd issue with java.lang.IllegalArgumentException: is fixed. The first issue is still here in the sense that merging is practically impossible if the source file isn't a syntactically correct Java file. In this case the file will be just overwritten without merge (backup copy - as usually depending on the checkbox). The parser error and the fact of overwriting will be logged.
In case if existing file is non-parseable : - the back up copy will _always_ be created, - new version will replace the existing file - the warning like this will be logged: .... Generating source from template "CompilationUnit.java" ... Ok Existing Source File - C:\tmp\wrk\wss\NetBeansProjects\UMLProject11Sources\src\pack3\cll11Node.java WARNING: The existing source file couldn't be parsed. It was overwritten by new version, and backup copy was created. ...
verified in netbeans-hudson-trunk-923-full.zip