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 created a simple interface, and handle events for my components. Suddenly, some of my custom code written for some method become unavailable for editing, being marked as auto-generated. Beside that, when I add a new event handler the method code is generated inside another method resulting in compile errors.
Created attachment 63043 [details] print screen for broken generated code
Created attachment 63044 [details] the form which generates broken code
Please add also VisualInterface.JAVA file. Can you please add a few steps how to reproduce it? (Something like: Create form, add button, invoke popup menu, .... )
It seems like a duplicate of issue 116456. The root of the problem is that Surround with try-catch hint breaks (hidden) comments that mark the begin and the end of the guarded (read-only) blocks. You can fix your form by editing these comments manually in external editor (outside NetBeans). See some non-corrupted form how these comments should look like. *** This issue has been marked as a duplicate of 116456 ***
Created attachment 63062 [details] generated java file
I added the java file for the form. Indeed it was from misplaced //GEN-LAST comment due to try catch surrounding. There was multiple hidden comments misplaced. Unfortunately I cannot reproduce it. I can say that I added some menu item, complete the code inside events which involved a try-catch, and then tried to add a new ActionEvent on a menu item.