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.
PLEASE add the ability to add a prefix for all memeber variables so when you generate setters and getters the method names done contain the prefix. It is a common convention for people to have a prefix for member variables such as "mVarName." Here is an example: public class TestOne { private String mMyString; /** Creates a new instance of TestOne */ public TestOne() { mMyString = "crazylegs is at it again"); } } Then if you use refactoring to generate the setters and getters it will make the following methods: public String getMMyString() { return mMyString; } public void setMMyString(String mMyString) { this.mMyString = mMyString; } I would like to set in the options somewhere that I always use "m" as a prefix for my member vars. Then when I generate the getters/setters it SHOULD make: public String getMyString() { return mMyString; } public void setMyString(String mMyString) { this.mMyString = mMyString; } It is very annoying to have to generate the methods, then go back through and change all the method names. I realize you can change the method names before they are generated, but again, this is a one by one process. You should add a text field to allow us to add a prefix and say "Strip Prefix." Thanks!
Since this will require introducing a new setting, we will probably not be able to address this before promoF (nb4.2)
Created attachment 22333 [details] Quick fix to add a prefix field and function to "encapsulate field" refactoring.
The "quick fix" file I just added contains modified source and bundle files for the refactoring module. It is based on source code of NetBeans 4.1, as retrieved from cvs (release41). Unfortunatly, I dont have time to check the full NetBeans module architecture, so I'm quite sure it doesnt stick to it. However, I found this modification usefull and wanted to share it. Do whatever you think proper with it. This modification add a field in the dialog that shows when choosing "encapsulate field" and let you specify a prefix for your member variables. It is hard-coded initialized to "_" and then you can change it. The new prefix will not be saved, but it will remain until you restart netbeans.
to spetit: Thank you very much for your contribution. However we are not able to do anything with it until you sign JCA - see http://www.netbeans.org/about/legal/jca.html
Ok, I just faxed the JCA and mailed it to Prague.
We will try to integrate it for 6.0
moving opened issues from TM <= 6.1 to TM=Dev
*** This bug has been marked as a duplicate of bug 81243 ***