IntelliJ IDEA 12.1.0 Web Help

File | Settings | Copyright - Copyright Profiles for Windows and Linux
IntelliJ IDEA | Preferences | Copyright - Copyright Profiles for Mac OS


Use this page to create, edit, and remove copyright profiles.

In this topic:

Profiles toolbar

ItemTooltip and ShortcutDescription
add.png InsertInsert Click this button to add a new profile at the desired level. You can choose to create an empty profile or a profile based on the current default profile.
delete.png DeleteDelete Click this button to discard the selected profile.
copy.gif Ctrl+DCtrl+D Click this button to open the Copy Copyright Profile dialog box, where you can create a copy of the selected profile.
icon_importCopyrightProfile.png ImportClick this button to import a file that contains the desired copyright notice definition.

Tip

You can perform the same actions using context menus of the profile nodes.

Copyright profile page

Use this page to configure the selected profile: define the copyright notice to be generated and specify the keyword to detect copyright notices in comments.

ItemDescription
NameUse this text field to view or edit the name of the selected copyright profile.
Copyright noticeUse this text area to view or edit the copyright notice to be generated. A copyright profile can contain an explicit plain text of the copyright notice or its definition through a Velocity template.

Currently the following variables are available in the Velocity context:

NameTypeComment
$todayDateInfoThe current date and time.
$file.fileNameStringThe name of the currently opened file where the notice is to be generated.
$file.pathNameStringThe complete path and name of the currently opened file where the notice is to be generated.
$file.classNameStringThe name of the currently opened Java file where the notice is to be generated.
$file.qualifiedClassNameStringThe fully qualified name of the currently opened Java file where the notice is to be generated.
$file.lastModifiedDataInfoThe date and time when the current file was last changed.
$project.nameStringThe name of the current project.
$module.nameStringThe name of the current module.
$usernameStringThe name of the current user.
DateInfo has the following properties:
yearintThe current year.
monthintThe current month (1-12).
dayintThe current date of month (1-31).
hourintThe current hour (0-11).
hour24intThe current hour (0-23).
minuteintThe current minute of the hour (0-59).
secondintThe current second of the minute (0-59).
DateInfo has the following method:
format(String format)StringSee java.text.SimpleDateFormat format options.
ValidateClick this button to check that the Velocity template has been specified correctly.
Keyword to detect copyright in commentsUse this text box to type, view, or edit the keyword that will be used to find copyright notices in comments.

Tip

Make sure that this keyword is a part of the above specified copyright notice. Otherwise instead of updating copyright notices, IntelliJ IDEA will insert new ones.

See Also

Concepts:

Procedures:

Reference:

Web Resources: