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 27865 - Generating JavaBeans properties is not easy or efficient
Summary: Generating JavaBeans properties is not easy or efficient
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-08 14:27 UTC by Ben Hutchison
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Hutchison 2002-10-08 14:27:55 UTC
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;
    }
Comment 1 Martin Matula 2004-11-12 12:23:03 UTC
Encapsulate Field refactoring is now available to generate getters and
setters. Re. javadoc see issue 48296.