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.
Unnamed elements should be skipped over in the code generation process.
Added a condition to skip "Unnamed" elements. Also localized all of Generate Code process.
The issue is still reproduced. This is a Generate Code log: ------------------------------------------------------------ Begin processing Generate Code: 2 items MSG_CodeGenSelectedOptions UMLProject1Sources\src Processing element 1 of 2: Skipping "Unnamed" element Processing element 2 of 2: Class MyClass ================================ Task Successful (total time: 0 seconds) ------------------------------------------------------------ But the source code is generated for 'Unnamed' element: ------------------------------------------------------------ MyClass.java Unnamed.java Unnamed.java1 ------------------------------------------------------------ I think that 'Generate Code' menu is not necessary for 'Unnamed' elements. Should I file a separate issue on it?
I saw in attempt to fix "Unnamed" was hardcoded in message and second part was from bundle file most likely not affected by UML Options. In fact the issue isn't fully valid and should be rephrased as "Not yet named object shouldn't have generated code" because user can change default element name to any value with UML|New Project|Default Element Name option. unfortunatly in previous release it worked as "Object with name equal to default have no source code", I don't know if issue was filed (but it's better than hardcoded 'Unnamed')
Yes, I understand and agree. I will reword the message in the output window.
Change message to say "Skipping element with default element name: Unnamed" where Unnamed is whatever the global option preference is set to. I also removed the Generate Code action for elements with the default element name.
The 'Code Generation' menu item is removed for unnamed elements. Source code is not generated for unnamed elements if preferences were changed only once before code generation. See issue 87275 .