Automatically adding code-templates eclipse project

466 Views Asked by At

I have a Eclipse project. I am searching for a way to generate code-templates that will appear automatically when I am adding a file to the project. For example, I want to add a documentation code-template (eclipse's template is-

/**
 ** 
 ** @author:
 **/)

such that it will automatically appear in each java class file I add to the project, without making it manually.

Is there a good way to do so?

2

There are 2 best solutions below

3
On

You're able to change this behavior in

Window -> Preferences -> Java -> Code Style -> Code templates -> Comments -> Files
0
On

Sharing @howlger answer: In eclipse - Window>Preferences>Configure Project Specific Settings> choose project and then ok , then add any code-template you want.