I make most of my member variables start with the letter "m", for example mId
or mIsSomething
. When I use the keyboard shortcut to add getters/setters, I end up with:
public void setmId() {}
but I want:
public void getId() {}
How do I set a prefix for it to remove when creating the getter/setter?
I found the solution:
Go to File -> Other Settings -> Default Settings
In the search box, type "prefix".
On the right, select the tab "Code Generation".
In the "prefix" box, type m
(or whatever your prefix is)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.