Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to maintain author name per project in IntelliJ?

I have several projects at my computer and some is for personal and some is the companies, I need different author name for these projects.

Can I define different author name for different projects?

like image 237
JaskeyLam Avatar asked Aug 10 '15 13:08

JaskeyLam


People also ask

How do I change the default author in IntelliJ?

Go to Settings -> Editor -> Live Templates , click the Plus Icon Button (on the right). In the "Abbreviation" field, enter the string that should activate the template (e.g. @a ), and in the "Template Text" area enter the string to complete (e.g. @author - My Name ).

How do I add copyright header in IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Editor | Copyright. From the Default project copyright list, select the profile you want to use as the default profile. Apply the changes and close the dialog. After that you can add the copyright to the necessary files.

How do I reference in IntelliJ?

Place the caret at the necessary code element and press Ctrl+Shift+P (or select View | Type Info from the main menu). If several expressions are available, select the desired one from the popup menu and press Enter .


1 Answers

If you want to set per project author name to be used in file headers, etc, you can do so via modification of Code templates.

  1. Go to Settings/Editor/File and Code Templates/Includes/File Header
  2. Switch to Project schema in the upper right corner
  3. Modify the file header template to contain the name you wish to use

enter image description here

The file header is not used for all types of files though. So for instance for JavaScript you need to modify the JavaScript file template separately.

like image 124
Bohuslav Burghardt Avatar answered Sep 28 '22 06:09

Bohuslav Burghardt