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 Java-Platform UML project - Apply a Creational::Builder GoF design pattern - Generate Code for the project - Go to Director class source code ---------------------------------------------------- public class Director { private Builder ; public Product construct() { return null; } } ---------------------------------------------------- Name is not generated for 'private Builder ;' attribute The source code is not compiled
I could not reproduce this. I see the mBuilder attribute and my java application builds successfully. Perhaps you can attach your UML project for me to try out or there is some other detail I am missing?
Created attachment 39575 [details] UML project
I have attached a UML project with applyed Builder design pattern. Use ide_uml-griffin-070313_2-ml.zip build to check the issue.
I see the same behavior with older build, main reason Part End have no name (may be name from Aggregate End name should be moved to Part End)
low use case not currently impacting our installed user base.
Exact steps to reproduce: - create an empty java project (optional but will be used for code gen) - create a Java-Platform UML project and cancel the diagram creation - from the project tree, right click on the Model node of the uml project and select Apply Design Pattern - from the Design Pattern Apply Wizard, click Next - from Pattern Selection step: select "GoF Design Patterns" from the Project list select "Creational::Builder" from the Design pattern list - click Next - click Next again on the "Target Scope" - click Next again on the "Choosing Participants" step - click Next again on the "Options" step (do not check the Create class diagram check-box) - click Finish and wait till applying design pattern action is done - right click on the uml project node and select Generate Code... - accept the default path for the source to be generated or enter the path to the source directory for the java project created at the beginning and click OK - click OK on the Authorize UML Project Save dialog and wait till code gen is done - expand the Model node and right click on "Director" class and select "Navigate to Source" The following source is opened in the source editor. public class Director { private Builder ; public Product construct() { return null; } }
I could not reproduce the problem if I download UML nbms from the current NB UC Beta. However, I could reproduce the problem with later friffin build.
It appears maybe that the new template-based code gen system needs it's template updated for this on NB6.
as it was mentioned before the "builder" role name should be moved to the part end.
corrected the pattern in the library.
verified in all-nbms-hydra-070410_6
verified in all-nbms-griffin_fixes-070416_1-ml