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.

Bug 137638 - auto-generated code is broken
Summary: auto-generated code is broken
Status: RESOLVED DUPLICATE of bug 116456
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-18 22:16 UTC by lordthecrow
Modified: 2008-06-19 10:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
print screen for broken generated code (22.55 KB, image/jpeg)
2008-06-18 22:18 UTC, lordthecrow
Details
the form which generates broken code (22.50 KB, text/plain)
2008-06-18 22:19 UTC, lordthecrow
Details
generated java file (22.70 KB, text/plain)
2008-06-19 10:01 UTC, lordthecrow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lordthecrow 2008-06-18 22:16:13 UTC
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.
Comment 1 lordthecrow 2008-06-18 22:18:03 UTC
Created attachment 63043 [details]
print screen for broken generated code
Comment 2 lordthecrow 2008-06-18 22:19:24 UTC
Created attachment 63044 [details]
the form which generates broken code
Comment 3 Jiri Vagner 2008-06-19 07:00:45 UTC
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, .... )
Comment 4 Jan Stola 2008-06-19 07:57:12 UTC
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 ***
Comment 5 lordthecrow 2008-06-19 10:01:10 UTC
Created attachment 63062 [details]
generated java file
Comment 6 lordthecrow 2008-06-19 10:06:34 UTC
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.