开发者

Best IDE macro tools to combat the verbosity of Java syntax? [closed]

开发者 https://www.devze.com 2022-12-25 07:35 出处:网络
开发者_StackOverflow中文版 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question wil
开发者_StackOverflow中文版 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

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.

Best IDE macro tools to combat the verbosity of Java syntax? [closed]

0

精彩评论

暂无评论...
验证码 换一张
取 消