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.
Product Version: NetBeans IDE 6.7.1 (Build 200907230233) Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02-83 System: Mac OS X version 10.5.7 running on x86_64; SJIS; en (nb) Generated method is created inside guarded block. 1. Open DesktopApplication1 project 2. Open only DesktopApplication1View.java Do not open NewJDialog.java 3. You can find one error in showAboutBox() d.setX(1) is not defined. Select Create Method setX(int) in desktopapplication1.NewJDialog on suggestion window 4. method setX() is created in guarded block like below // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; void setX(int i) { throw new UnsupportedOperationException("Not yet implemented"); } // End of variables declaration There is no way to move the codes to outside on NetBeans.
Created attachment 85878 [details] sample project
Reproducible. If NewJDialog is not opened, the new method is added to the guarded block.
Fixed, please verify. --- http://hg.netbeans.org/jet-main/rev/a1000ec9db36
Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a1000ec9db36 User: Max Sauer <msauer@netbeans.org> Log: #169942: Generated method is created inside guarded block
Verified the fix on 200909220201. But it seems that selection for inserted codes is not correct. See attached screenshot. I don't think it's high priority. Should I file another issue? Please advice.
Created attachment 88094 [details] screenshot
Yes, please file an issue, P3 or P4 against java.hints or java.source, assigned to 'msauer'. Please attach sample source or let me know if the project/steps to reproduce are still the same as in this issue. Thank you very much.
Thank you! I opened a new bug 172956 as P4.