Best IDE macro tools to combat the verbosity of Java syntax? [closed]
Does anyone have any recommendations for tools that you can add to Eclipse, Netbeans or other IDEs to produce some of the repetitive code that's common in Java syntax?
Project Lombok does a pretty good job of generating getters, setters, and other common methods for you. You just have to type the annotations, and include lombok's jar, and it will generate getters/setters, hashCode and toString methods, and so forth.
It will save a lot of typing on boilerplate methods you implement over and over.
I'm a fan of NetBeans myself. It has very nice refactoring support, user definable code templates, and short cuts for the more common tasks. For example, Alt-Ins opens a menu giving me choices of adding the boiler plate for
- a Constructor,
- a Getter,
- a Setter,
- a Getter and a Setter,
- equals and hashCode,
as well as the ability to override, implement, or delegate a method.
Eclipse provides a lot of templated code and auto complete. It's also completely customizable so if you don't like it's default style you can do your own.
You need a good keyboard. That's all. Check the products from Kinesis and their benefits.
精彩评论