Eclipse – How to we automatically generate comments for methods written by us in Eclipse RCP


How can the comments or comment-blocks related to the methods be added by us into our RCP application as soon as a new method is added?

Best Solution

In the preferences: JavaCode StyleCode Templates

At the bottom there is a checkbox, Automatically add comments for new methods and types.

If you have an existing method, you can go to the (empty) line just before the method, type /** Enter, and the comment is generated.