Use this page to create, edit, and remove copyright profiles.
In this topic:
|Item||Tooltip and Shortcut||Description|
|Insert||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||Click this button to discard the selected profile.|
|Ctrl+D||Click this button to open the Copy Copyright Profile dialog box, where you can create a copy of the selected profile.|
|Import||Click this button to import a file that contains the desired copyright notice definition.|
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.
|Name||Use this text field to view or edit the name of the selected copyright profile.|
|Copyright text (may contain Velocity templates)||Use 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:
|Validate||Click this button to check that the Velocity template has been specified correctly.|
|Regex to detect copyright in comments||Use this text box to type, view, or edit the regular expression that will be used to find copyright notices in comments. |
Note that this regular expression should match the above specified copyright notice. Otherwise instead of updating copyright notices, PhpStorm will insert new ones.
|Allow replacing copyright if old copyright matches||Use this text box to type or edit the regular expression pattern that will be recognized in the existing copyright notice and allow replacing it with the new one. For example, if you specify the following pattern for year indication: |
Note the difference between Regex to detect copyright in comments and Allow replacing copyright if old copyright matches. While the first setting is needed just to find copyright notices, the second one is used to decide whether a found copyright notice should be updated.