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.
[ BUILD # : 200512192030 ] [ JDK VERSION : 1.6 ] Hi, Today I changed from one of the c'tors of a class the parameter list. I added the new parameter thru the refactoring tool, and got a warning that it doesn't work for guarded blocks. Since I can't edit the guarded blocks either I had to open good old Notepad and edit it there. Iwan
Since using the refactory results in uncompilable code, which previously compiled, I think it is a P2.
Form module should handle this.
This is a known issue (48288) that will not be addressed in NetBeans 5.0 unfortunately. Could you, please, provide more information about your scenario to make sure that we will consider it while working on the mentioned issue. How does the invocation of your parameterized constructor get into guarded block? *** This issue has been marked as a duplicate of 48288 ***
The way I reproduce it: I have a form that is dragged onto the flow-editor. Now I change the parameter list of the c'tor using the Refactory functionality. And since I know which field should be used when constructing the Form, I set it as the default value. Everywhere I construct the form, the new call is generated using the value I specified in the Refactory operation, but in the guarded blocks I still get the old call, and I can't change it, because it is in a guarded block. So.... Notepad, here I come :) Iwan
BTW no need to use notepad, you can do the same using "Custom creation code" property of the component.
I can't seem to find that Custom Generation Code property. Can you point me into the right direction? Btw, it seems that in 20060105 NB picked up the new C'tor signature. Is that possible, or am I overlooking something and just wish too hard that it is fixed? Could it be that NB reloads the code and creates new meta data for the components? Iwan
> I can't seem to find that Custom Generation Code property. Can you point me > into the right direction? Select the component in designer and click on the "Code" properties category in the property sheet. Custom Creation Code is the last property. > Btw, it seems that in 20060105 NB picked up the new C'tor signature. Is that > possible, or am I overlooking something and just wish too hard that it is > fixed? Could it be that NB reloads the code and creates new meta data for > the components? No. Likely NB did not regenerate the code yet, so you can still see it the way you changed it externally.
When I click on the component in the designer, it is a custom component (derived from Canvas) by the way, then there is no such property. I guess that custom components don't have a custom creation code option, am I right, or is it something that is not there because the component was already added to the palette various NB5 versions ago? Iwan
Created attachment 28337 [details] screenshot
The property should be there for every component (see the screenshot above) - except the root component (representing the whole form) - but in which case you had not problems with c'tor in guarded code...