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.
I am having difficult associating a Java Project Application to an existing UML Project for synchronization through the GUI. I was attempting to perform this through the UML Project properties and found that the field may not be changed. I was able to find a workaround (see below), but I do not think that it is an ideal approach to associating a project. Steps to reproduce: (1) Create a UML Project and created several diagrams. (2) Create a Java Application project. (3) Direct the UML Project to generate code into the Java Application by right clicking on the UML Project in the 'Projects' window and selecting 'Generate Code...'. (4) Right click on the UML Project and select 'Properties'. The Properties window will open. (5) Select the 'Modeling' tab on the Properties window and notice that the 'Java Project: ' field is greyed out and cannot be changed. Workaround: (1) Open the file '<UML Project>/nbproject/project.properties' in a text editor, where <UML Project> refers to the path to the UML Project stated above. (2) Modify the 'uml.javaproject=' field to the fully-specified location of the Java Application Project to be associated. (3) Modify the 'uml.javaproject.src=' field to the fully-specified location of the src directory within the Java Application Project to be associated. (4) Save the file '<UML Project>/nbproject/project.properties'. (5) Right click on the UML Project and select 'Properties'. The Properties window will open. (6) Select the 'Modeling' tab on the Properties window and notice that the 'Java Project: ' field is filled in with the Java Application Project information added in steps 2-3.
It is not necessary to edit xml files to set code-generation path to you java-project src dir. When you select 'Generate Code', you are suggested to enter source directory path. You should enter pth to src dir of you java project. This should help.
Working as designed. Perhaps the UML project customizer should be enhanced to allow the modeler to choose/change the Java project that it is associated to. Changing this to Enhancement.