Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get rid of XXX Auto-generated method stub

I'm using an application called Eclipse to write java codes. So whenever I create a "New Class", it creates this comment.

"XXX Auto-generated method stub"

This is starting to become very annoying for me to have to delete this every time I start coding and I just want to start coding from scratch on a blank page with no auto-comment and only have the public class and static void main.

public class LocalVars
{
    public static void main(String[] args)
    {
        // XXX Auto-generated method stub

    }
}

Is there any way to get rid of this annoying random comment generator that does not apply to my coding?

I even went to Windows > Preferences > Java > Code Style > Formatter > Edit

and then turn off all checkboxes in Comments and Javadocs as well. Still no help at all.

like image 744
Azazel Avatar asked Oct 21 '25 10:10

Azazel


1 Answers

Go to "Preferences > Java > Code Style > Code Templates > Code > Method body", click "Edit" and adjust to taste.

Preferences > Java > Code Style > Code Templates > Code > Method body Code in created method stubs

like image 57
Elliott Frisch Avatar answered Oct 23 '25 23:10

Elliott Frisch