How to remove the //TODO comments from auto-generated code

Eclipse Code Templates are great. Unfortunately they add lots of comments for stuff I don’t like:

public class MainTest {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }

}

If you also don’t like the TODO comments you can change the templates via: Window -> Preferences -> Java -> Code Style -> Code Templates.

In the code tree you have the templates. Select for example Code → Method Body and press “Edit” to edit this template and to remove the todo comment.

I hope this helps. I also added this to my Eclipse IDE tutorial in the Eclipse templates section.

You find me also on Twitter. My Google+ profile can be found Lars Vogels Profile.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, With more than one million visitors per month his website vogella.com is one of the central sources for Eclipse and Android programming information.
This entry was posted in Eclipse. Bookmark the permalink.

2 Responses to How to remove the //TODO comments from auto-generated code

  1. arzki says:

    That’s a great tip. Thanks.

  2. I really wanna thank you for your website, I’ve been working on a project that involves Android and the info you have is really really good. I thank you with my heart :)

Comments are closed.