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.
1) The Gen Code dialog prompt can be disabled. But if the target project is invalid, the dialog should be forced to display with an error message about the invalid target project instead of the output window error message. It should work like the "no enabled templates" scenario is handled. 2) The target Java project for Gen Code is actually saved as an absolute path in the project.properties. It should be in the private.properties file and should be the Java target project name and src folder instead of absolute path. See how the "associated Java project" property works for Reverse Engineered projects and make it work similar, but don't use the same properties because the default target UML project for RE can be different than the target Java project for code gen.
Some of this fixed in another bug and the rest will be part of a new enhancement issue.