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.
Some Java developers use the convention of prefixing member variables with underscore (_) when they are private to avoid having to type "this.", also eliminating many possible coding errors due to namespace scoping issues. I'd like NetBeans to recognize this fairly common convention (or at least have an option to recognize it). More specifically, if I define a class similar to: public class Foo { private int _bar; } When I generate getters and setters for _bar, I want them to look as follows: public int getBar() { return _bar; } public void setBar(int bar) { _bar = bar; } NetBeans 5 used to have the ability to do this (though it did so inconsistently depending on which of the many getter/setter generation options you chose). In the current Alt+Insert feature in NetBeans 6, the getter and setter that is generated generates code like: public int get_bar() { return this._bar; } public void set_bar(int _bar) { this._bar = _bar; } which is not the desired result.
At work I'm forced to prefix members with m_ and statics with s_. It would save a hell of a lot of my time if I could configure NB6 with this convention so that automatically generated getters, setters and constructors adhere to it.
We prefix member variables with "m" and parameters with "p". Code will look like this: private String mName; public viod setName(final String pName) { mName = pName; } Specifically in longer methods/classes it is of great value if you know exactly from where the variable is deriving from.