为了使用版权规则,用户必须处理三个字段

1. 包含包:

针对该字段,用户必须使用逗号分割的包规范来确定应用该版权的类。
(如,com.ibm.package1,com.ibm.package2)。该字段还支持通配符(如,com.ibm.package1.*,com.ibm.package2.*)。
但是“com.ibm.package1”和“com.ibm.package1.*”具有不同的意义。如果用户只想在一个类中使用版权注释。
他将使用“com.ibm.package1”。但是如果想要在所有以“com.ibm.package1”开头的类中使用它,将
使用“com.ibm.package1.*”。

不强制要求为该字段提供值。如果未指定任何值,将对所有的包运行规则

2. 排除包:

该字段的属性与“包含包”字段相同。但是用户将使用该字段指定
不希望对其运行规则的包。

不强制要求为该字段提供值。如果未指定任何值,将对所有的包运行规则

3. 版权注释:

用户必须输入包含期望版权声明的有效 Java 注释块。

用户可以在希望版权日期出现的地方使用 [date]。例如 -


/**********************************************************************
* Copyright © [date] IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* $Id: Copyright_Help.html,v 1.1 2008/02/29 15:07:43 linda_hillis Exp $
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/

如果文件中没有版权注释且当前年份为 2007,快速修正版权注释之后,将如下所示 -


/**********************************************************************
* Copyright © 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* $Id: Copyright_Help.html,v 1.1 2008/02/29 15:07:43 linda_hillis Exp $
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/

如果文件有如下所示的版权注释
/**********************************************************************
* Copyright © 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* $Id: Copyright_Help.html,v 1.1 2008/02/29 15:07:43 linda_hillis Exp $
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/

但是该文件的最后修改日期为 2006 且当前年份为 2006。快速修正注释之后,将如下所示
/**********************************************************************
* Copyright © 2005,2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* $Id: Copyright_Help.html,v 1.1 2008/02/29 15:07:43 linda_hillis Exp $
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/

但是当前年份为 2007,且上一次修改日期为 2006,快速修正文件之后,将如下所示 -
/**********************************************************************
* Copyright © 2005,2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* $Id: Copyright_Help.html,v 1.1 2008/02/29 15:07:43 linda_hillis Exp $
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/

如果用户想要忽略比较任何行,他必须在该行使用 [ignore]。但是该行只能输入 [ignore]
(甚至在 [ignore] 标记之前和之后不能出现空格)。例如 -


/**********************************************************************
* Copyright © [date] IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
[ignore]
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/

但是快速修正将从文件中的版权注释获取该行并使用 [ignore] 来代替它。
如果文件中没有版权注释,快速修正将删除有 [ignore] 的行

没有 [date] 和 [ignore] 标记的情况下,规则将比较一切作为参数传递的内容
但是,在这种情况下,必须输入版权年份。例如 -


/**********************************************************************
* Copyright © 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* $Id: Copyright_Help.html,v 1.1 2008/02/29 15:07:43 linda_hillis Exp $
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/