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.
Currently, the way to generate a new JavaBeans property is: * Explorer->Class Node->Beans Patterns->Add * Then you fill out several fields on a dialog form It is not particularly quick or easy, cannot be done directly from the editor, and the end result is not so useful. Some suggestions: [1] Define a key shortcut to bring up the dialog in editor [2] If the cursor is on a field, fill out the property name and type in the dialog based on that field [3] Currently, the default behavior is to generate only the field, not getters and setter methods. *everytime* the user must click 2 boxes to turn on code generation. Instead, either remeber their last choice, or allow them to change the default setting [4] The javadoc that is auto generated is really bad!! No javadoc would be better. Look at example below. The javadoc says nothing useful, only what is totally obvious from the method anyway. And, it takes 4 lines to do this per method. My lead engineer would not accept code from me with this type of Javadoc! Instead, dont generate javadoc or only optionally. There are other tools the user can use for javadoc anyway. /** Getter for property dbName. * @return Value of property dbName. * */ public String getDbName() { return this.dbName; } /** Setter for property dbName. * @param dbName New value of property dbName. * */ public void setDbName(String dbName) { this.dbName = dbName; }
Encapsulate Field refactoring is now available to generate getters and setters. Re. javadoc see issue 48296.