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.
Create a bean in your project and a property with read and write methods: ..... private String sampleProperty; ..... public String getSampleProperty { return sampleProperty; } public void setSampleProperty(String value) { String oldValue = sampleProperty; sampleProperty = value; propertySupport.firePropertyChange(PROP_SAMPLE_PROPERTY, oldValue, sampleProperty); } ..... Go to Explorer, find the bean, drill down to 'Bean Patterns', right click on the property name, select 'Rename'; type in new name, press 'OK', answer yes to the question that pops up. You now have: ..... private String asdf; ..... public String getAsdf { return sampleProperty; } public void setAsdf(String value) { String oldValue = sampleProperty; sampleProperty = value; propertySupport.firePropertyChange(PROP_SAMPLE_PROPERTY, oldValue, sampleProperty); } .....
*** Bug 4723 has been marked as a duplicate of this bug. ***
*** Issue 12161 has been marked as a duplicate of this issue. ***
It can be worked around (without #17825), but not if the user already edited the methods' code. Complete metamodel is required to find/change the setter/getter pattern.
Cleaning up
Target milestone was changed from not determined to TBD
I have the same problem in 5.0. I did not alter the generated code. I simply added the property and renamed it immediately. It took a while, but nothing was update in the buffer. See java.lang.IllegalStateException in attached messages.log. Seems to be really broken in 5.0
I see the problem in Netbeans 5.5 RC2. If there are references to the property in other places those are not updated either.
The refactoring for the Beans Pattern node has been never implemented. We would like to offer beans refactoring actions inside the editor but the Beans Pattern node will not be part of the NetBeans 6.0. Anyway there already exists an enhancement for this so closing as duplicate in case the plans will change. *** This issue has been marked as a duplicate of 45358 ***