In this section:
- Prerequisite
- Creating, importing and deleting the copyright profiles
- Adding and updating copyright notices
Prerequisite
Before using copyright profiles and generating copyright notices, make sure that the Copyright plugin is enabled.
Creating, importing and deleting the copyright profiles
- Open the Settings dialog box, and then open the Copyright Profiles page below the Copyright node.
- Click the Add button
on the toolbar. - In the Create new copyright profile dialog box that opens specify the name of the new profile and click OK. You return to the Copyright Profiles page where the new profile is added to the list of available copyright profiles.
- Specify the copyright notice to be generated. Do one of the following:
- Type the desired plain text.
- Define a Velocity template
,
then click the Validate button to check that the template has been specified correctly.
Find the list of supported Velocity variables in the Copyright Profiles dialog box reference.
-
In the Keyword to detect copyright in comments text box, type a character string
to distinguish copyright notices from other comments during copyright update.
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.
- Open the Settings dialog box, and then open the Copyright Profiles page below the Copyright node.
- Select the desired profile to inherit the settings from.
- Click the Copy button
on the toolbar. - In the Create new copyright profile dialog box that opens specify the name of the new profile and click OK. You return to the Copyright Profiles page where the new profile is added to the list of available copyright profiles.
- View and edit the profile settings. Proceed as during creation of a profile from scratch.
- Open the Settings dialog box, and then open the Copyright Profiles page below the Copyright node.
- Click the Import button
on the toolbar. - In the dialog that opens, choose the location of
the
.iprfile that refers to the copyright profile with the desired notice definition. - From the Choose profile to import list, that appears, select the desired copyright profile.
- In the Create new copyright profile dialog box that opens specify the name of the new profile and click OK. You return to the Copyright Profiles page where the new profile is added to the list of available copyright profiles.
- Proceed as during creation of a profile from scratch.
- Open the Settings dialog box, and then open the Copyright Profiles page below the Copyright node.
- Select the profile you want to discard and click the Delete button
on the toolbar.
Adding and updating copyright notices
- Open the desired file in the editor.
- Press Alt+Insert.
- From the list that is displayed in the editor, choose .
- The following steps depend on the belonging of a file to a certain scope and the value of the Default project copyright field in the
Copyright page.
- If the file where you want to generate a copyright notice belongs to a certain scope, the copyright notice is generated according to the copyright profile settings.
- If the field Default project copyright has the value No copyright and the file where you want to generate
a copyright notice does not belong to any scope, IntelliJ IDEA prompts you to configure copyright settings:

Click OK to open the Copyright page and configure the desired settings.
Note that if a file belongs to several scopes, these scopes are checked upside down. So doing, the first scope with this file is declared the proper one, and its copyright profile is used.
- In the Project tool window, select files or directories where you want the copyright notice to be updated or just open the desired file in the editor.
- Right-click the selection, and choose on the context menu.
To have copyright notices updated correctly, make sure that the keyword specified in the copyright profile is a part of the notice definition. Otherwise, IntelliJ IDEA will not detect copyright notices and, instead of updating existing notices, will insert new ones.
You can also update copyright notices when committing changes.