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 12216

Summary: The template for bean patterns should be configurable
Product: java Reporter: kbaltz <kbaltz>
Component: BeansAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: Other   
Issue Type: ENHANCEMENT Exception Reporter:

Description kbaltz 2001-05-15 21:00:45 UTC
The code generated when you add a new Bean property currently produces code 
like this:
private int foo;

public int getFoo() {
  return this.foo;
}

public void setFoo( int foo ) {
  this.foo = foo;
}

A number of developers use the convention that places an underscore in front of 
any private member variables.  The Bean pattern generator should be 
configurable to produce differen styles of code.  

The way I would have written the above getter/setter is:

private int _foo;

public int getFoo() {
  return _foo;
}
public void setFoo( int foo ) {
  _foo = foo;
}
Comment 1 Petr Suchomel 2001-09-25 09:07:12 UTC
Resolved in main trunk (3.3) Options->Editing->Beans property is this 
generation configuratable