Question

This is the code that's generated through Content Assist for creating an anonymous-inner class

new ActionListener()
        {

            @Override
            public void actionPerformed(ActionEvent arg0)
            {
                // TODO Auto-generated method stub

            }
        };

It's a small thing, but I wanted to edit the template so that the //TODO message isn't there. I can't find it in templates, and I was wondering if there was another place to edit the generated code in Content Assist?

Était-ce utile?

La solution

The templates are in Window -> Preferences -> Java -> Code Style -> Code Templates. What you want to alter is in Code -> Method body.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top