Friday, August 23, 2013

Eclipse IDE: Snippet/Template



1) Window → Preferences → Java → Code Style→ Code Templates→ Comments -> Files
Click Edit
and Copy and paste:

/****************************************************************************
*
*                    Copyright (c), ${date}
*                    All rights reserved
*
*                   COMPANY_NAME, INC
*                    CITY, STATE
*                    COUNTRY
*
****************************************************************************
* File Name: ${file_name}
*
* $$Log $$
*
* @Autor: ${user} : ${date}
*
*/

2) In Window → Preferences → Java → Code Style→ Code Templates→ Code-> New java File
Click Edit
and Copy and paste:
${filecomment}
${package_declaration}

${typecomment}
${type_declaration}

3) Select: "Automatically add comments for new methods and types"

So every time you create a new class this header is added