---
title: "Eclipse新建类中自动添加author."
author: "keating"
date: "2010-10-17T11:52:23Z"
tags: []
categories: ["非技术"]
slug: "eclipse-author"
draft: false
lastmod: "2010-10-17T11:52:47Z"
id: 786713
url: "https://keating.iteye.com/blog/786713"
---

缘起,我改不了win 7滴user name了,所以只能曲线救国.

window -> preference -> java -> code typle -> code template -> Comments -> Types


```text

/**
 * @author ${user}
 *
 * ${tags}
 */

```


发现这样可以直接替换掉 ${user} 把author写死.

然后又发现,

window -> preference -> java -> code typle -> code template -> Code -> New Java files -> Edit


```Text

${filecomment}
${package_declaration}

${typecomment}
/**
 *
 * @author hereIsMyChineseName
 */
${type_declaration}

```


这样方法,每次创建类的时候,自动添加author..更好些吧.