CopyrightPlugin 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic CopyrightPlugin (r1.8 - 20 Mar 2007 - LarryHamel)
Changed:
<
<

By default the plugin is disabled for a project. Simple select the Enable

>
>

By default the plugin is disabled for a project. Simply open the Settings panel, navigate to the Copyright subpanel, then select the Enable


 <<O>>  Difference Topic CopyrightPlugin (r1.7 - 06 Dec 2005 - RickMaddy)
Changed:
<
<

Copyright version 1.0.0 RC1 Release Notes for IDEA 5.x

>
>

Copyright version 1.0.0 Release Notes for IDEA 5.x

Added:
>
>

Enable Plugin

By default the plugin is disabled for a project. Simple select the Enable Copyright Notice Plugin checkbox to enable copyright notices for this project.

Added:
>
>

You can also import copyright notice settings from other, external projects and modules by pressing the Import Settings button. This brings up a file chooser that lets you select project (.ipr) or module (.iml) files. Once selected the project or module is scanned for copyright plugin settings. If found they are imported into the current level.

At the module level you can also copy over the current project's settings by pressing the Copy Project Settings button.

Changed:
<
<

choice will simply use the syntax it does have available. If the block comment is chosen you have the option of having each line preceded by a comment marker.

>
>

choice will use the syntax it does have available to best emulate the choice. If the block comment is chosen you have the option of having each line preceded by a comment marker.

Changed:
<
<

"boxed" in. Note that this option is not available for any of the XML like file types (XML, HTML, xHTML, JSP, JSPx, and DTD) due to those files not allowing two hyphens (--) in comments.

>
>

"boxed" in. The character used to fill the separator can specified. By default (nothing specified) the character used will be appropriate for the given language. Tilde (~) is used for XML type languages because a hypen (-) isn't valid when strung together.

Added:
>
>

Alternate Comment Syntax

JSP files can use either JSP comments or XML comments. By default the JSP syntax is used. To use XML you must check the Use XML Comments checkbox.

Added:
>
>

  • At the end of the context menu for a supported file in an editor.
Changed:
<
<

  • 1.0.0 RC1 (30 Nov, 2005)
>
>

  • 1.0.0 (6 Dec, 2005)
Changed:
<
<

Plugin Version: 30 Nov 2005 (1.0.0 RC1)

>
>

Plugin Version: 6 Dec 2005 (1.0.0)

Changed:
<
<

-- RickMaddy - 30 November 2005

>
>

-- RickMaddy - 6 December 2005

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="1.0.0RC1"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="1.0.0"}%

Changed:
<
<

%META:FILEATTACHMENT{name="Copyright-1.0.0-RC1-5.x-bin.tar.gz" attr="" comment="Binary distribution" date="1133414441" path="Copyright-1.0.0-RC1-5.x-bin.tar.gz" size="136015" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-1.0.0-RC1-5.x-src.tar.gz" attr="" comment="Source distribution" date="1133414462" path="Copyright-1.0.0-RC1-5.x-src.tar.gz" size="51387" user="RickMaddy" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="Copyright-1.0.0-RC1-5.x-bin.tar.gz" attr="h" comment="Binary distribution" date="1133414441" path="Copyright-1.0.0-RC1-5.x-bin.tar.gz" size="136015" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-1.0.0-RC1-5.x-src.tar.gz" attr="h" comment="Source distribution" date="1133414462" path="Copyright-1.0.0-RC1-5.x-src.tar.gz" size="51387" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-1.0.0-5.x-bin.tar.gz" attr="" comment="Binary distribution" date="1133910593" path="Copyright-1.0.0-5.x-bin.tar.gz" size="149380" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-1.0.0-5.x-src.tar.gz" attr="" comment="Source distribution" date="1133910615" path="Copyright-1.0.0-5.x-src.tar.gz" size="70749" user="RickMaddy" version="1.1"}%


 <<O>>  Difference Topic CopyrightPlugin (r1.6 - 01 Dec 2005 - RickMaddy)
Added:
>
>

Copyright version 1.0.0 RC1 Release Notes for IDEA 5.x

Changed:
<
<

Purpose

>
>

NOTE: This version requires IDEA to be executed with JDK 1.5.0 or greater.

Changed:
<
<

This plugin allows you to ensure all Java files in a project have a standard, project specific, copyright notice.

>
>

Project/Module Copyright Notice.

Changed:
<
<

Description

>
>

This plugin is used to ensure files in a project or module have a consistent copyright notice. Copyright notices can be created for the following file types: Java, JavaScript?, JSP, JSPx, XML, HTML, xHTML, DTD, Properties, and CSS.

Changed:
<
<

This plugin allows you to maintain a consistent copyright notice in all your project's Java files. You can define a unique copyright notice for each project. This includes it's location in the file.

>
>

Configuration

Project and Module Level

You can set the copyright notice at the project level first. This setting will be used as the default for each new module added to the project. You then have the option of adjusting each module's setting individually. For each module you can specify whether it has it's own custom copyright, uses the project copyright, or has no copyright at all.

Settings

At a given level (project or module) you can define a copyright notice template to be used by all supported file types and/or you can tailor the copyright notice settings for a specific file type.

Template

Text

Most likely you will want the same general copyright notice for all file types. This is done by setting up the template. The copyright notice template should be undecorated and language independent. In other words, the template should not contain any language specific comment markers.

The template will be treated as a Velocity template. See the section below for more information on Velocity templates.

Formatting Options

Once the basic text of the copyright notice is set you can specify several formatting options.

First you should specify whether the copyright should be entered using a file's block or line comment syntax. A language not containing the selected choice will simply use the syntax it does have available. If the block comment is chosen you have the option of having each line preceded by a comment marker.

Second you can specify whether the comment should be surrounded by a line of comment markers, referred to as a separator. If both separators are selected and are of the same length you will have the option of having the whole comment "boxed" in. Note that this option is not available for any of the XML like file types (XML, HTML, xHTML, JSP, JSPx, and DTD) due to those files not allowing two hyphens (--) in comments.

Relative Location

If the area containing the copyright notice contains other, non-copyright comments you can specify whether the copyright notice comes before or after the other comments.

You may also specify that you want a blank line to appear after the copyright notice.

Copyright Keyword

This keyword must be a valid Java regular expression (see java.util.regex.Pattern) used to determine if a comment is a normal comment or a copyright notice comment. It is important that the keyword expression doesn't match non-copyright notice comments or you may find comments getting deleted that you didn't want deleted. This warning is only true for comments near the beginning of files within the areas that copyright notices may appear. Comments in other parts of a file will not be effected even if the keyword expression matches.

Preview

Checking the Preview checkbox allows you to see what your comment will look like using Java comment syntax. This is your entered text formatted with all the options chosen in the Formatting Options area.

Validate

Pressing this button verifies that the text is a valid Velocity template. If the Velocity engine finds any problem with the text an error message is displayed. This does not verify whether the resulting comment is valid for the given file type.

File Types

By default all supported file types will use the template copyright notice. You do have the option of changing the settings for a specific file type.

Template Override

No Copyright - Select this if you don't want any copyright notice added to files of this type. If a copyright notice exists it will be removed. Use Template - Use the template copyright notice. Use Template Text - Select this if you want to use the text of the template copyright notice but you wish to format the text differently. Fully Custom - Select this if you need to enter a copyright notice in a form not supported by the supplied formatting options. If you choose this option then the text you enter must be a complete and valid comment for the given file type. See the section below on multi-comment notices.

Formatting Options

This is only enabled if Use Template Text has been selected. The options work just as described under the Template section. The only exception is that the Block and Line comment choices are enabled based on the features of the language.

Relative Location

This is enabled if Use Template Text or Fully Custom has been selected. The options work just as described under the Template section.

File Location

This specifies where within a file the copyright notice is to be placed.

Java
Changed:
<
<

  • At the start of the file before the "package" statement.
  • Between the package statement and any imports.
  • Between the imports and the first top level class (before the class' Javadoc comment, if present).

You may also specify that when an update occurs, any old non-Javadoc comments between the start of the file and the first top-level class be removed. This basically makes the assumption that the only non-Javadoc comment in this region is an old copyright notice you are updating.

>
>

- At the start of the file before the "package" statement. - Between the package statement and any imports. - Between the imports and the first top level class (before the class' Javadoc comment, if present).

XML/DTD/HTML/xHTML/JSP/JSPx

The copyright notice can be placed in one of the following locations:

- Before the specification. - Before the first tag of the document.

All Other File Types

For all other file types the copyright notice must appear in the begining of the file before any non-comment, non-whitespace content.

Multi-Comment Notices and Blank Lines

A copyright notice may contain multiple comments. This is a given when using line comments and the copyright notice contains more than one line of text. You can also have muliple block comments in a single copyright notice. This can only happen when using a Fully Custom copyright notice. A Fully Custom copyright notice also allows for any combination of line and block comments to be used.

There is one very important consideration though when your copyright notice contains multiple comments - there can't be any blank lines between any of the comments. Note - this doesn't mean there can't be blank lines in the copyright notice. They just need to be within a block comment.

If you have a Fully Custom copyright notice with multiple comments and you place blank lines between any of them, you will most likely get undesirable effects when you perform copyright updates on files of that type.

Menus

Deleted:
<
<

Using

Changed:
<
<

  • At the end of the context menu for a Java file in an editor.
  • At the end of the context menu for a Java class in the project tree.
  • At the end of the context menu for a Java class in the structure tree.
  • At the end of the context menu for a Java class in the packages tree.
  • At the end of the context menu for a Java package in the project tree.
  • At the end of the Code menu if the current editor contains a Java file.
  • At the end of the Generate popup menu if the current editor contains a Java file.
>
>

  • At the end of the context menu for a supported file in the project tree.
  • At the end of the context menu for a supported file in the packages tree.
  • At the end of the context menu for a directory in the project tree.
  • At the end of the context menu for a package in the packages tree.
  • At the end of the context menu for a module in the packages tree.
  • At the end of the context menu for a module in the project tree.
  • At the end of the Code menu if the current editor contains a supported file.
  • At the end of the Generate popup menu if the current editor contains a supported file.
Changed:
<
<

Selecting a class or package in the project tree works just like Optimize

>
>

Selecting a file or directory in the project tree works just like Optimize

Changed:
<
<

package.

>
>

directory.

New files will automatically have the correct copyright notice applied to them if the file is a supported type and the file type has copyright notices enabled.

Changed:
<
<

New java files will automatically have the correct copyright notice applied to them.

>
>

Copyright Template

Changed:
<
<

See http://jakarta.apache.org/velocity for more information on Velocity and seehttp://jakarta.apache.org/velocity/user-guide.html for more details on writing

>
>

See http://jakarta.apache.org/velocity for more information on Velocity and see http://jakarta.apache.org/velocity/user-guide.html for more details on writing

Added:
>
>

$module.name String The current module's name

Changed:
<
<

  • Use the plugin manager in IDEA 4.x to install the plugin.
>
>

  • Use the plugin manager in IDEA 5.x to install the plugin.
Added:
>
>

  • 1.0.0 RC1 (30 Nov, 2005)
    • New Features
      • Complete rewrite and suppor for other files.
Changed:
<
<

Plugin Version: 28 Jun 2004 (0.1.1)

>
>

Plugin Version: 30 Nov 2005 (1.0.0 RC1)

Changed:
<
<

-- RickMaddy - 28 June 2004

>
>

-- RickMaddy - 30 November 2005

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.1"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="1.0.0RC1"}%

Changed:
<
<

%META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This plugin allows you to maintain a consistent copyright notice in all your project's Java files. You can define a unique copyright notice for each project. This includes it's location in the file. The copyright notice can be placed in one of the following locations: - At the start of the file before the %_Q_%package%_Q_% statement. -Between the package statement and any imports. - Between the imports and the first top level class (before the class' Javadoc comment, if present)."}%

>
>

%META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This plugin is used to ensure files in a project or module have a consistent%_N_%copyright notice. Copyright notices can be created for the following file%_N_%types: Java, JavaScript?, JSP, JSPx, XML, HTML, xHTML, DTD, Properties, and CSS."}%

Changed:
<
<

%META:FILEATTACHMENT{name="Copyright-0.1.1-4.0.x-bin.tar.gz" attr="" comment="Latest plugin" date="1088441825" path="Copyright-0.1.1-4.0.x-bin.tar.gz" size="36011" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-0.1.1-4.0.x-src.tar.gz" attr="" comment="Plugin source code" date="1088441854" path="Copyright-0.1.1-4.0.x-src.tar.gz" size="16706" user="RickMaddy" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="Copyright-0.1.1-4.0.x-bin.tar.gz" attr="" comment="Binary distribution" date="1088441825" path="Copyright-0.1.1-4.0.x-bin.tar.gz" size="36011" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-0.1.1-4.0.x-src.tar.gz" attr="" comment="Source distribution" date="1088441854" path="Copyright-0.1.1-4.0.x-src.tar.gz" size="16706" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-1.0.0-RC1-5.x-bin.tar.gz" attr="" comment="Binary distribution" date="1133414441" path="Copyright-1.0.0-RC1-5.x-bin.tar.gz" size="136015" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-1.0.0-RC1-5.x-src.tar.gz" attr="" comment="Source distribution" date="1133414462" path="Copyright-1.0.0-RC1-5.x-src.tar.gz" size="51387" user="RickMaddy" version="1.1"}%


 <<O>>  Difference Topic CopyrightPlugin (r1.5 - 28 Jun 2004 - RickMaddy)
Added:
>
>

  • 0.1.1 (28 Jun, 2004)
    • Bug Fixes
      • Fixed Velocity logging
Changed:
<
<

Plugin Version: 11 Jun 2004 (0.1.0)

>
>

Plugin Version: 28 Jun 2004 (0.1.1)

Changed:
<
<

-- RickMaddy - 11 June 2004

>
>

-- RickMaddy - 28 June 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.0"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.1"}%

Added:
>
>

%META:FILEATTACHMENT{name="Copyright-0.1.1-4.0.x-bin.tar.gz" attr="" comment="Latest plugin" date="1088441825" path="Copyright-0.1.1-4.0.x-bin.tar.gz" size="36011" user="RickMaddy" version="1.1"}% %META:FILEATTACHMENT{name="Copyright-0.1.1-4.0.x-src.tar.gz" attr="" comment="Plugin source code" date="1088441854" path="Copyright-0.1.1-4.0.x-src.tar.gz" size="16706" user="RickMaddy" version="1.1"}%


 <<O>>  Difference Topic CopyrightPlugin (r1.4 - 11 Jun 2004 - RickMaddy)
Added:
>
>

The contents of the copyright notice can be plain text or a Velocity template. See http://jakarta.apache.org/velocity for more information on Velocity and seehttp://jakarta.apache.org/velocity/user-guide.html for more details on writing Velocity templates.

Currently the following variables are available in the Velocity context:

Name Type Comment
$today DateInfo Represents the current date and time
$file.fileName String The current file's name
$file.pathName String The current file's complete path and name
$file.className String The current java file's classname
$file.qualifiedClassName String The current java file's fully qualified name
$file.lastModified DataInfo The date and time the file was last changed
$project.name String The current project's name
$username String The user's name

DateInfo has the following properties:

Name Type Comment
year int The date's year
month int The date's month (1 - 12)
day int The date's day of month (1 - 31)
hour int The date's hour (0 - 23)
minute int The date's minute of the hour (0 - 59)
second int The date's second of the minute (0 - 59)

DateInfo has the following method:

Name Type Comment
format(String format) String See java.text.SimpleDateFormat format options

Added:
>
>

  • 0.1.0 (11 Jun, 2004)
    • New Features
      • Support Velocity template in copyright text.
Changed:
<
<

Plugin Version: 11 Jun 2004 (0.0.3)

>
>

Plugin Version: 11 Jun 2004 (0.1.0)

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.3"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.0"}%


 <<O>>  Difference Topic CopyrightPlugin (r1.3 - 11 Jun 2004 - RickMaddy)
Added:
>
>

  • 0.0.3 (11 Jun, 2004)
    • Bug Fixes
      • Fixed trailing newline at end of comments.
Changed:
<
<

Plugin Version: 20 Feb 2004 (0.0.2)

>
>

Plugin Version: 11 Jun 2004 (0.0.3)

Changed:
<
<

-- RickMaddy - 21 Feb 2004

>
>

-- RickMaddy - 11 June 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.2"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.3"}%


 <<O>>  Difference Topic CopyrightPlugin (r1.2 - 24 Feb 2004 - SergeyZhukov)
Changed:
<
<

%META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This plugin allows you to maintain a consistent copyright notice in all your%_N_%project's Java files. You can define a unique copyright notice for each%_N_%project. This includes it's location in the file.%_N_%%_N_%The copyright notice can be placed in one of the following locations:%_N_%%_N_%- At the start of the file before the %_Q_%package%_Q_% statement.%_N_%%_N_%- Between the package statement and any imports.%_N_%%_N_%- Between the imports and the first top level class (before the class' Javadoc%_N_% comment, if present)."}%

>
>

%META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This plugin allows you to maintain a consistent copyright notice in all your project's Java files. You can define a unique copyright notice for each project. This includes it's location in the file. The copyright notice can be placed in one of the following locations: - At the start of the file before the %_Q_%package%_Q_% statement. -Between the package statement and any imports. - Between the imports and the first top level class (before the class' Javadoc comment, if present)."}%


 <<O>>  Difference Topic CopyrightPlugin (r1.1 - 20 Feb 2004 - RickMaddy)
Added:
>
>

%META:TOPICINFO{author="RickMaddy" date="1077316980" format="1.0" version="1.1"}%

CopyrightPlugin

Purpose

This plugin allows you to ensure all Java files in a project have a standard, project specific, copyright notice.

Description

This plugin allows you to maintain a consistent copyright notice in all your project's Java files. You can define a unique copyright notice for each project. This includes it's location in the file.

The copyright notice can be placed in one of the following locations:

  • At the start of the file before the "package" statement.
  • Between the package statement and any imports.
  • Between the imports and the first top level class (before the class' Javadoc comment, if present).

You may also specify that when an update occurs, any old non-Javadoc comments between the start of the file and the first top-level class be removed. This basically makes the assumption that the only non-Javadoc comment in this region is an old copyright notice you are updating.

Using

The option to update the copyright notice will appear in the following locations:

  • At the end of the context menu for a Java file in an editor.
  • At the end of the context menu for a Java class in the project tree.
  • At the end of the context menu for a Java class in the structure tree.
  • At the end of the context menu for a Java class in the packages tree.
  • At the end of the context menu for a Java package in the project tree.
  • At the end of the Code menu if the current editor contains a Java file.
  • At the end of the Generate popup menu if the current editor contains a Java file.

Selecting a class or package in the project tree works just like Optimize Imports. You will have the option of updating a single file or the whole package.

New java files will automatically have the correct copyright notice applied to them.

Plugin installation

  • Use the plugin manager in IDEA 4.x to install the plugin.
  • Restart IntelliJ

Version History

  • 0.0.2 (20 Feb, 2004)
    • New Features
      • Update copyright notice automatically whenever a new class or interface is created.
    • Bug Fixes
      • Ignore CVS directories.
      • Fixed visibility/selection of 'Include subdirectories' checkbox
      • Handle read-only files.

  • 0.0.1 (19 Feb 2004)
    • Initial Release

Plugin Info

Plugin Author: RickMaddy
Plugin Version: 20 Feb 2004 (0.0.2)
Change History:  
20 Feb 2004 (V0.0.2): Bug Fixes, New Features
Jar Dependencies: none
| Plugin Home: | http://www.intellij.org/twiki/bin/view/Main/CopyrightPlugin | Feedback: | http://www.intellij.org/twiki/bin/view/Main/CopyrightPluginDev

Related Topics: PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation, IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins

-- RickMaddy - 21 Feb 2004 %META:FORM{name="IntelliJPluginWebForm"}% %META:FIELD{name="IntelliJPluginName" title="IntelliJPluginName" value="CopyrightPlugin"}% %META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.2"}% %META:FIELD{name="IntelliJPluginVendor" title="IntelliJPluginVendor" value="Rick Maddy"}% %META:FIELD{name="IntelliJPluginBinary" title="IntelliJPluginBinary" value=""}% %META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value=""}% %META:FIELD{name="IntelliJPluginClassification" title="IntelliJPluginClassification" value="CodeHelper"}% %META:FIELD{name="TopicClassification" title="TopicClassification" value="IntelliJPluginPackage"}% %META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This plugin allows you to maintain a consistent copyright notice in all your%_N_%project's Java files. You can define a unique copyright notice for each%_N_%project. This includes it's location in the file.%_N_%%_N_%The copyright notice can be placed in one of the following locations:%_N_%%_N_%- At the start of the file before the %_Q_%package%_Q_% statement.%_N_%%_N_%- Between the package statement and any imports.%_N_%%_N_%- Between the imports and the first top level class (before the class' Javadoc%_N_% comment, if present)."}% %META:FIELD{name="TestedOnOS" title="TestedOnOS" value="OsLinux"}% %META:FIELD{name="ShouldRunOnOS" title="ShouldRunOnOS" value="AnyOS"}%


View | Diffs | r1.8 | > | r1.7 | > | r1.6 | More

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision r1.1 - 20 Feb 2004 - 22:43 GMT - RickMaddy
Revision r1.8 - 20 Mar 2007 - 01:20 GMT - LarryHamel
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.