Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hungarian notation in Intellij IDEA

I have to do some maintenance on legacy code that uses Hungarian notation (and Systems Hungarian at that). Unfortunately, it's not practical for me to just clean it all out of the codebase.

Local Eclipse users claim that Eclipse can be configured so that auto-generated accessors and whatnot ignore the Hungarian prefixes (which is probably why they've been able to live with them for so long).

Is there any similar functionality in IDEA 10.5? It'd be nice if 'find usages' on m_sInstruction was smart enough to realize that getInstruction() is a getter, and give me the 'do you want to search for accessors?' prompt, for instance, or if 'generate getters and setters' could tell that this class already has them for almost all fields.

like image 374
David Moles Avatar asked Oct 10 '22 21:10

David Moles


1 Answers

Settings | Code Style | Java | Code Generation, set the Name prefix for Field and Static field.

like image 142
CrazyCoder Avatar answered Oct 13 '22 12:10

CrazyCoder